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

Unified Diff: cc/resources/tile_manager.cc

Issue 578843002: cc: Return a NullCanvas instead of NULL in context lost situations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update unit test Created 6 years, 3 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 | « cc/resources/resource_provider_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.cc
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index b96151e5cc037fe5e9370e96ceb8df3606fd56b3..55fb6267a460a0901e9b9e59c8c061298fb9de3e 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -123,9 +123,7 @@ class RasterTaskImpl : public RasterTask {
devtools_instrumentation::kRasterTask, layer_id_);
skia::RefPtr<SkCanvas> canvas = raster_buffer_->AcquireSkCanvas();
- if (!canvas)
- return;
- canvas->save();
+ DCHECK(canvas);
skia::RefPtr<SkDrawFilter> draw_filter;
switch (raster_mode_) {
@@ -164,7 +162,6 @@ class RasterTaskImpl : public RasterTask {
100);
}
- canvas->restore();
raster_buffer_->ReleaseSkCanvas(canvas);
}
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698