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

Unified Diff: ui/gfx/compositor/layer.cc

Issue 8400014: Fix visibility on WebLayer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 2 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
« no previous file with comments | « no previous file | ui/gfx/compositor/layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/layer.cc
diff --git a/ui/gfx/compositor/layer.cc b/ui/gfx/compositor/layer.cc
index 2868f4d08a76046d657ec61a804973fcb9474a09..a075137abeb62211f70f3731a316d8815bd33adb 100644
--- a/ui/gfx/compositor/layer.cc
+++ b/ui/gfx/compositor/layer.cc
@@ -186,6 +186,10 @@ void Layer::SetVisible(bool visible) {
bool was_drawn = IsDrawn();
visible_ = visible;
+#if defined(USE_WEBKIT_COMPOSITOR)
+ // TODO(piman): Expose a visibility flag on WebLayer.
+ web_layer_.setOpacity(visible_ ? opacity_ : 0.f);
+#endif
bool is_drawn = IsDrawn();
if (was_drawn == is_drawn)
return;
@@ -193,10 +197,6 @@ void Layer::SetVisible(bool visible) {
if (!is_drawn)
DropTextures();
SetNeedsToRecomputeHole();
-#if defined(USE_WEBKIT_COMPOSITOR)
- // TODO(piman): Expose a visibility flag on WebLayer.
- web_layer_.setOpacity(visible_ ? opacity_ : 0.f);
-#endif
}
bool Layer::IsDrawn() const {
« no previous file with comments | « no previous file | ui/gfx/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698