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

Unified Diff: cc/layer.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
« cc/layer.h ('K') | « cc/layer.h ('k') | cc/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer.cc
diff --git a/cc/layer.cc b/cc/layer.cc
index 7b701554ce9d97f0c95366109d4c406916d87363..c23cbd033d4f0b5617fd83181cb094f89d3425a6 100644
--- a/cc/layer.cc
+++ b/cc/layer.cc
@@ -42,6 +42,7 @@ Layer::Layer()
, m_isContainerForFixedPositionLayers(false)
, m_fixedToContainerLayer(false)
, m_isDrawable(false)
+ , m_visible(true)
, m_masksToBounds(false)
, m_contentsOpaque(false)
, m_doubleSided(true)
@@ -547,6 +548,15 @@ void Layer::setIsDrawable(bool isDrawable)
setNeedsCommit();
}
+void Layer::setVisible(bool visible)
+{
+ if (m_visible == visible)
+ return;
+
+ m_visible = visible;
+ setNeedsCommit();
+}
+
void Layer::setNeedsDisplayRect(const gfx::RectF& dirtyRect)
{
m_updateRect.Union(dirtyRect);
@@ -603,6 +613,7 @@ void Layer::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());
« cc/layer.h ('K') | « cc/layer.h ('k') | cc/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698