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

Unified Diff: samplecode/SamplePathEffects.cpp

Issue 176873004: Builder class for SkLayerRasterizer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make ReadLayers private Created 6 years, 10 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 | « samplecode/SampleAll.cpp ('k') | samplecode/SampleSlides.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SamplePathEffects.cpp
diff --git a/samplecode/SamplePathEffects.cpp b/samplecode/SamplePathEffects.cpp
index 2a1a49b9495bd15ffc555f764df00bfd4cf686d7..9af0abb59adb20bf597772e767d08c15f198be46 100644
--- a/samplecode/SamplePathEffects.cpp
+++ b/samplecode/SamplePathEffects.cpp
@@ -74,9 +74,9 @@ static SkPathEffect* make_warp_pe() {
#include "SkColorFilter.h"
#include "SkLayerRasterizer.h"
-class testrast : public SkLayerRasterizer {
+class TestRastBuilder : public SkLayerRasterizer::Builder {
public:
- testrast() {
+ TestRastBuilder() {
SkPaint paint;
paint.setAntiAlias(true);
@@ -177,7 +177,8 @@ protected:
paint.setARGB(0xFF, 0, 0, 0);
paint.setPathEffect(make_warp_pe())->unref();
- paint.setRasterizer(new testrast)->unref();
+ TestRastBuilder testRastBuilder;
+ paint.setRasterizer(testRastBuilder.detachRasterizer())->unref();
canvas->drawPath(fPath, paint);
}
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SampleSlides.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698