Home | History | Annotate | Download | only in compositor

Lines Matching defs:Layer

37 class Layer;
51 // Layer manages a texture, transform and a set of child Layers. Any View that
52 // has enabled layers ends up creating a Layer to manage the texture.
53 // A Layer can also be created without a texture, in which case it renders
58 // NOTE: unlike Views, each Layer does *not* own its children views. If you
59 // delete a Layer and it has children, the parent of each child layer is set to
61 class COMPOSITOR_EXPORT Layer
67 Layer();
68 explicit Layer(LayerType type);
69 virtual ~Layer();
71 // Retrieves the Layer's compositor. The Layer will walk up its parent chain
72 // to locate it. Returns NULL if the Layer is not attached to a compositor.
75 // Called by the compositor when the Layer is set as its root Layer. This can
76 // only ever be called on the root layer.
82 // Adds a new Layer to this Layer.
83 void Add(Layer* child);
85 // Removes a Layer from this Layer.
86 void Remove(Layer* child);
89 void StackAtTop(Layer* child);
92 // layer. Note that if |child| is initially stacked even higher, calling this
94 void StackAbove(Layer* child, Layer* other);
97 void StackAtBottom(Layer* child);
100 // layer.
101 void StackBelow(Layer* child, Layer* other);
104 const std::vector<Layer*>& children() const { return children_; }
107 const Layer* parent() const { return parent_; }
108 Layer* parent() { return parent_; }
112 // Returns true if this Layer contains |other| somewhere in its children.
113 bool Contains(const Layer* other) const;
115 // The layer's animator is responsible for causing automatic animations when
117 // handles blending of animations. The layer takes ownership of the animator.
120 // Returns the layer's animator. Creates a default animator of one has not
141 // bounds of this layer.
145 // The opacity of the layer. The opacity is applied to each pixel of the
150 // Returns the actual opacity, which the opacity of this layer multipled by
154 // Blur pixels by this amount in anything below the layer and visible through
155 // the layer.
159 // Saturate all pixels of this layer by this amount.
165 // Change the brightness of all pixels from this layer by this amount.
175 // Change the grayscale of all pixels from this layer by this amount.
189 // Invert the layer.
197 // Set a layer mask for a layer.
198 // Note the provided layer mask can neither have a layer mask itself nor can
201 // Furthermore: A mask layer can only be set to one layer.
202 void SetMaskLayer(Layer* layer_mask);
203 Layer* layer_mask_layer() { return layer_mask_; }
205 // Sets the visibility of the Layer. A Layer may be visible but not
206 // drawn. This happens if any ancestor of a Layer is not visible.
214 // Returns true if this Layer is drawn. A Layer is drawn only if all ancestors
218 // Returns true if this layer can have a texture (has_texture_ is true)
223 // |target|. Necessarily, |source| and |target| must inhabit the same Layer
225 static void ConvertPointToLayer(const Layer* source,
226 const Layer* target,
231 // ancestor of this layer).
232 bool GetTargetTransformRelativeTo(const Layer* ancestor,
235 // Converts a ui::Layer's transform to the transform on the corresponding
236 // cc::Layer.
255 // Set new TextureMailbox for this layer. Note that |mailbox| may hold a
272 // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR.
275 // Adds |invalid_rect| to the Layer's pending invalid rect and calls
279 // Schedules a redraw of the layer tree at the compositor.
280 // Note that this _does not_ invalidate any region of this layer; use
292 // Notifies the layer that the device scale factor has changed.
295 // Sets whether the layer should scale its content. If true, the canvas will
303 // Returns true if the layer scales its content.
306 // Sometimes the Layer is being updated by something other than SetCanvas
310 // Requets a copy of the layer's output as a texture or bitmap.
318 cc::Layer* cc_layer() { return cc_layer_; }
328 // Forces a render surface to be used on this layer. This has no positive
336 // Whether this layer has animations waiting to get sent to its cc::Layer.
347 void StackRelativeTo(Layer* child, Layer* other, bool above);
349 bool ConvertPointForAncestor(const Layer* ancestor, gfx::Point* point) const;
350 bool ConvertPointFromAncestor(const Layer* ancestor, gfx::Point* point) const;
389 // Set all filters which got applied to the layer.
392 // Set all filters which got applied to the layer background.
397 void SwitchToLayer(scoped_refptr<cc::Layer> new_layer);
400 // layer tree. Instead, we hold on to these animations in
411 Layer* parent_;
413 // This layer's children, in bottom-to-top stacking order.
414 std::vector<Layer*> children_;
418 // Visibility of this layer. See SetVisible/IsDrawn for more details.
425 // If true the layer is always up to date.
435 // the layer.
441 // The associated mask layer with this layer.
442 Layer* layer_mask_;
443 // The back link from the mask layer to it's associated masked layer.
444 // We keep this reference for the case that if the mask layer gets deleted
445 // while attached to the main layer before the main layer is deleted.
446 Layer* layer_mask_back_link_;
448 // The zoom factor to scale the layer by. Zooming is disabled when this is
461 // Animations that are passed to AddThreadedAnimation before this layer is
465 // Ownership of the layer is held through one of the strongly typed layer
466 // pointers, depending on which sort of layer this is.
471 cc::Layer* cc_layer_;
473 // If true, the layer scales the canvas and the texture with the device scale
490 DISALLOW_COPY_AND_ASSIGN(Layer);