forked from firka/flutter
SkyShell DCHECKs on startup sometimes
Sometimes we try to draw a 0x0 picture. We shouldn't bother trying to turn a 0x0 picture into actual pixels. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/984153004
This commit is contained in:
@@ -44,9 +44,13 @@ void Rasterizer::Draw(skia::RefPtr<SkPicture> picture) {
|
||||
if (!surface_)
|
||||
return;
|
||||
|
||||
gfx::Size size = GetSize(picture.get());
|
||||
if (size.IsEmpty())
|
||||
return;
|
||||
|
||||
EnsureGLContext();
|
||||
CHECK(context_->MakeCurrent(surface_.get()));
|
||||
EnsureGaneshSurface(GetSize(picture.get()));
|
||||
EnsureGaneshSurface(size);
|
||||
|
||||
SkCanvas* canvas = ganesh_surface_->canvas();
|
||||
canvas->drawPicture(picture.get());
|
||||
|
||||
Reference in New Issue
Block a user