зеркало из https://github.com/mozilla/moz-skia.git
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:
Родитель
123ac1d4ea
Коммит
6acd09e2b0
|
@ -42,7 +42,7 @@ protected:
|
||||||
paint.setLCDRenderText(true);
|
paint.setLCDRenderText(true);
|
||||||
paint.setSubpixelText(true);
|
paint.setSubpixelText(true);
|
||||||
paint.setTextSize(17);
|
paint.setTextSize(17);
|
||||||
|
|
||||||
SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
|
SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
|
||||||
int count = SkMin32(fm->countFamilies(), MAX_FAMILIES);
|
int count = SkMin32(fm->countFamilies(), MAX_FAMILIES);
|
||||||
|
|
||||||
|
@ -51,17 +51,17 @@ protected:
|
||||||
fm->getFamilyName(i, &fname);
|
fm->getFamilyName(i, &fname);
|
||||||
paint.setTypeface(NULL);
|
paint.setTypeface(NULL);
|
||||||
(void)drawString(canvas, fname, 20, y, paint);
|
(void)drawString(canvas, fname, 20, y, paint);
|
||||||
|
|
||||||
SkScalar x = 220;
|
SkScalar x = 220;
|
||||||
SkAutoTUnref<SkFontStyleSet> set(fm->createStyleSet(i));
|
SkAutoTUnref<SkFontStyleSet> set(fm->createStyleSet(i));
|
||||||
for (int j = 0; j < set->count(); ++j) {
|
for (int j = 0; j < set->count(); ++j) {
|
||||||
SkString sname;
|
SkString sname;
|
||||||
SkFontStyle fs;
|
SkFontStyle fs;
|
||||||
set->getStyle(j, &fs, &sname);
|
set->getStyle(j, &fs, &sname);
|
||||||
|
|
||||||
SkSafeUnref(paint.setTypeface(set->createTypeface(j)));
|
SkSafeUnref(paint.setTypeface(set->createTypeface(j)));
|
||||||
x = drawString(canvas, sname, x, y, paint) + 20;
|
x = drawString(canvas, sname, x, y, paint) + 20;
|
||||||
}
|
}
|
||||||
y += 24;
|
y += 24;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,4 +79,3 @@ private:
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
DEF_GM( return SkNEW(FontMgrGM); )
|
DEF_GM( return SkNEW(FontMgrGM); )
|
||||||
|
|
||||||
|
|
|
@ -376,7 +376,7 @@ static bool check_7(const SkTDArray<SkDrawCommand*>& commands, int curCommand) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!clip0->rect().contains(clip1->rect()) ||
|
if (!clip0->rect().contains(clip1->rect()) ||
|
||||||
!clip1->rect().contains(clip2->rect())) {
|
!clip1->rect().contains(clip2->rect())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -409,9 +409,9 @@ static bool check_7(const SkTDArray<SkDrawCommand*>& commands, int curCommand) {
|
||||||
SkPaint* dbmrPaint = dbmr->paint();
|
SkPaint* dbmrPaint = dbmr->paint();
|
||||||
|
|
||||||
if (NULL == dbmrPaint) {
|
if (NULL == dbmrPaint) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != saveLayerPaint0) {
|
if (NULL != saveLayerPaint0) {
|
||||||
SkColor layerColor0 = saveLayerPaint0->getColor() | 0xFF000000; // force opaque
|
SkColor layerColor0 = saveLayerPaint0->getColor() | 0xFF000000; // force opaque
|
||||||
if (dbmrPaint->getColor() != layerColor0) {
|
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 newSrcLeft = dbmr->srcRect()->fLeft + clip2->rect().fLeft - dbmr->dstRect().fLeft;
|
||||||
SkScalar newSrcTop = dbmr->srcRect()->fTop + clip2->rect().fTop - dbmr->dstRect().fTop;
|
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());
|
clip2->rect().width(), clip2->rect().height());
|
||||||
|
|
||||||
dbmr->setSrcRect(newSrc);
|
dbmr->setSrcRect(newSrc);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче