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

Unified Diff: cc/resources/picture.cc

Issue 253013003: Enable disabling WebCore::GraphicsContext in telemetry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed git issues. 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
Index: cc/resources/picture.cc
diff --git a/cc/resources/picture.cc b/cc/resources/picture.cc
index 48f03e0ba842a864975eef07cb8e19cf2988db4f..d9e2931536014664edf83d9021cc527ac58b25dd 100644
--- a/cc/resources/picture.cc
+++ b/cc/resources/picture.cc
@@ -261,6 +261,8 @@ void Picture::Record(ContentLayerClient* painter,
&factory,
SkPicture::kUsePathBoundsForClip_RecordingFlag));
+ bool disableGraphicsContext = false;
Sami 2014/04/29 10:57:23 hacker_style here too.
Stephen Chennney 2014/04/29 20:30:45 Done.
+
switch (recording_mode) {
case RECORD_NORMALLY:
// Already setup for normal recording
@@ -269,9 +271,8 @@ void Picture::Record(ContentLayerClient* painter,
canvas = skia::AdoptRef(SkCreateNullCanvas());
break;
case RECORD_WITH_PAINTING_DISABLED:
- // Blink's GraphicsContext will disable painting when given a NULL
- // canvas.
- canvas.clear();
+ // We pass a disable flag through the paint calls
Sami 2014/04/29 10:57:23 nit: end comments with punctuation.
Stephen Chennney 2014/04/29 20:30:45 Done.
+ disableGraphicsContext = true;
break;
default:
NOTREACHED();
@@ -290,7 +291,8 @@ void Picture::Record(ContentLayerClient* painter,
}
gfx::RectF opaque_layer_rect;
- painter->PaintContents(canvas.get(), layer_rect_, &opaque_layer_rect);
+ painter->PaintContents(
+ canvas.get(), layer_rect_, &opaque_layer_rect, disableGraphicsContext);
if (canvas)
canvas->restore();

Powered by Google App Engine
This is Rietveld 408576698