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
This commit is contained in:
senorblanco 2015-04-08 12:36:08 -07:00 committed by Commit bot
parent a0219f1565
commit aad8b27ec6
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ protected:
}
void onDraw(SkCanvas* canvas) override {
canvas->clear(0x00000000);
canvas->clear(SK_ColorBLACK);
{
SkRect srcRect = SkRect::MakeXYWH(20, 20, 30, 30);
SkRect dstRect = SkRect::MakeXYWH(0, 10, 60, 60);

View File

@ -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);