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

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

Issue 8368013: Improve Aura overdraw by changing hole calculation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nicer diff 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.cc » ('j') | ui/gfx/compositor/layer.cc » ('J')
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 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.
« no previous file with comments | « no previous file | ui/gfx/compositor/layer.cc » ('j') | ui/gfx/compositor/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698