Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: sky/shell/gpu/rasterizer.cc

Issue 984153004: SkyShell DCHECKs on startup sometimes (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/gpu/rasterizer.cc
diff --git a/sky/shell/gpu/rasterizer.cc b/sky/shell/gpu/rasterizer.cc
index d841ea8a478f3ec0b0becac9eb4c7227c8ed98e2..8fb6836aafcd7741f577693a73ef251013b7dae6 100644
--- a/sky/shell/gpu/rasterizer.cc
+++ b/sky/shell/gpu/rasterizer.cc
@@ -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());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698