Chromium Code Reviews| Index: ui/gfx/compositor/layer.h |
| diff --git a/ui/gfx/compositor/layer.h b/ui/gfx/compositor/layer.h |
| index f98021de9ef6f64612a9a03d25e695afd62bcb01..a410e6e2394ad5d41614d5bc329f84372ed3082a 100644 |
| --- a/ui/gfx/compositor/layer.h |
| +++ b/ui/gfx/compositor/layer.h |
| @@ -185,6 +185,15 @@ class COMPOSITOR_EXPORT Layer : public LayerAnimatorDelegate { |
| // delegate. |
| void UpdateLayerCanvas(); |
| + // Resets |hole_rect_| to the empty rect for all layers below and |
| + // including this one. |
| + void ClearHoleRects(); |
| + |
| + // Does a preorder traversal of layers starting with this layer. Omits layers |
| + // which cannot punch a hole in another layer such as non visible layers |
|
sky
2011/10/24 15:44:52
'in another' -> 'in another'
|
| + // and layers which don't fill their bounds opaquely. |
| + void GeneratePreorderTraversal(std::vector<ui::Layer*>* layer_traversal); |
| + |
| // A hole in a layer is an area in the layer that does not get drawn |
| // because this area is covered up with another layer which is known to be |
| // opaque. |
| @@ -194,9 +203,9 @@ class COMPOSITOR_EXPORT Layer : public LayerAnimatorDelegate { |
| // view has no transform with respect to its parent. |
| void RecomputeHole(); |
| - // Returns true if the layer paints every pixel (fills_bounds_opaquely) |
| - // and the alpha of the layer is 1.0f. |
| - bool IsCompletelyOpaque() const; |
| + void set_hole_rect(const gfx::Rect& hole_rect) { |
| + hole_rect_ = hole_rect; |
| + } |
| // Determines the regions that don't intersect |rect| and places the |
| // result in |sides|. |
| @@ -216,6 +225,9 @@ class COMPOSITOR_EXPORT Layer : public LayerAnimatorDelegate { |
| const gfx::Rect& region_to_punch_out, |
| std::vector<gfx::Rect>* sides); |
| + // Drops texture just for this layer. |
| + void DropTexture(); |
| + |
| // Drop all textures for layers below and including this one. Called when |
| // the layer is removed from a hierarchy. Textures will be re-generated if |
| // the layer is subsequently re-attached and needs to be drawn. |