Sanitizing source files in Skia_Periodic_House_Keeping
authorskia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Sat, 20 Apr 2013 07:01:07 +0000 (07:01 +0000)
committerskia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Sat, 20 Apr 2013 07:01:07 +0000 (07:01 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@8785 2bbb7eff-a529-9590-31e7-b0007b416f81

include/core/SkDataTable.h
src/core/SkDataTable.cpp
src/core/SkXfermode.cpp
src/gpu/GrOvalRenderer.cpp
src/ports/SkFontConfigInterface_direct.cpp
src/ports/SkFontHost_fontconfig.cpp
tests/DataRefTest.cpp

index d8de14014015d6d4aaec450a1d61c5f6708cc915..37bcee9242d00efdfce23eaa628fe8b0d9514174 100644 (file)
@@ -88,13 +88,13 @@ public:
      */
     static SkDataTable* NewCopyArray(const void* array, size_t elemSize,
                                      int count);
-    
+
     SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDataTable)
 
 protected:
     SkDataTable(SkFlattenableReadBuffer&);
     virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
-    
+
 private:
     SkDataTable(int count, SkData* dataWeTakeOverOwnership);
     virtual ~SkDataTable();
index f04b2152fa003239cf4f8644746016c8c8176d38..5c3bfefe2c167f3a6973df5885b324fbd39b5586 100644 (file)
@@ -97,13 +97,13 @@ SkDataTable* SkDataTable::NewCopyArray(const void* array, size_t elemSize,
     if (count < 0) {
         count = 0;
     }
-    
+
     size_t headerSize = count * sizeof(ElemHead);
     size_t dataSize = count * elemSize;
-    
+
     size_t bufferSize = headerSize + dataSize;
     void* buffer = sk_malloc_throw(bufferSize);
-    
+
     ElemHead* headerCurr = (ElemHead*)buffer;
     char* dataCurr = (char*)buffer + headerSize;
     for (int i = 0; i < count; ++i) {
@@ -112,7 +112,7 @@ SkDataTable* SkDataTable::NewCopyArray(const void* array, size_t elemSize,
         dataCurr += elemSize;
     }
     memcpy((char*)buffer + headerSize, array, dataSize);
-    
+
     return SkNEW_ARGS(SkDataTable, (count,
                                     SkData::NewFromMalloc(buffer, bufferSize)));
 }
@@ -143,4 +143,3 @@ SkDataTable* SkDataTableBuilder::createDataTable() {
     return SkDataTable::NewCopyArrays(fPtrs.begin(), fSizes.begin(),
                                       fSizes.count());
 }
-
index 1faf0175c95c90850c5aa6a93f861195c40f39c4..da6d15e43ecf02a7fd1ca07d01c1cb7a5d852d42 100644 (file)
@@ -1047,7 +1047,7 @@ public:
                     break;
                 case SkXfermode::kDifference_Mode:
                     builder->fsCodeAppendf("\t\t%s.rgb = %s.rgb + %s.rgb -"
-                                                       "2.0 * min(%s.rgb * %s.a, %s.rgb * %s.a);\n", 
+                                                       "2.0 * min(%s.rgb * %s.a, %s.rgb * %s.a);\n",
                                            outputColor, inputColor, dstColor, inputColor, dstColor,
                                            dstColor, inputColor);
                     break;
@@ -1186,7 +1186,7 @@ public:
 private:
     XferEffect(SkXfermode::Mode mode) : fMode(mode) { this->setWillReadDst(); }
     virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE { return true; }
-    
+
     SkXfermode::Mode fMode;
 
     typedef GrEffect INHERITED;
index 3ecd302efb6fbab29fee74f55e23a44a65209e90..c6986920ff53b86daa21804291c824308d0e4ba3 100644 (file)
@@ -426,9 +426,9 @@ bool GrOvalRenderer::drawEllipse(GrDrawTarget* target,
     vm.mapPoints(&center, 1);
     SkScalar ellipseXRadius = SkScalarHalf(ellipse.width());
     SkScalar ellipseYRadius = SkScalarHalf(ellipse.height());
-    SkScalar xRadius = SkScalarAbs(vm[SkMatrix::kMScaleX]*ellipseXRadius + 
+    SkScalar xRadius = SkScalarAbs(vm[SkMatrix::kMScaleX]*ellipseXRadius +
                                    vm[SkMatrix::kMSkewY]*ellipseYRadius);
-    SkScalar yRadius = SkScalarAbs(vm[SkMatrix::kMSkewX]*ellipseXRadius + 
+    SkScalar yRadius = SkScalarAbs(vm[SkMatrix::kMSkewX]*ellipseXRadius +
                                    vm[SkMatrix::kMScaleY]*ellipseYRadius);
     if (SkScalarDiv(xRadius, yRadius) > 2 || SkScalarDiv(yRadius, xRadius) > 2) {
         return false;
index bba1cceeecbb183fe512d41b82e9130be7d4c8c8..1e6f2ba9ddd7b5d0cbe83cb97cad7afaccb8135d 100644 (file)
@@ -511,4 +511,3 @@ bool SkFontConfigInterfaceDirect::matchFamilySet(const char inFamilyName[],
                                                  SkTArray<FontIdentity>* ids) {
     return false;
 }
-
index 55ac904676105552471f0e505b50cba6272a4025..9a0f654a5118f76b63ceee3b502e1f690e933f3c 100644 (file)
@@ -280,7 +280,7 @@ static FcPattern** MatchFont(FcFontSet* font_set,
                              int* count) {
   // Older versions of fontconfig have a bug where they cannot select
   // only scalable fonts so we have to manually filter the results.
-  
+
     FcPattern** iter = font_set->fonts;
     FcPattern** stop = iter + font_set->nfont;
     // find the first good match
@@ -300,7 +300,7 @@ static FcPattern** MatchFont(FcFontSet* font_set,
             break;
         }
     }
-    
+
     *count = iter - firstIter;
     return firstIter;
 }
@@ -314,7 +314,7 @@ public:
     virtual void getStyle(int index, SkFontStyle*, SkString* style) SK_OVERRIDE;
     virtual SkTypeface* createTypeface(int index) SK_OVERRIDE;
     virtual SkTypeface* matchStyle(const SkFontStyle& pattern) SK_OVERRIDE;
-    
+
 private:
     struct Rec {
         SkString    fStyleName;
@@ -328,7 +328,7 @@ private:
 static int map_range(int value,
                      int old_min, int old_max, int new_min, int new_max) {
     SkASSERT(old_min < old_max);
-    SkASSERT(new_min < new_max);    
+    SkASSERT(new_min < new_max);
     return new_min + SkMulDiv(value - old_min,
                               new_max - new_min, old_max - old_min);
 }
@@ -338,7 +338,7 @@ static SkFontStyle make_fontconfig_style(FcPattern* match) {
     int width = get_int(match, FC_WIDTH);
     int slant = get_int(match, FC_SLANT);
 //    SkDebugf("old weight %d new weight %d\n", weight, map_range(weight, 0, 80, 0, 400));
-   
+
     // fontconfig weight seems to be 0..200 or so, so we remap it here
     weight = map_range(weight, 0, 80, 0, 400);
     width = map_range(width, 0, 200, 0, 9);
@@ -393,7 +393,7 @@ public:
     SkFontMgr_fontconfig(SkFontConfigInterface* fci)
         : fFCI(fci)
         , fFamilyNames(NULL) {}
-    
+
     virtual ~SkFontMgr_fontconfig() {
         SkSafeUnref(fFamilyNames);
     }
@@ -477,5 +477,3 @@ SkFontMgr* SkFontMgr::Factory() {
     SkFontConfigInterface* fci = RefFCI();
     return fci ? SkNEW_ARGS(SkFontMgr_fontconfig, (fci)) : NULL;
 }
-
-
index 449149af95e4ecd304a08778ab79fa2fa968a76f..26c263aa1309d88d2a8643f3cea5fd252d956f8b 100644 (file)
@@ -47,10 +47,10 @@ static void test_vartable(skiatest::Reporter* reporter) {
     for (int i = 0; i < count; ++i) {
         sizes[i] = strlen(str[i]) + 1;
     }
-    
+
     SkAutoTUnref<SkDataTable> table(SkDataTable::NewCopyArrays(
                                         (const void*const*)str, sizes, count));
-    
+
     REPORTER_ASSERT(reporter, table->count() == count);
     for (int i = 0; i < count; ++i) {
         size_t size;
@@ -58,7 +58,7 @@ static void test_vartable(skiatest::Reporter* reporter) {
         REPORTER_ASSERT(reporter, !strcmp(table->atDataT<const char>(i, &size),
                                           str[i]));
         REPORTER_ASSERT(reporter, size == sizes[i]);
-        
+
         const char* s = table->atStr(i);
         REPORTER_ASSERT(reporter, strlen(s) == strlen(str[i]));
     }
@@ -71,12 +71,12 @@ static void test_tablebuilder(skiatest::Reporter* reporter) {
     int count = SK_ARRAY_COUNT(str);
 
     SkDataTableBuilder builder(16);
-    
+
     for (int i = 0; i < count; ++i) {
         builder.append(str[i], strlen(str[i]) + 1);
     }
     SkAutoTUnref<SkDataTable> table(builder.createDataTable());
-    
+
     REPORTER_ASSERT(reporter, table->count() == count);
     for (int i = 0; i < count; ++i) {
         size_t size;
@@ -84,7 +84,7 @@ static void test_tablebuilder(skiatest::Reporter* reporter) {
         REPORTER_ASSERT(reporter, !strcmp(table->atDataT<const char>(i, &size),
                                           str[i]));
         REPORTER_ASSERT(reporter, size == strlen(str[i]) + 1);
-        
+
         const char* s = table->atStr(i);
         REPORTER_ASSERT(reporter, strlen(s) == strlen(str[i]));
     }