Fix memory leak in pixelxorxfermode GM
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1633773002 TBR=jvanverth@google.com Review URL: https://codereview.chromium.org/1633773002
This commit is contained in:
parent
d2ccc772d4
commit
914bd435a8
@ -49,7 +49,7 @@ protected:
|
||||
// the green & blue channels alone
|
||||
SkPaint p1;
|
||||
p1.setColor(SK_ColorBLACK); // noop
|
||||
p1.setXfermode(SkPixelXorXfermode::Create(SK_ColorRED));
|
||||
p1.setXfermode(SkPixelXorXfermode::Create(SK_ColorRED))->unref();
|
||||
|
||||
canvas->drawRect(r, p1);
|
||||
|
||||
@ -58,7 +58,7 @@ protected:
|
||||
// Negate the dst color via the src color
|
||||
SkPaint p2;
|
||||
p2.setColor(SK_ColorWHITE);
|
||||
p2.setXfermode(SkPixelXorXfermode::Create(SK_ColorBLACK)); // noop
|
||||
p2.setXfermode(SkPixelXorXfermode::Create(SK_ColorBLACK))->unref(); // noop
|
||||
|
||||
canvas->drawRect(r, p2);
|
||||
|
||||
@ -67,7 +67,7 @@ protected:
|
||||
// Just return the original color
|
||||
SkPaint p3;
|
||||
p3.setColor(SK_ColorBLACK); // noop
|
||||
p3.setXfermode(SkPixelXorXfermode::Create(SK_ColorBLACK)); // noop
|
||||
p3.setXfermode(SkPixelXorXfermode::Create(SK_ColorBLACK))->unref(); // noop
|
||||
|
||||
canvas->drawRect(r, p3);
|
||||
|
||||
@ -77,7 +77,7 @@ protected:
|
||||
// the blue channel alone
|
||||
SkPaint p4;
|
||||
p4.setColor(SK_ColorBLACK); // noop
|
||||
p4.setXfermode(SkPixelXorXfermode::Create(SK_ColorYELLOW));
|
||||
p4.setXfermode(SkPixelXorXfermode::Create(SK_ColorYELLOW))->unref();
|
||||
|
||||
canvas->drawRect(r, p4);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user