Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@8452 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-03-30 07:01:27 +00:00
Родитель b79d865f03
Коммит d55846d100
2 изменённых файлов: 14 добавлений и 14 удалений

Просмотреть файл

@ -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;
};

Просмотреть файл

@ -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<CTFontDescriptorRef> 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<CFStringRef> cfName(make_CFString(familyName));
return CreateSet(cfName);
}
virtual SkTypeface* onMatchFamilyStyle(const char familyName[],
const SkFontStyle&) SK_OVERRIDE {
return NULL;