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

Unified Diff: ui/compositor/layer.h

Issue 25961002: Retain tray bubble's rounded corners when the bubble animates out (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/compositor/layer.cc » ('j') | ui/compositor/layer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index d308f607716629d1d0c2ea0cb6f74b39652bc062..be8bbb98f8e0130f97c403968592b082f947c2ea 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -196,13 +196,12 @@ class COMPOSITOR_EXPORT Layer
// otherwise.
float GetTargetOpacity() const;
- // Set a layer mask for a layer.
+ // Set a layer mask for a layer. This transfers the ownership of |layer_mask|;
+ // a mask layer can only be transferred to one layer.
// Note the provided layer mask can neither have a layer mask itself nor can
- // it have any children. The ownership of |layer_mask| will not be
- // transferred with this call.
- // Furthermore: A mask layer can only be set to one layer.
+ // it have any children.
void SetMaskLayer(Layer* layer_mask);
piman 2013/10/04 03:44:39 Make this take a scoped_ptr<Layer>, to indicate it
michaelpg 2013/10/04 05:56:41 Done.
- Layer* layer_mask_layer() { return layer_mask_; }
+ Layer* layer_mask_layer() { return layer_mask_.get(); }
// 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.
@@ -449,8 +448,8 @@ class COMPOSITOR_EXPORT Layer
float layer_grayscale_;
bool layer_inverted_;
- // The associated mask layer with this layer.
- Layer* layer_mask_;
+ // The mask layer associated with this layer.
+ scoped_ptr<Layer> layer_mask_;
// The back link from the mask layer to it's associated masked layer.
// We keep this reference for the case that if the mask layer gets deleted
// while attached to the main layer before the main layer is deleted.
« no previous file with comments | « no previous file | ui/compositor/layer.cc » ('j') | ui/compositor/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698