From: skia.committer@gmail.com Date: Sat, 30 Mar 2013 07:01:27 +0000 (+0000) Subject: Sanitizing source files in Skia_Periodic_House_Keeping X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~12903 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d55846d100bb09448b398b41798bd4ab100a753a;p=platform%2Fupstream%2FlibSkiaSharp.git Sanitizing source files in Skia_Periodic_House_Keeping git-svn-id: http://skia.googlecode.com/svn/trunk@8452 2bbb7eff-a529-9590-31e7-b0007b416f81 --- diff --git a/gm/fontmgr.cpp b/gm/fontmgr.cpp index b0d9291..1218435 100644 --- a/gm/fontmgr.cpp +++ b/gm/fontmgr.cpp @@ -84,12 +84,12 @@ public: FontMgrMatchGM() : fFM(SkFontMgr::RefDefault()) { SkGraphics::SetFontCacheLimit(16 * 1024 * 1024); } - + protected: virtual SkString onShortName() { return SkString("fontmgr_match"); } - + virtual SkISize onISize() { return SkISize::Make(640, 1024); } @@ -131,7 +131,7 @@ protected: } } } - + virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { SkPaint paint; paint.setAntiAlias(true); @@ -144,13 +144,13 @@ protected: }; SkFontStyleSet* fset = NULL; - for (size_t i = 0; i < SK_ARRAY_COUNT(gNames); ++i) { + for (size_t i = 0; i < SK_ARRAY_COUNT(gNames); ++i) { fset = fFM->matchFamily(gNames[i]); if (fset && fset->count() > 0) { break; } } - + if (NULL == fset) { return; } @@ -161,13 +161,13 @@ protected: canvas->translate(150, 0); this->iterateFamily(canvas, paint, fset); } - + virtual uint32_t onGetFlags() const SK_OVERRIDE { // fontdescriptors (and therefore serialization) don't yet understand // these new styles, so skip tests that exercise that for now. return kSkipPicture_Flag | kSkipPipe_Flag; } - + private: typedef GM INHERITED; }; diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp index 309dabc..a706e05 100755 --- a/src/ports/SkFontHost_mac.cpp +++ b/src/ports/SkFontHost_mac.cpp @@ -361,7 +361,7 @@ private: } }; -Offscreen::Offscreen() : fRGBSpace(NULL), fCG(NULL), +Offscreen::Offscreen() : fRGBSpace(NULL), fCG(NULL), fDoAA(false), fDoLCD(false) { fSize.set(0, 0); } @@ -2056,7 +2056,7 @@ private: CTFontDescriptorRef findMatchingDesc(const SkFontStyle& pattern) const { int bestMetric = SK_MaxS32; CTFontDescriptorRef bestDesc = NULL; - + for (int i = 0; i < fCount; ++i) { CTFontDescriptorRef desc = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fArray, i); int metric = compute_metric(pattern, desc2fontstyle(desc)); @@ -2094,14 +2094,14 @@ class SkFontMgr_Mac : public SkFontMgr { CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); - + CFDictionaryAddValue(cfAttr, kCTFontFamilyNameAttribute, cfFamilyName); - + AutoCFRelease desc( CTFontDescriptorCreateWithAttributes(cfAttr)); return SkNEW_ARGS(SkFontStyleSet_Mac, (cfFamilyName, desc)); } - + public: SkFontMgr_Mac() : fCount(0), fNames(NULL) {} @@ -2131,12 +2131,12 @@ protected: } return CreateSet(this->stringAt(index)); } - + virtual SkFontStyleSet* onMatchFamily(const char familyName[]) SK_OVERRIDE { AutoCFRelease cfName(make_CFString(familyName)); return CreateSet(cfName); } - + virtual SkTypeface* onMatchFamilyStyle(const char familyName[], const SkFontStyle&) SK_OVERRIDE { return NULL;