diff options
author | senorblanco <senorblanco@chromium.org> | 2015-04-08 12:36:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-08 12:36:08 -0700 |
commit | aad8b27ec6ff93b64f458be78a3eff7e91b10e15 (patch) | |
tree | 84a3724387dd70b0a1927920b2f5a70367c8ca3d /gm/pictureimagefilter.cpp | |
parent | a0219f15651a781e7cb8621189d5c2aa8d56da71 (diff) |
Use opaque black not transparent black as imagefilter GM background.
For some reason, GM's are now being composited against white
in some modes, where the alpha used to be ignored (or composited
against black, I'm not sure which). At any rate, it doesn't
make much sense to have alpha in the result anyway, so let's clear to
opaque black instead of transparent black and avoid the problem.
This is a trial balloon for bitmapsource and pictureimagefilter.
If all goes well, I'll make this change more widely.
R=scroggo
BUG=skia:3319
Review URL: https://codereview.chromium.org/1074513002
Diffstat (limited to 'gm/pictureimagefilter.cpp')
-rw-r--r-- | gm/pictureimagefilter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gm/pictureimagefilter.cpp b/gm/pictureimagefilter.cpp index a4cb6b3f5f..fd8ae62fa2 100644 --- a/gm/pictureimagefilter.cpp +++ b/gm/pictureimagefilter.cpp @@ -25,7 +25,7 @@ protected: void makePicture() { SkPictureRecorder recorder; SkCanvas* canvas = recorder.beginRecording(100, 100, NULL, 0); - canvas->clear(0x00000000); + canvas->clear(SK_ColorBLACK); SkPaint paint; paint.setAntiAlias(true); sk_tool_utils::set_portable_typeface(&paint); @@ -52,7 +52,7 @@ protected: } void onDraw(SkCanvas* canvas) override { - canvas->clear(0x00000000); + canvas->clear(SK_ColorBLACK); { SkRect srcRect = SkRect::MakeXYWH(20, 20, 30, 30); SkRect emptyRect = SkRect::MakeXYWH(20, 20, 0, 0); |