Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@8439 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-03-29 07:01:22 +00:00
Родитель 123ac1d4ea
Коммит 6acd09e2b0
2 изменённых файлов: 8 добавлений и 9 удалений

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

@ -42,7 +42,7 @@ protected:
paint.setLCDRenderText(true);
paint.setSubpixelText(true);
paint.setTextSize(17);
SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
int count = SkMin32(fm->countFamilies(), MAX_FAMILIES);
@ -51,17 +51,17 @@ protected:
fm->getFamilyName(i, &fname);
paint.setTypeface(NULL);
(void)drawString(canvas, fname, 20, y, paint);
SkScalar x = 220;
SkAutoTUnref<SkFontStyleSet> set(fm->createStyleSet(i));
for (int j = 0; j < set->count(); ++j) {
SkString sname;
SkFontStyle fs;
set->getStyle(j, &fs, &sname);
SkSafeUnref(paint.setTypeface(set->createTypeface(j)));
x = drawString(canvas, sname, x, y, paint) + 20;
}
}
y += 24;
}
}
@ -79,4 +79,3 @@ private:
//////////////////////////////////////////////////////////////////////////////
DEF_GM( return SkNEW(FontMgrGM); )

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

@ -376,7 +376,7 @@ static bool check_7(const SkTDArray<SkDrawCommand*>& commands, int curCommand) {
return false;
}
if (!clip0->rect().contains(clip1->rect()) ||
if (!clip0->rect().contains(clip1->rect()) ||
!clip1->rect().contains(clip2->rect())) {
return false;
}
@ -409,9 +409,9 @@ static bool check_7(const SkTDArray<SkDrawCommand*>& commands, int curCommand) {
SkPaint* dbmrPaint = dbmr->paint();
if (NULL == dbmrPaint) {
return true;
return true;
}
if (NULL != saveLayerPaint0) {
SkColor layerColor0 = saveLayerPaint0->getColor() | 0xFF000000; // force opaque
if (dbmrPaint->getColor() != layerColor0) {
@ -451,7 +451,7 @@ static void apply_7(SkTDArray<SkDrawCommand*>& commands, int curCommand) {
SkScalar newSrcLeft = dbmr->srcRect()->fLeft + clip2->rect().fLeft - dbmr->dstRect().fLeft;
SkScalar newSrcTop = dbmr->srcRect()->fTop + clip2->rect().fTop - dbmr->dstRect().fTop;
SkRect newSrc = SkRect::MakeXYWH(newSrcLeft, newSrcTop,
SkRect newSrc = SkRect::MakeXYWH(newSrcLeft, newSrcTop,
clip2->rect().width(), clip2->rect().height());
dbmr->setSrcRect(newSrc);