Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: gm/lcdblendmodes.cpp

Issue 1832223002: switch xfermodes over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gm/lcdblendmodes.cpp
diff --git a/gm/lcdblendmodes.cpp b/gm/lcdblendmodes.cpp
index 8ac944980af77febc6877aee82c7d81cd95fa7de..42359e3aef002834697c98966e313dcd1838ace8 100644
--- a/gm/lcdblendmodes.cpp
+++ b/gm/lcdblendmodes.cpp
@@ -76,8 +76,7 @@ protected:
this->drawColumn(surfCanvas, SK_ColorCYAN, SK_ColorMAGENTA, true);
SkPaint surfPaint;
- SkAutoTUnref<SkXfermode> xfermode(SkXfermode::Create(SkXfermode::kSrcOver_Mode));
- surfPaint.setXfermode(xfermode);
+ surfPaint.setXfermode(SkXfermode::Make(SkXfermode::kSrcOver_Mode));
surface->draw(canvas, 0, 0, &surfPaint);
}
@@ -123,14 +122,13 @@ protected:
backgroundPaint);
SkScalar y = fTextHeight;
for (size_t m = 0; m < SK_ARRAY_COUNT(gModes); m++) {
- SkAutoTUnref<SkXfermode> xfermode(SkXfermode::Create(gModes[m].fMode));
SkPaint paint;
paint.setColor(textColor);
paint.setAntiAlias(true);
paint.setSubpixelText(true);
paint.setLCDRenderText(true);
paint.setTextSize(fTextHeight);
- paint.setXfermode(xfermode);
+ paint.setXfermode(SkXfermode::Make(gModes[m].fMode));
sk_tool_utils::set_portable_typeface(&paint);
if (useGrad) {
SkRect r;

Powered by Google App Engine
This is Rietveld 408576698