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

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

Issue 8136005: Makes visbility inherited. That is, in order for a window to be (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk 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 | « ui/aura_shell/examples/window_type_launcher.cc ('k') | ui/gfx/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/layer.h
diff --git a/ui/gfx/compositor/layer.h b/ui/gfx/compositor/layer.h
index af9f76a71c96b86f7431decbb15e47969adf4b28..5043ff51cd09a624ab0524b7731c5fa44b45c446 100644
--- a/ui/gfx/compositor/layer.h
+++ b/ui/gfx/compositor/layer.h
@@ -102,10 +102,14 @@ class COMPOSITOR_EXPORT Layer : public LayerAnimatorDelegate {
float opacity() const { return opacity_; }
void SetOpacity(float opacity);
- // Sets |visible_|. The Layer is drawn by Draw() only when visible_ is true.
- bool visible() const { return visible_; }
+ // Sets the visibility of the Layer. A Layer may be visible but not
+ // drawn. This happens if any ancestor of a Layer is not visible.
void SetVisible(bool visible);
+ // Returns true if this Layer is drawn. A Layer is drawn only if all ancestors
+ // are visible.
+ bool IsDrawn() const;
+
// Returns true if this layer can have a texture (has_texture_ is true)
// and is not completely obscured by a child.
bool ShouldDraw();
@@ -244,6 +248,7 @@ class COMPOSITOR_EXPORT Layer : public LayerAnimatorDelegate {
gfx::Rect bounds_;
+ // Visibility of this layer. See SetVisible/IsDrawn for more details.
bool visible_;
bool fills_bounds_opaquely_;
« no previous file with comments | « ui/aura_shell/examples/window_type_launcher.cc ('k') | ui/gfx/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698