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

Unified Diff: cc/resources/picture_pile_impl.cc

Issue 232843006: cc: Discard SkCanvas (frame-buffer) before rasterization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved discard to RasterToBitmap Created 6 years, 8 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: cc/resources/picture_pile_impl.cc
diff --git a/cc/resources/picture_pile_impl.cc b/cc/resources/picture_pile_impl.cc
index 3f8e167b3c5d067e2531401ba21da2698691604c..8caeb687846834dce7eaca9fbadd132f9e377186 100644
--- a/cc/resources/picture_pile_impl.cc
+++ b/cc/resources/picture_pile_impl.cc
@@ -97,6 +97,9 @@ void PicturePileImpl::RasterToBitmap(
const gfx::Rect& canvas_rect,
float contents_scale,
RenderingStatsInstrumentation* rendering_stats_instrumentation) {
+ DCHECK(canvas->getBaseLayerSize().equals(canvas_rect.width(),
+ canvas_rect.height()));
reveman 2014/05/09 00:56:29 Should we really require this? In that case, shoul
alokp 2014/05/09 20:13:04 We do not require it as far as the API is concerne
reveman 2014/05/10 00:34:52 I think I prefer if you didn't add this DCHECK. Wi
alokp 2014/05/12 18:45:33 OK. Removed DCHECK. I think we should make it clea
reveman 2014/05/12 18:51:38 Yea, that wouldn't hurt. Feel free to add a commen
+ canvas->discard();
if (clear_canvas_with_debug_color_) {
// Any non-painted areas will be left in this color.
canvas->clear(DebugColors::NonPaintedFillColor());
« 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