Commit cebf66f4 authored by caseq@chromium.org's avatar caseq@chromium.org

Paint Profiler: erase bitmap before replaying SkPicture

We used to have garbage in resulting bitmap if we abort redraw before fill commands
in SkPicture are executed.

BUG=426100,426102

Review URL: https://codereview.chromium.org/654843010

git-svn-id: svn://svn.chromium.org/blink/trunk@184363 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 10b841ad
...@@ -104,6 +104,7 @@ PassOwnPtr<Vector<char> > GraphicsContextSnapshot::replay(unsigned fromStep, uns ...@@ -104,6 +104,7 @@ PassOwnPtr<Vector<char> > GraphicsContextSnapshot::replay(unsigned fromStep, uns
int height = ceil(scale * m_picture->height()); int height = ceil(scale * m_picture->height());
SkBitmap bitmap; SkBitmap bitmap;
bitmap.allocPixels(SkImageInfo::MakeN32Premul(width, height)); bitmap.allocPixels(SkImageInfo::MakeN32Premul(width, height));
bitmap.eraseARGB(0, 0, 0, 0);
{ {
ReplayingCanvas canvas(bitmap, fromStep, toStep); ReplayingCanvas canvas(bitmap, fromStep, toStep);
canvas.scale(scale, scale); canvas.scale(scale, scale);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment