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

Unified Diff: cc/layer_impl.cc

Issue 12093067: Handle ui::Layer's visibility using cc::Layer's m_isDrawable flag (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 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/layer_impl.cc
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
index 2788c725035c733b07e858c8163f4cf763257b2f..89e86027086c9082ccc1f8f8cf16b57e4ec04b21 100644
--- a/cc/layer_impl.cc
+++ b/cc/layer_impl.cc
@@ -48,6 +48,7 @@ LayerImpl::LayerImpl(LayerTreeImpl* treeImpl, int id)
, m_drawCheckerboardForMissingTiles(false)
, m_drawsContent(false)
, m_forceRenderSurface(false)
+ , m_visible(true)
, m_isContainerForFixedPositionLayers(false)
, m_fixedToContainerLayer(false)
, m_drawDepth(0)
@@ -329,6 +330,7 @@ void LayerImpl::pushPropertiesTo(LayerImpl* layer)
layer->setDrawCheckerboardForMissingTiles(m_drawCheckerboardForMissingTiles);
layer->setForceRenderSurface(m_forceRenderSurface);
layer->setDrawsContent(drawsContent());
+ layer->setVisible(visible());
layer->setFilters(filters());
layer->setFilter(filter());
layer->setBackgroundFilters(backgroundFilters());
@@ -644,6 +646,15 @@ void LayerImpl::setDrawsContent(bool drawsContent)
noteLayerPropertyChanged();
}
+void LayerImpl::setVisible(bool visible)
+{
+ if (m_visible == visible)
+ return;
+
+ m_visible = visible;
+ noteLayerSurfacePropertyChanged();
+}
+
void LayerImpl::setAnchorPoint(const gfx::PointF& anchorPoint)
{
if (m_anchorPoint == anchorPoint)
« cc/layer.h ('K') | « cc/layer_impl.h ('k') | cc/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698