aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-18 14:19:31 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-18 14:19:31 +0000
commit091a594dbc4116ec2e54724432472bf37dae794a (patch)
tree12d82bae03eb13d06f95810bb1df858c4dff7d3a /samplecode
parent60bd7519a9db4ddddd95e490f93165e5676f90f5 (diff)
Reduce internal explicit SaveFlags usage.
Most of these are either redundant/defaults or (hopefully) unnecessarily specific. R=reed@google.com, robertphillips@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/241453003 git-svn-id: http://skia.googlecode.com/svn/trunk@14253 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleLayerMask.cpp2
-rw-r--r--samplecode/SampleLayers.cpp6
-rw-r--r--samplecode/SampleXfermodesBlur.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/samplecode/SampleLayerMask.cpp b/samplecode/SampleLayerMask.cpp
index b3bbac622f..86a092cd06 100644
--- a/samplecode/SampleLayerMask.cpp
+++ b/samplecode/SampleLayerMask.cpp
@@ -57,7 +57,7 @@ protected:
virtual void onDrawContent(SkCanvas* canvas) {
SkRect r;
r.set(SkIntToScalar(20), SkIntToScalar(20), SkIntToScalar(120), SkIntToScalar(120));
- canvas->saveLayer(&r, NULL, SkCanvas::kARGB_ClipLayer_SaveFlag);
+ canvas->saveLayer(&r, NULL);
canvas->drawColor(SK_ColorRED);
drawMask(canvas, r);
canvas->restore();
diff --git a/samplecode/SampleLayers.cpp b/samplecode/SampleLayers.cpp
index 430c832f77..3ae543915c 100644
--- a/samplecode/SampleLayers.cpp
+++ b/samplecode/SampleLayers.cpp
@@ -69,11 +69,11 @@ static void test_fade(SkCanvas* canvas) {
canvas->clipRect(r);
r.fBottom = SkIntToScalar(20);
- canvas->saveLayer(&r, NULL, (SkCanvas::SaveFlags)(SkCanvas::kHasAlphaLayer_SaveFlag | SkCanvas::kFullColorLayer_SaveFlag));
+ canvas->saveLayer(&r, NULL);
r.fTop = SkIntToScalar(80);
r.fBottom = SkIntToScalar(100);
- canvas->saveLayer(&r, NULL, (SkCanvas::SaveFlags)(SkCanvas::kHasAlphaLayer_SaveFlag | SkCanvas::kFullColorLayer_SaveFlag));
+ canvas->saveLayer(&r, NULL);
// now draw the "content"
@@ -203,7 +203,7 @@ protected:
r.set(SkIntToScalar(0), SkIntToScalar(0),
SkIntToScalar(220), SkIntToScalar(60));
- canvas->saveLayer(&r, &p, (SkCanvas::SaveFlags)(SkCanvas::kHasAlphaLayer_SaveFlag | SkCanvas::kFullColorLayer_SaveFlag));
+ canvas->saveLayer(&r, &p);
r.set(SkIntToScalar(0), SkIntToScalar(0),
SkIntToScalar(220), SkIntToScalar(120));
diff --git a/samplecode/SampleXfermodesBlur.cpp b/samplecode/SampleXfermodesBlur.cpp
index cae415d9d0..ea9561dfe1 100644
--- a/samplecode/SampleXfermodesBlur.cpp
+++ b/samplecode/SampleXfermodesBlur.cpp
@@ -180,7 +180,7 @@ protected:
p.setShader(s);
canvas->drawRect(r, p);
- canvas->saveLayer(&r, NULL, SkCanvas::kARGB_ClipLayer_SaveFlag);
+ canvas->saveLayer(&r, NULL);
draw_mode(canvas, mode, twice ? 0x88 : 0xFF, r.fLeft, r.fTop);
canvas->restore();