1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_
11 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/values.h"
14 #include "cc/animation/layer_animation_controller.h"
15 #include "cc/animation/layer_animation_value_observer.h"
16 #include "cc/animation/layer_animation_value_provider.h"
17 #include "cc/base/cc_export.h"
18 #include "cc/base/region.h"
19 #include "cc/base/scoped_ptr_vector.h"
20 #include "cc/input/input_handler.h"
21 #include "cc/layers/draw_properties.h"
22 #include "cc/layers/layer_lists.h"
23 #include "cc/layers/layer_position_constraint.h"
24 #include "cc/layers/render_surface_impl.h"
25 #include "cc/output/filter_operations.h"
26 #include "cc/quads/render_pass.h"
27 #include "cc/quads/shared_quad_state.h"
28 #include "cc/resources/resource_provider.h"
29 #include "skia/ext/refptr.h"
30 #include "third_party/skia/include/core/SkColor.h"
31 #include "third_party/skia/include/core/SkImageFilter.h"
32 #include "third_party/skia/include/core/SkPicture.h"
33 #include "ui/gfx/point3_f.h"
34 #include "ui/gfx/rect.h"
35 #include "ui/gfx/rect_f.h"
36 #include "ui/gfx/transform.h"
40 class ConvertableToTraceFormat;
43 class DictionaryValue;
48 class LayerTreeHostImpl;
50 class MicroBenchmarkImpl;
53 class ScrollbarAnimationController;
54 class ScrollbarLayerImplBase;
57 struct AppendQuadsData;
63 DRAW_MODE_RESOURCELESS_SOFTWARE
66 class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
67 public LayerAnimationValueProvider {
69 // Allows for the ownership of the total scroll offset to be delegated outside
71 class ScrollOffsetDelegate {
73 virtual void SetTotalScrollOffset(const gfx::Vector2dF& new_value) = 0;
74 virtual gfx::Vector2dF GetTotalScrollOffset() = 0;
75 virtual bool IsExternalFlingActive() const = 0;
78 typedef LayerImplList RenderSurfaceListType;
79 typedef LayerImplList LayerListType;
80 typedef RenderSurfaceImpl RenderSurfaceType;
82 enum RenderingContextConstants { NO_RENDERING_CONTEXT = 0 };
84 static scoped_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
85 return make_scoped_ptr(new LayerImpl(tree_impl, id));
90 int id() const { return layer_id_; }
92 // LayerAnimationValueProvider implementation.
93 virtual gfx::Vector2dF ScrollOffsetForAnimation() const OVERRIDE;
95 // LayerAnimationValueObserver implementation.
96 virtual void OnFilterAnimated(const FilterOperations& filters) OVERRIDE;
97 virtual void OnOpacityAnimated(float opacity) OVERRIDE;
98 virtual void OnTransformAnimated(const gfx::Transform& transform) OVERRIDE;
99 virtual void OnScrollOffsetAnimated(
100 const gfx::Vector2dF& scroll_offset) OVERRIDE;
101 virtual void OnAnimationWaitingForDeletion() OVERRIDE;
102 virtual bool IsActive() const OVERRIDE;
105 LayerImpl* parent() { return parent_; }
106 const LayerImpl* parent() const { return parent_; }
107 const OwnedLayerImplList& children() const { return children_; }
108 OwnedLayerImplList& children() { return children_; }
109 LayerImpl* child_at(size_t index) const { return children_[index]; }
110 void AddChild(scoped_ptr<LayerImpl> child);
111 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child);
112 void SetParent(LayerImpl* parent);
114 // Warning: This does not preserve tree structure invariants.
115 void ClearChildList();
117 bool HasAncestor(const LayerImpl* ancestor) const;
119 void SetScrollParent(LayerImpl* parent);
121 LayerImpl* scroll_parent() { return scroll_parent_; }
122 const LayerImpl* scroll_parent() const { return scroll_parent_; }
124 void SetScrollChildren(std::set<LayerImpl*>* children);
126 std::set<LayerImpl*>* scroll_children() { return scroll_children_.get(); }
127 const std::set<LayerImpl*>* scroll_children() const {
128 return scroll_children_.get();
131 void SetClipParent(LayerImpl* ancestor);
133 LayerImpl* clip_parent() {
136 const LayerImpl* clip_parent() const {
140 void SetClipChildren(std::set<LayerImpl*>* children);
142 std::set<LayerImpl*>* clip_children() { return clip_children_.get(); }
143 const std::set<LayerImpl*>* clip_children() const {
144 return clip_children_.get();
147 void PassCopyRequests(ScopedPtrVector<CopyOutputRequest>* requests);
148 // Can only be called when the layer has a copy request.
149 void TakeCopyRequestsAndTransformToTarget(
150 ScopedPtrVector<CopyOutputRequest>* request);
151 bool HasCopyRequest() const { return !copy_requests_.empty(); }
153 void SetMaskLayer(scoped_ptr<LayerImpl> mask_layer);
154 LayerImpl* mask_layer() { return mask_layer_.get(); }
155 const LayerImpl* mask_layer() const { return mask_layer_.get(); }
156 scoped_ptr<LayerImpl> TakeMaskLayer();
158 void SetReplicaLayer(scoped_ptr<LayerImpl> replica_layer);
159 LayerImpl* replica_layer() { return replica_layer_.get(); }
160 const LayerImpl* replica_layer() const { return replica_layer_.get(); }
161 scoped_ptr<LayerImpl> TakeReplicaLayer();
163 bool has_mask() const { return mask_layer_; }
164 bool has_replica() const { return replica_layer_; }
165 bool replica_has_mask() const {
166 return replica_layer_ && (mask_layer_ || replica_layer_->mask_layer_);
169 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; }
171 void PopulateSharedQuadState(SharedQuadState* state) const;
172 // WillDraw must be called before AppendQuads. If WillDraw returns false,
173 // AppendQuads and DidDraw will not be called. If WillDraw returns true,
174 // DidDraw is guaranteed to be called before another WillDraw or before
175 // the layer is destroyed. To enforce this, any class that overrides
176 // WillDraw/DidDraw must call the base class version only if WillDraw
178 virtual bool WillDraw(DrawMode draw_mode,
179 ResourceProvider* resource_provider);
180 virtual void AppendQuads(QuadSink* quad_sink,
181 AppendQuadsData* append_quads_data) {}
182 virtual void DidDraw(ResourceProvider* resource_provider);
184 virtual ResourceProvider::ResourceId ContentsResourceId() const;
186 virtual bool HasDelegatedContent() const;
187 virtual bool HasContributingDelegatedRenderPasses() const;
188 virtual RenderPass::Id FirstContributingRenderPassId() const;
189 virtual RenderPass::Id NextContributingRenderPassId(RenderPass::Id id) const;
191 virtual void UpdateTiles() {}
192 virtual void NotifyTileStateChanged(const Tile* tile) {}
194 virtual ScrollbarLayerImplBase* ToScrollbarLayer();
196 // Returns true if this layer has content to draw.
197 void SetDrawsContent(bool draws_content);
198 bool DrawsContent() const { return draws_content_; }
200 void SetHideLayerAndSubtree(bool hide);
201 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; }
203 bool force_render_surface() const { return force_render_surface_; }
204 void SetForceRenderSurface(bool force) { force_render_surface_ = force; }
206 void SetTransformOrigin(const gfx::Point3F& transform_origin);
207 gfx::Point3F transform_origin() const { return transform_origin_; }
209 void SetBackgroundColor(SkColor background_color);
210 SkColor background_color() const { return background_color_; }
211 // If contents_opaque(), return an opaque color else return a
212 // non-opaque color. Tries to return background_color(), if possible.
213 SkColor SafeOpaqueBackgroundColor() const;
215 void SetFilters(const FilterOperations& filters);
216 const FilterOperations& filters() const { return filters_; }
217 bool FilterIsAnimating() const;
218 bool FilterIsAnimatingOnImplOnly() const;
220 void SetBackgroundFilters(const FilterOperations& filters);
221 const FilterOperations& background_filters() const {
222 return background_filters_;
225 void SetMasksToBounds(bool masks_to_bounds);
226 bool masks_to_bounds() const { return masks_to_bounds_; }
228 void SetContentsOpaque(bool opaque);
229 bool contents_opaque() const { return contents_opaque_; }
231 void SetOpacity(float opacity);
232 float opacity() const { return opacity_; }
233 bool OpacityIsAnimating() const;
234 bool OpacityIsAnimatingOnImplOnly() const;
236 void SetBlendMode(SkXfermode::Mode);
237 SkXfermode::Mode blend_mode() const { return blend_mode_; }
238 bool uses_default_blend_mode() const {
239 return blend_mode_ == SkXfermode::kSrcOver_Mode;
242 void SetIsRootForIsolatedGroup(bool root);
243 bool is_root_for_isolated_group() const {
244 return is_root_for_isolated_group_;
247 void SetPosition(const gfx::PointF& position);
248 gfx::PointF position() const { return position_; }
250 void SetIsContainerForFixedPositionLayers(bool container) {
251 is_container_for_fixed_position_layers_ = container;
253 // This is a non-trivial function in Layer.
254 bool IsContainerForFixedPositionLayers() const {
255 return is_container_for_fixed_position_layers_;
258 gfx::Vector2dF FixedContainerSizeDelta() const;
260 void SetPositionConstraint(const LayerPositionConstraint& constraint) {
261 position_constraint_ = constraint;
263 const LayerPositionConstraint& position_constraint() const {
264 return position_constraint_;
267 void SetShouldFlattenTransform(bool flatten);
268 bool should_flatten_transform() const { return should_flatten_transform_; }
270 bool Is3dSorted() const { return sorting_context_id_ != 0; }
272 void SetUseParentBackfaceVisibility(bool use) {
273 use_parent_backface_visibility_ = use;
275 bool use_parent_backface_visibility() const {
276 return use_parent_backface_visibility_;
279 bool ShowDebugBorders() const;
281 // These invalidate the host's render surface layer list. The caller
282 // is responsible for calling set_needs_update_draw_properties on the tree
283 // so that its list can be recreated.
284 void CreateRenderSurface();
285 void ClearRenderSurface();
286 void ClearRenderSurfaceLayerList();
288 DrawProperties<LayerImpl>& draw_properties() {
289 return draw_properties_;
291 const DrawProperties<LayerImpl>& draw_properties() const {
292 return draw_properties_;
295 // The following are shortcut accessors to get various information from
297 const gfx::Transform& draw_transform() const {
298 return draw_properties_.target_space_transform;
300 const gfx::Transform& screen_space_transform() const {
301 return draw_properties_.screen_space_transform;
303 float draw_opacity() const { return draw_properties_.opacity; }
304 bool draw_opacity_is_animating() const {
305 return draw_properties_.opacity_is_animating;
307 bool draw_transform_is_animating() const {
308 return draw_properties_.target_space_transform_is_animating;
310 bool screen_space_transform_is_animating() const {
311 return draw_properties_.screen_space_transform_is_animating;
313 bool screen_space_opacity_is_animating() const {
314 return draw_properties_.screen_space_opacity_is_animating;
316 bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; }
317 bool is_clipped() const { return draw_properties_.is_clipped; }
318 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; }
319 gfx::Rect drawable_content_rect() const {
320 return draw_properties_.drawable_content_rect;
322 gfx::Rect visible_content_rect() const {
323 return draw_properties_.visible_content_rect;
325 LayerImpl* render_target() {
326 DCHECK(!draw_properties_.render_target ||
327 draw_properties_.render_target->render_surface());
328 return draw_properties_.render_target;
330 const LayerImpl* render_target() const {
331 DCHECK(!draw_properties_.render_target ||
332 draw_properties_.render_target->render_surface());
333 return draw_properties_.render_target;
335 RenderSurfaceImpl* render_surface() const {
336 return draw_properties_.render_surface.get();
338 int num_unclipped_descendants() const {
339 return draw_properties_.num_unclipped_descendants;
342 // The client should be responsible for setting bounds, content bounds and
343 // contents scale to appropriate values. LayerImpl doesn't calculate any of
344 // them from the other values.
346 void SetBounds(const gfx::Size& bounds);
347 void SetTemporaryImplBounds(const gfx::SizeF& bounds);
348 gfx::Size bounds() const;
349 gfx::Vector2dF BoundsDelta() const {
350 return gfx::Vector2dF(temporary_impl_bounds_.width() - bounds_.width(),
351 temporary_impl_bounds_.height() - bounds_.height());
354 void SetContentBounds(const gfx::Size& content_bounds);
355 gfx::Size content_bounds() const { return draw_properties_.content_bounds; }
357 float contents_scale_x() const { return draw_properties_.contents_scale_x; }
358 float contents_scale_y() const { return draw_properties_.contents_scale_y; }
359 void SetContentsScale(float contents_scale_x, float contents_scale_y);
361 void SetScrollOffsetDelegate(ScrollOffsetDelegate* scroll_offset_delegate);
362 bool IsExternalFlingActive() const;
364 void SetScrollOffset(const gfx::Vector2d& scroll_offset);
365 void SetScrollOffsetAndDelta(const gfx::Vector2d& scroll_offset,
366 const gfx::Vector2dF& scroll_delta);
367 gfx::Vector2d scroll_offset() const { return scroll_offset_; }
369 gfx::Vector2d MaxScrollOffset() const;
370 gfx::Vector2dF ClampScrollToMaxScrollOffset();
371 void SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer,
372 LayerImpl* scrollbar_clip_layer) const;
373 void SetScrollDelta(const gfx::Vector2dF& scroll_delta);
374 gfx::Vector2dF ScrollDelta() const;
376 gfx::Vector2dF TotalScrollOffset() const;
378 void SetSentScrollDelta(const gfx::Vector2d& sent_scroll_delta);
379 gfx::Vector2d sent_scroll_delta() const { return sent_scroll_delta_; }
381 // Returns the delta of the scroll that was outside of the bounds of the
383 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll);
385 void SetScrollClipLayer(int scroll_clip_layer_id);
386 LayerImpl* scroll_clip_layer() const { return scroll_clip_layer_; }
387 bool scrollable() const { return !!scroll_clip_layer_; }
389 void set_user_scrollable_horizontal(bool scrollable) {
390 user_scrollable_horizontal_ = scrollable;
392 void set_user_scrollable_vertical(bool scrollable) {
393 user_scrollable_vertical_ = scrollable;
396 void ApplySentScrollDeltasFromAbortedCommit();
397 void ApplyScrollDeltasSinceBeginMainFrame();
399 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread) {
400 should_scroll_on_main_thread_ = should_scroll_on_main_thread;
402 bool should_scroll_on_main_thread() const {
403 return should_scroll_on_main_thread_;
406 void SetHaveWheelEventHandlers(bool have_wheel_event_handlers) {
407 have_wheel_event_handlers_ = have_wheel_event_handlers;
409 bool have_wheel_event_handlers() const { return have_wheel_event_handlers_; }
411 void SetHaveScrollEventHandlers(bool have_scroll_event_handlers) {
412 have_scroll_event_handlers_ = have_scroll_event_handlers;
414 bool have_scroll_event_handlers() const {
415 return have_scroll_event_handlers_;
418 void SetNonFastScrollableRegion(const Region& region) {
419 non_fast_scrollable_region_ = region;
421 const Region& non_fast_scrollable_region() const {
422 return non_fast_scrollable_region_;
425 void SetTouchEventHandlerRegion(const Region& region) {
426 touch_event_handler_region_ = region;
428 const Region& touch_event_handler_region() const {
429 return touch_event_handler_region_;
432 void SetDrawCheckerboardForMissingTiles(bool checkerboard) {
433 draw_checkerboard_for_missing_tiles_ = checkerboard;
435 bool draw_checkerboard_for_missing_tiles() const {
436 return draw_checkerboard_for_missing_tiles_;
439 InputHandler::ScrollStatus TryScroll(
440 const gfx::PointF& screen_space_point,
441 InputHandler::ScrollInputType type) const;
443 void SetDoubleSided(bool double_sided);
444 bool double_sided() const { return double_sided_; }
446 void SetTransform(const gfx::Transform& transform);
447 const gfx::Transform& transform() const { return transform_; }
448 bool TransformIsAnimating() const;
449 bool TransformIsAnimatingOnImplOnly() const;
450 void SetTransformAndInvertibility(const gfx::Transform& transform,
451 bool transform_is_invertible);
452 bool transform_is_invertible() const { return transform_is_invertible_; }
454 // Note this rect is in layer space (not content space).
455 void SetUpdateRect(const gfx::RectF& update_rect);
457 const gfx::RectF& update_rect() const { return update_rect_; }
459 void AddDamageRect(const gfx::RectF& damage_rect);
461 const gfx::RectF& damage_rect() const { return damage_rect_; }
463 virtual base::DictionaryValue* LayerTreeAsJson() const;
465 void SetStackingOrderChanged(bool stacking_order_changed);
467 bool LayerPropertyChanged() const { return layer_property_changed_; }
469 void ResetAllChangeTrackingForSubtree();
471 LayerAnimationController* layer_animation_controller() {
472 return layer_animation_controller_.get();
475 const LayerAnimationController* layer_animation_controller() const {
476 return layer_animation_controller_.get();
479 virtual Region VisibleContentOpaqueRegion() const;
481 virtual void DidBecomeActive();
483 virtual void DidBeginTracing();
485 // Release resources held by this layer. Called when the output surface
486 // that rendered this layer was lost or a rendering mode switch has occured.
487 virtual void ReleaseResources();
489 ScrollbarAnimationController* scrollbar_animation_controller() const {
490 return scrollbar_animation_controller_.get();
493 typedef std::set<ScrollbarLayerImplBase*> ScrollbarSet;
494 ScrollbarSet* scrollbars() { return scrollbars_.get(); }
495 void ClearScrollbars();
496 void AddScrollbar(ScrollbarLayerImplBase* layer);
497 void RemoveScrollbar(ScrollbarLayerImplBase* layer);
498 bool HasScrollbar(ScrollbarOrientation orientation) const;
499 void ScrollbarParametersDidChange();
501 return scroll_clip_layer_ ? scroll_clip_layer_->bounds().height() : 0;
504 gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const;
506 virtual skia::RefPtr<SkPicture> GetPicture();
508 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl);
509 virtual void PushPropertiesTo(LayerImpl* layer);
511 scoped_ptr<base::Value> AsValue() const;
512 virtual size_t GPUMemoryUsageInBytes() const;
514 void SetNeedsPushProperties();
515 void AddDependentNeedsPushProperties();
516 void RemoveDependentNeedsPushProperties();
517 bool parent_should_know_need_push_properties() const {
518 return needs_push_properties() || descendant_needs_push_properties();
521 bool needs_push_properties() const { return needs_push_properties_; }
522 bool descendant_needs_push_properties() const {
523 return num_dependents_need_push_properties_ > 0;
526 virtual void RunMicroBenchmark(MicroBenchmarkImpl* benchmark);
528 virtual void SetDebugInfo(
529 scoped_refptr<base::debug::ConvertableToTraceFormat> other);
531 bool IsDrawnRenderSurfaceLayerListMember() const;
533 void Set3dSortingContextId(int id);
534 int sorting_context_id() { return sorting_context_id_; }
537 LayerImpl(LayerTreeImpl* layer_impl, int id);
539 // Get the color and size of the layer's debug border.
540 virtual void GetDebugBorderProperties(SkColor* color, float* width) const;
542 void AppendDebugBorderQuad(QuadSink* quad_sink,
543 const gfx::Size& content_bounds,
544 const SharedQuadState* shared_quad_state,
545 AppendQuadsData* append_quads_data) const;
546 void AppendDebugBorderQuad(QuadSink* quad_sink,
547 const gfx::Size& content_bounds,
548 const SharedQuadState* shared_quad_state,
549 AppendQuadsData* append_quads_data,
553 virtual void AsValueInto(base::DictionaryValue* dict) const;
555 void NoteLayerPropertyChanged();
556 void NoteLayerPropertyChangedForSubtree();
558 // Note carefully this does not affect the current layer.
559 void NoteLayerPropertyChangedForDescendants();
562 void NoteLayerPropertyChangedForDescendantsInternal();
564 virtual const char* LayerTypeAsString() const;
566 // Properties internal to LayerImpl
568 OwnedLayerImplList children_;
570 LayerImpl* scroll_parent_;
572 // Storing a pointer to a set rather than a set since this will be rarely
573 // used. If this pointer turns out to be too heavy, we could have this (and
574 // the scroll parent above) be stored in a LayerImpl -> scroll_info
576 scoped_ptr<std::set<LayerImpl*> > scroll_children_;
578 LayerImpl* clip_parent_;
579 scoped_ptr<std::set<LayerImpl*> > clip_children_;
581 // mask_layer_ can be temporarily stolen during tree sync, we need this ID to
582 // confirm newly assigned layer is still the previous one
584 scoped_ptr<LayerImpl> mask_layer_;
585 int replica_layer_id_; // ditto
586 scoped_ptr<LayerImpl> replica_layer_;
588 LayerTreeImpl* layer_tree_impl_;
590 // Properties synchronized from the associated Layer.
591 gfx::Point3F transform_origin_;
593 gfx::SizeF temporary_impl_bounds_;
594 gfx::Vector2d scroll_offset_;
595 ScrollOffsetDelegate* scroll_offset_delegate_;
596 LayerImpl* scroll_clip_layer_;
597 bool scrollable_ : 1;
598 bool should_scroll_on_main_thread_ : 1;
599 bool have_wheel_event_handlers_ : 1;
600 bool have_scroll_event_handlers_ : 1;
601 bool user_scrollable_horizontal_ : 1;
602 bool user_scrollable_vertical_ : 1;
603 bool stacking_order_changed_ : 1;
604 // Whether the "back" of this layer should draw.
605 bool double_sided_ : 1;
606 bool should_flatten_transform_ : 1;
608 // Tracks if drawing-related properties have changed since last redraw.
609 bool layer_property_changed_ : 1;
611 bool masks_to_bounds_ : 1;
612 bool contents_opaque_ : 1;
613 bool is_root_for_isolated_group_ : 1;
614 bool use_parent_backface_visibility_ : 1;
615 bool draw_checkerboard_for_missing_tiles_ : 1;
616 bool draws_content_ : 1;
617 bool hide_layer_and_subtree_ : 1;
618 bool force_render_surface_ : 1;
620 // Cache transform_'s invertibility.
621 bool transform_is_invertible_ : 1;
623 // Set for the layer that other layers are fixed to.
624 bool is_container_for_fixed_position_layers_ : 1;
625 Region non_fast_scrollable_region_;
626 Region touch_event_handler_region_;
627 SkColor background_color_;
630 SkXfermode::Mode blend_mode_;
631 gfx::PointF position_;
632 gfx::Transform transform_;
634 LayerPositionConstraint position_constraint_;
636 gfx::Vector2dF scroll_delta_;
637 gfx::Vector2d sent_scroll_delta_;
638 gfx::Vector2dF last_scroll_offset_;
640 // The global depth value of the center of the layer. This value is used
641 // to sort layers from back to front.
644 FilterOperations filters_;
645 FilterOperations background_filters_;
648 friend class TreeSynchronizer;
650 // This flag is set when the layer needs to push properties to the active
652 bool needs_push_properties_;
654 // The number of direct children or dependent layers that need to be recursed
655 // to in order for them or a descendent of them to push properties to the
657 int num_dependents_need_push_properties_;
659 // Layers that share a sorting context id will be sorted together in 3d
660 // space. 0 is a special value that means this layer will not be sorted and
661 // will be drawn in paint order.
662 int sorting_context_id_;
664 DrawMode current_draw_mode_;
667 // Rect indicating what was repainted/updated during update.
668 // Note that plugin layers bypass this and leave it empty.
669 // Uses layer (not content) space.
670 gfx::RectF update_rect_;
672 // This rect is in layer space.
673 gfx::RectF damage_rect_;
675 // Manages animations for this layer.
676 scoped_refptr<LayerAnimationController> layer_animation_controller_;
678 // Manages scrollbars for this layer
679 scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_;
681 scoped_ptr<ScrollbarSet> scrollbars_;
683 ScopedPtrVector<CopyOutputRequest> copy_requests_;
685 // Group of properties that need to be computed based on the layer tree
686 // hierarchy before layers can be drawn.
687 DrawProperties<LayerImpl> draw_properties_;
689 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_;
691 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
696 #endif // CC_LAYERS_LAYER_IMPL_H_