summaryrefslogtreecommitdiffstats
path: root/cc/layers/io_surface_layer.cc
diff options
context:
space:
mode:
authorawoloszyn@chromium.org <awoloszyn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-11 17:39:54 +0000
committerawoloszyn@chromium.org <awoloszyn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-11 17:41:20 +0000
commitad63b2ffb295d0de395b83faeff6125475f0f5c4 (patch)
tree1d867e1db456fd4bb95f5e0a202e7005d5f6ae85 /cc/layers/io_surface_layer.cc
parent6ebf79234c9c16a3611a05f481e845433ddd7271 (diff)
downloadchromium_src-ad63b2ffb295d0de395b83faeff6125475f0f5c4.zip
chromium_src-ad63b2ffb295d0de395b83faeff6125475f0f5c4.tar.gz
chromium_src-ad63b2ffb295d0de395b83faeff6125475f0f5c4.tar.bz2
Keeping track of descendants that draw content instead of recalcualting
This is a required for removing Render Surface creation from CalcDrawProps. BUG=386788 Review URL: https://codereview.chromium.org/373113003 Cr-Commit-Position: refs/heads/master@{#288740} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288740 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/io_surface_layer.cc')
-rw-r--r--cc/layers/io_surface_layer.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/cc/layers/io_surface_layer.cc b/cc/layers/io_surface_layer.cc
index 98d3dfe..0682aee 100644
--- a/cc/layers/io_surface_layer.cc
+++ b/cc/layers/io_surface_layer.cc
@@ -20,6 +20,7 @@ void IOSurfaceLayer::SetIOSurfaceProperties(uint32_t io_surface_id,
const gfx::Size& size) {
io_surface_id_ = io_surface_id;
io_surface_size_ = size;
+ UpdateDrawsContent(HasDrawableContent());
SetNeedsCommit();
}
@@ -28,8 +29,8 @@ scoped_ptr<LayerImpl> IOSurfaceLayer::CreateLayerImpl(
return IOSurfaceLayerImpl::Create(tree_impl, layer_id_).PassAs<LayerImpl>();
}
-bool IOSurfaceLayer::DrawsContent() const {
- return io_surface_id_ && Layer::DrawsContent();
+bool IOSurfaceLayer::HasDrawableContent() const {
+ return io_surface_id_ && Layer::HasDrawableContent();
}
void IOSurfaceLayer::PushPropertiesTo(LayerImpl* layer) {