summaryrefslogtreecommitdiffstats
path: root/cc/layers/content_layer.cc
diff options
context:
space:
mode:
authorschenney@chromium.org <schenney@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-02 21:03:03 +0000
committerschenney@chromium.org <schenney@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-02 21:03:03 +0000
commit276172b8f1e00033c253301fa2bdd76cfc980800 (patch)
treeee9a60e4fb1540e00150e247656a216fc0c28a38 /cc/layers/content_layer.cc
parentced067e6da6e3092a00546ed820d9657a1707d91 (diff)
downloadchromium_src-276172b8f1e00033c253301fa2bdd76cfc980800.zip
chromium_src-276172b8f1e00033c253301fa2bdd76cfc980800.tar.gz
chromium_src-276172b8f1e00033c253301fa2bdd76cfc980800.tar.bz2
Enable disabling WebCore::GraphicsContext in telemetry.
Plumb a flag through from telemetry tests to the layer painting code that disables the WebCore::GraphicsContext. This allows us to isolate the various systems that paint web content in Chromium. R=nduca@chromium.org,skyostil@chromium.org BUG=350684 Review URL: https://codereview.chromium.org/253013003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267913 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/content_layer.cc')
-rw-r--r--cc/layers/content_layer.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/cc/layers/content_layer.cc b/cc/layers/content_layer.cc
index 7e0bee8..14a5864 100644
--- a/cc/layers/content_layer.cc
+++ b/cc/layers/content_layer.cc
@@ -28,7 +28,10 @@ void ContentLayerPainter::Paint(SkCanvas* canvas,
const gfx::Rect& content_rect,
gfx::RectF* opaque) {
base::TimeTicks paint_start = base::TimeTicks::HighResNow();
- client_->PaintContents(canvas, content_rect, opaque);
+ client_->PaintContents(canvas,
+ content_rect,
+ opaque,
+ ContentLayerClient::GRAPHICS_CONTEXT_ENABLED);
base::TimeTicks paint_end = base::TimeTicks::HighResNow();
// The start and end times might be the same if the paint was very fast or if
// our timer granularity is poor. Treat this as a very short time duration
@@ -163,7 +166,10 @@ skia::RefPtr<SkPicture> ContentLayer::GetPicture() const {
SkPictureRecorder recorder;
SkCanvas* canvas = recorder.beginRecording(width, height, NULL, 0);
- client_->PaintContents(canvas, gfx::Rect(width, height), &opaque);
+ client_->PaintContents(canvas,
+ gfx::Rect(width, height),
+ &opaque,
+ ContentLayerClient::GRAPHICS_CONTEXT_ENABLED);
skia::RefPtr<SkPicture> picture = skia::AdoptRef(recorder.endRecording());
return picture;
}