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

Unified Diff: gm/texteffects.cpp

Issue 1821533002: guard rasterizer and drawlooper setters (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: guard google3 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
« no previous file with comments | « gm/textbloblooper.cpp ('k') | gyp/skia_for_android_framework_defines.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/texteffects.cpp
diff --git a/gm/texteffects.cpp b/gm/texteffects.cpp
index aa3d3758abb0f26ae4c75ab2e07db71ce5644769..5962cd7f16f714f148225646adb3301aba87506c 100644
--- a/gm/texteffects.cpp
+++ b/gm/texteffects.cpp
@@ -88,7 +88,7 @@ static void r6(SkLayerRasterizer::Builder* rastBuilder, SkPaint& p) {
p.setAntiAlias(false);
SkLayerRasterizer::Builder rastBuilder2;
r5(&rastBuilder2, p);
- p.setRasterizer(rastBuilder2.detachRasterizer())->unref();
+ p.setRasterizer(rastBuilder2.detach());
p.setXfermodeMode(SkXfermode::kClear_Mode);
rastBuilder->addLayer(p);
}
@@ -153,14 +153,13 @@ static const raster_proc gRastProcs[] = {
static void apply_shader(SkPaint* paint, int index) {
raster_proc proc = gRastProcs[index];
- if (proc)
- {
+ if (proc) {
SkPaint p;
SkLayerRasterizer::Builder rastBuilder;
p.setAntiAlias(true);
proc(&rastBuilder, p);
- paint->setRasterizer(rastBuilder.detachRasterizer())->unref();
+ paint->setRasterizer(rastBuilder.detach());
}
#if 0
« no previous file with comments | « gm/textbloblooper.cpp ('k') | gyp/skia_for_android_framework_defines.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698