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

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

Issue 9288053: Remove old (pre-webkit) compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 8 years, 11 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/gfx/compositor/debug_utils.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 51dd4caed398bbfeec7fd18c6a4c9cadcef0a10e..b1477cbbf456e10efc33f57ef6b02d4177620193 100644
--- a/ui/gfx/compositor/layer.h
+++ b/ui/gfx/compositor/layer.h
@@ -152,12 +152,6 @@ class COMPOSITOR_EXPORT Layer :
void SetFillsBoundsOpaquely(bool fills_bounds_opaquely);
bool fills_bounds_opaquely() const { return fills_bounds_opaquely_; }
- // Returns the invalid rectangle. That is, the region of the layer that needs
- // to be repainted. This is exposed for testing and isn't generally useful.
- const gfx::Rect& invalid_rect() const { return invalid_rect_; }
-
- const gfx::Rect& hole_rect() const { return hole_rect_; }
-
const std::string& name() const { return name_; }
void set_name(const std::string& name) { name_ = name; }
@@ -179,13 +173,6 @@ class COMPOSITOR_EXPORT Layer :
// Schedules a redraw of the layer tree at the compositor.
void ScheduleDraw();
- // Does drawing for the layer.
- void Draw();
-
- // Draws a tree of Layers, by calling Draw() on each in the hierarchy starting
- // with the receiver.
- void DrawTree();
-
// Sometimes the Layer is being updated by something other than SetCanvas
// (e.g. the GPU process on UI_COMPOSITOR_IMAGE_TRANSPORT).
bool layer_updated_externally() const { return layer_updated_externally_; }
@@ -193,9 +180,7 @@ class COMPOSITOR_EXPORT Layer :
// WebContentLayerClient
virtual void paintContents(WebKit::WebCanvas*, const WebKit::WebRect& clip);
-#if defined(USE_WEBKIT_COMPOSITOR)
WebKit::WebLayer web_layer() { return web_layer_; }
-#endif
private:
struct LayerProperties {
@@ -210,66 +195,16 @@ class COMPOSITOR_EXPORT Layer :
// use the combined result, but this is only temporary.
float GetCombinedOpacity() const;
- // Called during the Draw() pass to freshen the Layer's contents from the
- // delegate.
- void UpdateLayerCanvas();
-
// Stacks |child| above or below |other|. Helper method for StackAbove() and
// StackBelow().
void StackRelativeTo(Layer* child, Layer* other, bool above);
- // Called to indicate that a layer's properties have changed and that the
- // holes for the layers must be recomputed.
- void SetNeedsToRecomputeHole();
-
- // 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
// and layers which don't fill their bounds opaquely.
void GetLayerProperties(const ui::Transform& current_transform,
std::vector<LayerProperties>* traverasal);
- // 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.
- // This method computes the dimension of the hole (if there is one)
- // based on whether one of its child nodes is always opaque.
- // Note: This method should only be called from the root.
- void RecomputeHole();
-
- 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|.
- //
- // rect_____________________________
- // |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
- // |xxxxxxxxxxxxx top xxxxxxxxxxxxxx|
- // |________________________________|
- // |xxxxx| |xxxxx|
- // |xxxxx|region_to_punch_out |xxxxx|
- // |left | |right|
- // |_____|____________________|_____|
- // |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
- // |xxxxxxxxxx bottom xxxxxxxxxxxxxx|
- // |________________________________|
- static void PunchHole(const gfx::Rect& rect,
- 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.
- void DropTextures();
-
bool ConvertPointForAncestor(const Layer* ancestor, gfx::Point* point) const;
bool ConvertPointFromAncestor(const Layer* ancestor, gfx::Point* point) const;
@@ -296,12 +231,10 @@ class COMPOSITOR_EXPORT Layer :
virtual const Transform& GetTransformForAnimation() const OVERRIDE;
virtual float GetOpacityForAnimation() const OVERRIDE;
-#if defined(USE_WEBKIT_COMPOSITOR)
void CreateWebLayer();
void RecomputeTransform();
void RecomputeDrawsContentAndUVRect();
void RecomputeDebugBorderColor();
-#endif
const LayerType type_;
@@ -323,12 +256,6 @@ class COMPOSITOR_EXPORT Layer :
bool fills_bounds_opaquely_;
- gfx::Rect hole_rect_;
-
- bool recompute_hole_;
-
- gfx::Rect invalid_rect_;
-
// If true the layer is always up to date.
bool layer_updated_externally_;
@@ -340,11 +267,9 @@ class COMPOSITOR_EXPORT Layer :
scoped_ptr<LayerAnimator> animator_;
-#if defined(USE_WEBKIT_COMPOSITOR)
WebKit::WebLayer web_layer_;
bool web_layer_is_accelerated_;
bool show_debug_borders_;
-#endif
DISALLOW_COPY_AND_ASSIGN(Layer);
};
« no previous file with comments | « ui/gfx/compositor/debug_utils.cc ('k') | ui/gfx/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698