mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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:
parent
31489a771b
commit
1a573cf3eb
@ -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());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user