提交 011ce5d8 编写于 作者: A Adam Barth

Clear the frame to black before drawing

We used to do this in the SkPicture, but it's simpler to do it in the
rasterizer now that we're using multiple SkPictures in Dart.
上级 33ec74a4
......@@ -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();
......
......@@ -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();
......
......@@ -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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册