Skip to content

Commit

Permalink
Merge pull request flutter#618 from abarth/clear_black
Browse files Browse the repository at this point in the history
Clear the frame to black before drawing
  • Loading branch information
abarth committed Aug 14, 2015
2 parents 33ec74a + 011ce5d commit 810c2a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions services/sky/compositor/rasterizer_bitmap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ scoped_ptr<mojo::GLTexture> RasterizerBitmap::Rasterize(SkPicture* picture) {

SkBitmapDevice device(bitmap_);
SkCanvas canvas(&device);
// Draw red so we can see when we fail to paint.
canvas.drawColor(SK_ColorRED);
canvas.clear(SK_ColorBLACK);
canvas.drawPicture(picture);
canvas.flush();

Expand Down
1 change: 1 addition & 0 deletions services/sky/compositor/rasterizer_ganesh.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ scoped_ptr<mojo::GLTexture> RasterizerGanesh::Rasterize(SkPicture* picture) {
host_->resource_manager()->CreateTexture(size));

SkCanvas* canvas = surface.canvas();
canvas->clear(SK_ColorBLACK);
canvas->drawPicture(picture);
canvas->flush();

Expand Down
1 change: 1 addition & 0 deletions sky/shell/gpu/rasterizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ void Rasterizer::Draw(PassRefPtr<SkPicture> picture) {
void Rasterizer::DrawPicture(SkPicture* picture) {
TRACE_EVENT0("sky", "Rasterizer::DrawPicture");
SkCanvas* canvas = ganesh_surface_->canvas();
canvas->clear(SK_ColorBLACK);
canvas->drawPicture(picture);
canvas->flush();
}
Expand Down

0 comments on commit 810c2a6

Please sign in to comment.