Chromium Code Reviews| Index: ui/compositor/layer.h |
| diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h |
| index f52c40fef37d4883efc5843b2a97343a7e96e77b..29239e666be145479a06e7e478e0c57ac979e12c 100644 |
| --- a/ui/compositor/layer.h |
| +++ b/ui/compositor/layer.h |
| @@ -284,13 +284,12 @@ class COMPOSITOR_EXPORT Layer |
| void ScheduleDraw(); |
| // Sends damaged rectangles recorded in |damaged_region_| to |
| - // |compostior_| to repaint the content. |
| + // |cc_layer_| to update dirty rect. |
|
danakj
2014/01/16 19:48:29
// Uses damaged rectangles recorded in |damaged_re
simonhong
2014/01/16 20:59:59
Done.
|
| void SendDamagedRects(); |
| const SkRegion& damaged_region() const { return damaged_region_; } |
| - // Suppresses painting the content by disgarding damaged region and ignoring |
| - // new paint requests. |
| + // Suppresses painting the content by deleting |delegate_|. |
|
danakj
2014/01/16 19:48:29
This disconnects the delegate - it doesn't delete
simonhong
2014/01/16 20:59:59
Modified to disconnecting |delegate_|.
|
| void SuppressPaint(); |
| // Notifies the layer that the device scale factor has changed. |
| @@ -298,7 +297,7 @@ class COMPOSITOR_EXPORT Layer |
| // Sets whether the layer should scale its content. If true, the canvas will |
| // be scaled in software rendering mode before it is passed to |
| - // |LayerDelegate::OnPaint|. |
| + // |LayerDelegate::OnPaintLayer|. |
| // Set to false if the delegate handles scaling. |
| // NOTE: if this is called during |LayerDelegate::OnPaint|, the new value will |
| // not apply to the canvas passed to the pending draw. |
| @@ -307,10 +306,6 @@ class COMPOSITOR_EXPORT Layer |
| // Returns true if the layer scales its content. |
| bool scale_content() const { return scale_content_; } |
| - // 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_; } |
| - |
| // Requets a copy of the layer's output as a texture or bitmap. |
| void RequestCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request); |
| @@ -337,7 +332,6 @@ class COMPOSITOR_EXPORT Layer |
| // LayerClient |
| virtual std::string DebugName() OVERRIDE; |
| - |
| virtual scoped_refptr<base::debug::ConvertableToTraceFormat> |
| TakeDebugInfo() OVERRIDE; |
| @@ -360,16 +354,6 @@ class COMPOSITOR_EXPORT Layer |
| bool ConvertPointForAncestor(const Layer* ancestor, gfx::Point* point) const; |
| bool ConvertPointFromAncestor(const Layer* ancestor, gfx::Point* point) const; |
| - // Following are invoked from the animation or if no animation exists to |
| - // update the values immediately. |
| - void SetBoundsImmediately(const gfx::Rect& bounds); |
| - void SetTransformImmediately(const gfx::Transform& transform); |
| - void SetOpacityImmediately(float opacity); |
| - void SetVisibilityImmediately(bool visibility); |
| - void SetBrightnessImmediately(float brightness); |
| - void SetGrayscaleImmediately(float grayscale); |
| - void SetColorImmediately(SkColor color); |
| - |
| // Implementation of LayerAnimatorDelegate |
| virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE; |
| virtual void SetTransformFromAnimation( |
| @@ -392,7 +376,10 @@ class COMPOSITOR_EXPORT Layer |
| scoped_ptr<cc::Animation> animation) OVERRIDE; |
| virtual void RemoveThreadedAnimation(int animation_id) OVERRIDE; |
| + // Creates a corresponding composited layer for |type_|. |
| void CreateWebLayer(); |
| + |
| + // Recomputes and sets to |cc_layer_|. |
| void RecomputeCCTransformFromTransform(const gfx::Transform& transform); |
| void RecomputeDrawsContentAndUVRect(); |
| void RecomputePosition(); |
| @@ -403,8 +390,7 @@ class COMPOSITOR_EXPORT Layer |
| // Set all filters which got applied to the layer background. |
| void SetLayerBackgroundFilters(); |
| - void UpdateIsDrawn(); |
| - |
| + // Cleanup |cc_layer_| and replaces it with |new_layer|. |
| void SwitchToLayer(scoped_refptr<cc::Layer> new_layer); |
| // We cannot send animations to our cc_layer_ until we have been added to a |
| @@ -429,13 +415,11 @@ class COMPOSITOR_EXPORT Layer |
| // Visibility of this layer. See SetVisible/IsDrawn for more details. |
| bool visible_; |
| + // See SetForceRenderSurface() for more details. |
|
danakj
2014/01/16 19:48:29
Is this really needed?
simonhong
2014/01/16 20:59:59
No.. I think it's redundant. Removed.
|
| bool force_render_surface_; |
| bool fills_bounds_opaquely_; |
| - // If true the layer is always up to date. |
| - bool layer_updated_externally_; |
| - |
| // Union of damaged rects, in pixel coordinates, to be used when |
| // compositor is ready to paint the content. |
| SkRegion damaged_region_; |