summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorajuma@chromium.org <ajuma@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-11 20:42:53 +0000
committerajuma@chromium.org <ajuma@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-11 20:42:53 +0000
commitf6d55aa82df0aa21b43beba4763a7f5cd87bce1b (patch)
treeca8885cdfeb9d0142dd2ff555635a6a3988fefae /webkit
parent2715264d68ec4905956f77abb8edf3e4b0cca597 (diff)
downloadchromium_src-f6d55aa82df0aa21b43beba4763a7f5cd87bce1b.zip
chromium_src-f6d55aa82df0aa21b43beba4763a7f5cd87bce1b.tar.gz
chromium_src-f6d55aa82df0aa21b43beba4763a7f5cd87bce1b.tar.bz2
Add a GPU rasterization hint to cc::PictureLayer
This adds a GPU rasterization hint to PictureLayer and PictureLayerImpl. When using hybrid rasterization (that is, when running with --enable-gpu-rasterization), only layers with a GPU rasterization hint are rasterized on the GPU. BUG=329722 Review URL: https://codereview.chromium.org/192973002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256304 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/renderer/compositor_bindings/web_content_layer_impl.cc7
-rw-r--r--webkit/renderer/compositor_bindings/web_content_layer_impl.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/webkit/renderer/compositor_bindings/web_content_layer_impl.cc b/webkit/renderer/compositor_bindings/web_content_layer_impl.cc
index 5a51481..9ae09fe 100644
--- a/webkit/renderer/compositor_bindings/web_content_layer_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_content_layer_impl.cc
@@ -46,6 +46,13 @@ void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable) {
layer_->layer()->SetDrawCheckerboardForMissingTiles(enable);
}
+void WebContentLayerImpl::setHasGpuRasterizationHint(bool has_hint) {
+ if (WebLayerImpl::UsingPictureLayer()) {
+ static_cast<PictureLayer*>(layer_->layer())
+ ->SetHasGpuRasterizationHint(has_hint);
+ }
+}
+
void WebContentLayerImpl::PaintContents(SkCanvas* canvas,
const gfx::Rect& clip,
gfx::RectF* opaque) {
diff --git a/webkit/renderer/compositor_bindings/web_content_layer_impl.h b/webkit/renderer/compositor_bindings/web_content_layer_impl.h
index f8b64f9..5ff88a3 100644
--- a/webkit/renderer/compositor_bindings/web_content_layer_impl.h
+++ b/webkit/renderer/compositor_bindings/web_content_layer_impl.h
@@ -30,6 +30,7 @@ class WebContentLayerImpl : public blink::WebContentLayer,
virtual blink::WebLayer* layer();
virtual void setDoubleSided(bool double_sided);
virtual void setDrawCheckerboardForMissingTiles(bool checkerboard);
+ virtual void setHasGpuRasterizationHint(bool has_hint);
protected:
virtual ~WebContentLayerImpl();