- add sources.
[platform/framework/web/crosswalk.git] / src / cc / layers / layer_impl.h
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.
4
5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_
7
8 #include <set>
9 #include <string>
10
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/base/cc_export.h"
17 #include "cc/base/region.h"
18 #include "cc/base/scoped_ptr_vector.h"
19 #include "cc/input/input_handler.h"
20 #include "cc/layers/compositing_reasons.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/rect.h"
34 #include "ui/gfx/rect_f.h"
35 #include "ui/gfx/transform.h"
36
37 namespace base {
38 class DictionaryValue;
39 }
40
41 namespace cc {
42
43 class LayerTreeHostImpl;
44 class LayerTreeImpl;
45 class QuadSink;
46 class Renderer;
47 class ScrollbarAnimationController;
48 class ScrollbarLayerImplBase;
49 class Layer;
50
51 struct AppendQuadsData;
52
53 enum DrawMode {
54   DRAW_MODE_NONE,
55   DRAW_MODE_HARDWARE,
56   DRAW_MODE_SOFTWARE,
57   DRAW_MODE_RESOURCELESS_SOFTWARE
58 };
59
60 class CC_EXPORT LayerImpl : LayerAnimationValueObserver {
61  public:
62   typedef LayerImplList RenderSurfaceListType;
63   typedef LayerImplList LayerListType;
64   typedef RenderSurfaceImpl RenderSurfaceType;
65
66   static scoped_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
67     return make_scoped_ptr(new LayerImpl(tree_impl, id));
68   }
69
70   virtual ~LayerImpl();
71
72   int id() const { return layer_id_; }
73
74   // LayerAnimationValueObserver implementation.
75   virtual void OnFilterAnimated(const FilterOperations& filters) OVERRIDE;
76   virtual void OnOpacityAnimated(float opacity) OVERRIDE;
77   virtual void OnTransformAnimated(const gfx::Transform& transform) OVERRIDE;
78   virtual bool IsActive() const OVERRIDE;
79
80   // Tree structure.
81   LayerImpl* parent() { return parent_; }
82   const LayerImpl* parent() const { return parent_; }
83   const OwnedLayerImplList& children() const { return children_; }
84   OwnedLayerImplList& children() { return children_; }
85   LayerImpl* child_at(size_t index) const { return children_[index]; }
86   void AddChild(scoped_ptr<LayerImpl> child);
87   scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child);
88   void set_parent(LayerImpl* parent) { parent_ = parent; }
89   // Warning: This does not preserve tree structure invariants.
90   void ClearChildList();
91
92   bool HasAncestor(const LayerImpl* ancestor) const;
93
94   void SetScrollParent(LayerImpl* parent);
95
96   LayerImpl* scroll_parent() { return scroll_parent_; }
97   const LayerImpl* scroll_parent() const { return scroll_parent_; }
98
99   void SetScrollChildren(std::set<LayerImpl*>* children);
100   void RemoveScrollChild(LayerImpl* child);
101
102   std::set<LayerImpl*>* scroll_children() { return scroll_children_.get(); }
103   const std::set<LayerImpl*>* scroll_children() const {
104     return scroll_children_.get();
105   }
106
107   void SetClipParent(LayerImpl* ancestor);
108
109   LayerImpl* clip_parent() {
110     return clip_parent_;
111   }
112   const LayerImpl* clip_parent() const {
113     return clip_parent_;
114   }
115
116   void SetClipChildren(std::set<LayerImpl*>* children);
117   void RemoveClipChild(LayerImpl* child);
118
119   std::set<LayerImpl*>* clip_children() { return clip_children_.get(); }
120   const std::set<LayerImpl*>* clip_children() const {
121     return clip_children_.get();
122   }
123
124   void PassCopyRequests(ScopedPtrVector<CopyOutputRequest>* requests);
125   void TakeCopyRequestsAndTransformToTarget(
126       ScopedPtrVector<CopyOutputRequest>* request);
127   bool HasCopyRequest() const { return !copy_requests_.empty(); }
128
129   void SetMaskLayer(scoped_ptr<LayerImpl> mask_layer);
130   LayerImpl* mask_layer() { return mask_layer_.get(); }
131   const LayerImpl* mask_layer() const { return mask_layer_.get(); }
132   scoped_ptr<LayerImpl> TakeMaskLayer();
133
134   void SetReplicaLayer(scoped_ptr<LayerImpl> replica_layer);
135   LayerImpl* replica_layer() { return replica_layer_.get(); }
136   const LayerImpl* replica_layer() const { return replica_layer_.get(); }
137   scoped_ptr<LayerImpl> TakeReplicaLayer();
138
139   bool has_mask() const { return mask_layer_; }
140   bool has_replica() const { return replica_layer_; }
141   bool replica_has_mask() const {
142     return replica_layer_ && (mask_layer_ || replica_layer_->mask_layer_);
143   }
144
145   LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; }
146
147   scoped_ptr<SharedQuadState> CreateSharedQuadState() const;
148   // WillDraw must be called before AppendQuads. If WillDraw returns false,
149   // AppendQuads and DidDraw will not be called. If WillDraw returns true,
150   // DidDraw is guaranteed to be called before another WillDraw or before
151   // the layer is destroyed. To enforce this, any class that overrides
152   // WillDraw/DidDraw must call the base class version only if WillDraw
153   // returns true.
154   virtual bool WillDraw(DrawMode draw_mode,
155                         ResourceProvider* resource_provider);
156   virtual void AppendQuads(QuadSink* quad_sink,
157                            AppendQuadsData* append_quads_data) {}
158   virtual void DidDraw(ResourceProvider* resource_provider);
159
160   virtual ResourceProvider::ResourceId ContentsResourceId() const;
161
162   virtual bool HasDelegatedContent() const;
163   virtual bool HasContributingDelegatedRenderPasses() const;
164   virtual RenderPass::Id FirstContributingRenderPassId() const;
165   virtual RenderPass::Id NextContributingRenderPassId(RenderPass::Id id) const;
166
167   virtual void UpdateTilePriorities() {}
168
169   virtual ScrollbarLayerImplBase* ToScrollbarLayer();
170
171   // Returns true if this layer has content to draw.
172   void SetDrawsContent(bool draws_content);
173   bool DrawsContent() const { return draws_content_; }
174
175   void SetHideLayerAndSubtree(bool hide);
176   bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; }
177
178   bool force_render_surface() const { return force_render_surface_; }
179   void SetForceRenderSurface(bool force) { force_render_surface_ = force; }
180
181   void SetAnchorPoint(gfx::PointF anchor_point);
182   gfx::PointF anchor_point() const { return anchor_point_; }
183
184   void SetAnchorPointZ(float anchor_point_z);
185   float anchor_point_z() const { return anchor_point_z_; }
186
187   void SetBackgroundColor(SkColor background_color);
188   SkColor background_color() const { return background_color_; }
189   // If contents_opaque(), return an opaque color else return a
190   // non-opaque color.  Tries to return background_color(), if possible.
191   SkColor SafeOpaqueBackgroundColor() const;
192
193   void SetFilters(const FilterOperations& filters);
194   const FilterOperations& filters() const { return filters_; }
195   bool FilterIsAnimating() const;
196   bool FilterIsAnimatingOnImplOnly() const;
197
198   void SetBackgroundFilters(const FilterOperations& filters);
199   const FilterOperations& background_filters() const {
200     return background_filters_;
201   }
202
203   void SetMasksToBounds(bool masks_to_bounds);
204   bool masks_to_bounds() const { return masks_to_bounds_; }
205
206   void SetContentsOpaque(bool opaque);
207   bool contents_opaque() const { return contents_opaque_; }
208
209   void SetOpacity(float opacity);
210   float opacity() const { return opacity_; }
211   bool OpacityIsAnimating() const;
212   bool OpacityIsAnimatingOnImplOnly() const;
213
214   void SetPosition(gfx::PointF position);
215   gfx::PointF position() const { return position_; }
216
217   void SetIsContainerForFixedPositionLayers(bool container) {
218     is_container_for_fixed_position_layers_ = container;
219   }
220   // This is a non-trivial function in Layer.
221   bool IsContainerForFixedPositionLayers() const {
222     return is_container_for_fixed_position_layers_;
223   }
224
225   void SetFixedContainerSizeDelta(gfx::Vector2dF delta) {
226     fixed_container_size_delta_ = delta;
227   }
228   gfx::Vector2dF fixed_container_size_delta() const {
229     return fixed_container_size_delta_;
230   }
231
232   void SetPositionConstraint(const LayerPositionConstraint& constraint) {
233     position_constraint_ = constraint;
234   }
235   const LayerPositionConstraint& position_constraint() const {
236     return position_constraint_;
237   }
238
239   void SetPreserves3d(bool preserves_3d);
240   bool preserves_3d() const { return preserves_3d_; }
241
242   void SetUseParentBackfaceVisibility(bool use) {
243     use_parent_backface_visibility_ = use;
244   }
245   bool use_parent_backface_visibility() const {
246     return use_parent_backface_visibility_;
247   }
248
249   void SetSublayerTransform(const gfx::Transform& sublayer_transform);
250   const gfx::Transform& sublayer_transform() const {
251     return sublayer_transform_;
252   }
253
254   // Debug layer name.
255   void SetDebugName(const std::string& debug_name) { debug_name_ = debug_name; }
256   std::string debug_name() const { return debug_name_; }
257
258   void SetCompositingReasons(CompositingReasons reasons) {
259       compositing_reasons_ = reasons;
260   }
261
262   CompositingReasons compositing_reasons() const {
263       return compositing_reasons_;
264   }
265
266   bool ShowDebugBorders() const;
267
268   // These invalidate the host's render surface layer list.  The caller
269   // is responsible for calling set_needs_update_draw_properties on the tree
270   // so that its list can be recreated.
271   void CreateRenderSurface();
272   void ClearRenderSurface();
273
274   DrawProperties<LayerImpl>& draw_properties() {
275     return draw_properties_;
276   }
277   const DrawProperties<LayerImpl>& draw_properties() const {
278     return draw_properties_;
279   }
280
281   // The following are shortcut accessors to get various information from
282   // draw_properties_
283   const gfx::Transform& draw_transform() const {
284     return draw_properties_.target_space_transform;
285   }
286   const gfx::Transform& screen_space_transform() const {
287     return draw_properties_.screen_space_transform;
288   }
289   float draw_opacity() const { return draw_properties_.opacity; }
290   bool draw_opacity_is_animating() const {
291     return draw_properties_.opacity_is_animating;
292   }
293   bool draw_transform_is_animating() const {
294     return draw_properties_.target_space_transform_is_animating;
295   }
296   bool screen_space_transform_is_animating() const {
297     return draw_properties_.screen_space_transform_is_animating;
298   }
299   bool screen_space_opacity_is_animating() const {
300     return draw_properties_.screen_space_opacity_is_animating;
301   }
302   bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; }
303   bool is_clipped() const { return draw_properties_.is_clipped; }
304   gfx::Rect clip_rect() const { return draw_properties_.clip_rect; }
305   gfx::Rect drawable_content_rect() const {
306     return draw_properties_.drawable_content_rect;
307   }
308   gfx::Rect visible_content_rect() const {
309     return draw_properties_.visible_content_rect;
310   }
311   LayerImpl* render_target() {
312     DCHECK(!draw_properties_.render_target ||
313            draw_properties_.render_target->render_surface());
314     return draw_properties_.render_target;
315   }
316   const LayerImpl* render_target() const {
317     DCHECK(!draw_properties_.render_target ||
318            draw_properties_.render_target->render_surface());
319     return draw_properties_.render_target;
320   }
321   RenderSurfaceImpl* render_surface() const {
322     return draw_properties_.render_surface.get();
323   }
324   int num_unclipped_descendants() const {
325     return draw_properties_.num_unclipped_descendants;
326   }
327
328   // The client should be responsible for setting bounds, content bounds and
329   // contents scale to appropriate values. LayerImpl doesn't calculate any of
330   // them from the other values.
331
332   void SetBounds(gfx::Size bounds);
333   gfx::Size bounds() const { return bounds_; }
334
335   void SetContentBounds(gfx::Size content_bounds);
336   gfx::Size content_bounds() const { return draw_properties_.content_bounds; }
337
338   float contents_scale_x() const { return draw_properties_.contents_scale_x; }
339   float contents_scale_y() const { return draw_properties_.contents_scale_y; }
340   void SetContentsScale(float contents_scale_x, float contents_scale_y);
341
342   virtual void CalculateContentsScale(float ideal_contents_scale,
343                                       float device_scale_factor,
344                                       float page_scale_factor,
345                                       bool animating_transform_to_screen,
346                                       float* contents_scale_x,
347                                       float* contents_scale_y,
348                                       gfx::Size* content_bounds);
349
350   void SetScrollOffsetDelegate(
351       LayerScrollOffsetDelegate* scroll_offset_delegate);
352   bool IsExternalFlingActive() const;
353
354   void SetScrollOffset(gfx::Vector2d scroll_offset);
355   void SetScrollOffsetAndDelta(gfx::Vector2d scroll_offset,
356                                gfx::Vector2dF scroll_delta);
357   gfx::Vector2d scroll_offset() const { return scroll_offset_; }
358
359   void SetMaxScrollOffset(gfx::Vector2d max_scroll_offset);
360   gfx::Vector2d max_scroll_offset() const { return max_scroll_offset_; }
361
362   void SetScrollDelta(gfx::Vector2dF scroll_delta);
363   gfx::Vector2dF ScrollDelta() const;
364
365   gfx::Vector2dF TotalScrollOffset() const;
366
367   void SetSentScrollDelta(gfx::Vector2d sent_scroll_delta);
368   gfx::Vector2d sent_scroll_delta() const { return sent_scroll_delta_; }
369
370   // Returns the delta of the scroll that was outside of the bounds of the
371   // initial scroll
372   gfx::Vector2dF ScrollBy(gfx::Vector2dF scroll);
373
374   void SetScrollable(bool scrollable) { scrollable_ = scrollable; }
375   bool scrollable() const { return scrollable_; }
376
377   void set_user_scrollable_horizontal(bool scrollable) {
378     user_scrollable_horizontal_ = scrollable;
379   }
380   void set_user_scrollable_vertical(bool scrollable) {
381     user_scrollable_vertical_ = scrollable;
382   }
383
384   void ApplySentScrollDeltasFromAbortedCommit();
385   void ApplyScrollDeltasSinceBeginMainFrame();
386
387   void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread) {
388     should_scroll_on_main_thread_ = should_scroll_on_main_thread;
389   }
390   bool should_scroll_on_main_thread() const {
391     return should_scroll_on_main_thread_;
392   }
393
394   void SetHaveWheelEventHandlers(bool have_wheel_event_handlers) {
395     have_wheel_event_handlers_ = have_wheel_event_handlers;
396   }
397   bool have_wheel_event_handlers() const { return have_wheel_event_handlers_; }
398
399   void SetNonFastScrollableRegion(const Region& region) {
400     non_fast_scrollable_region_ = region;
401   }
402   const Region& non_fast_scrollable_region() const {
403     return non_fast_scrollable_region_;
404   }
405
406   void SetTouchEventHandlerRegion(const Region& region) {
407     touch_event_handler_region_ = region;
408   }
409   const Region& touch_event_handler_region() const {
410     return touch_event_handler_region_;
411   }
412
413   void SetDrawCheckerboardForMissingTiles(bool checkerboard) {
414     draw_checkerboard_for_missing_tiles_ = checkerboard;
415   }
416   bool DrawCheckerboardForMissingTiles() const;
417
418   InputHandler::ScrollStatus TryScroll(
419       gfx::PointF screen_space_point,
420       InputHandler::ScrollInputType type) const;
421
422   void SetDoubleSided(bool double_sided);
423   bool double_sided() const { return double_sided_; }
424
425   void SetTransform(const gfx::Transform& transform);
426   const gfx::Transform& transform() const { return transform_; }
427   bool TransformIsAnimating() const;
428   bool TransformIsAnimatingOnImplOnly() const;
429
430   // Note this rect is in layer space (not content space).
431   void set_update_rect(const gfx::RectF& update_rect) {
432     update_rect_ = update_rect;
433   }
434   const gfx::RectF& update_rect() const { return update_rect_; }
435
436   virtual base::DictionaryValue* LayerTreeAsJson() const;
437
438   void SetStackingOrderChanged(bool stacking_order_changed);
439
440   bool LayerPropertyChanged() const {
441     return layer_property_changed_ || LayerIsAlwaysDamaged();
442   }
443
444   void ResetAllChangeTrackingForSubtree();
445
446   virtual bool LayerIsAlwaysDamaged() const;
447
448   LayerAnimationController* layer_animation_controller() {
449     return layer_animation_controller_.get();
450   }
451
452   virtual Region VisibleContentOpaqueRegion() const;
453
454   virtual void DidBecomeActive();
455
456   virtual void DidBeginTracing();
457
458   // Indicates that the surface previously used to render this layer
459   // was lost and that a new one has been created. Won't be called
460   // until the new surface has been created successfully.
461   virtual void DidLoseOutputSurface();
462
463   ScrollbarAnimationController* scrollbar_animation_controller() const {
464     return scrollbar_animation_controller_.get();
465   }
466
467   void SetHorizontalScrollbarLayer(ScrollbarLayerImplBase* scrollbar_layer);
468   ScrollbarLayerImplBase* horizontal_scrollbar_layer() {
469     return horizontal_scrollbar_layer_;
470   }
471
472   void SetVerticalScrollbarLayer(ScrollbarLayerImplBase* scrollbar_layer);
473   ScrollbarLayerImplBase* vertical_scrollbar_layer() {
474     return vertical_scrollbar_layer_;
475   }
476
477   gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const;
478
479   virtual skia::RefPtr<SkPicture> GetPicture();
480
481   virtual bool AreVisibleResourcesReady() const;
482
483   virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl);
484   virtual void PushPropertiesTo(LayerImpl* layer);
485
486   scoped_ptr<base::Value> AsValue() const;
487   virtual size_t GPUMemoryUsageInBytes() const;
488
489   // TODO(danakj): Be true only if needed. crbug.com/259511
490   bool needs_push_properties() const { return true; }
491   bool descendant_needs_push_properties() const { return true; }
492
493  protected:
494   LayerImpl(LayerTreeImpl* layer_impl, int id);
495
496   // Get the color and size of the layer's debug border.
497   virtual void GetDebugBorderProperties(SkColor* color, float* width) const;
498
499   void AppendDebugBorderQuad(QuadSink* quad_sink,
500                              const SharedQuadState* shared_quad_state,
501                              AppendQuadsData* append_quads_data) const;
502   void AppendDebugBorderQuad(QuadSink* quad_sink,
503                              const SharedQuadState* shared_quad_state,
504                              AppendQuadsData* append_quads_data,
505                              SkColor color,
506                              float width) const;
507
508   virtual void AsValueInto(base::DictionaryValue* dict) const;
509
510   void NoteLayerPropertyChanged();
511   void NoteLayerPropertyChangedForSubtree();
512
513   // Note carefully this does not affect the current layer.
514   void NoteLayerPropertyChangedForDescendants();
515
516  private:
517   void UpdateScrollbarPositions();
518
519   virtual const char* LayerTypeAsString() const;
520
521   // Properties internal to LayerImpl
522   LayerImpl* parent_;
523   OwnedLayerImplList children_;
524
525   LayerImpl* scroll_parent_;
526
527   // Storing a pointer to a set rather than a set since this will be rarely
528   // used. If this pointer turns out to be too heavy, we could have this (and
529   // the scroll parent above) be stored in a LayerImpl -> scroll_info
530   // map somewhere.
531   scoped_ptr<std::set<LayerImpl*> > scroll_children_;
532
533   LayerImpl* clip_parent_;
534   scoped_ptr<std::set<LayerImpl*> > clip_children_;
535
536   // mask_layer_ can be temporarily stolen during tree sync, we need this ID to
537   // confirm newly assigned layer is still the previous one
538   int mask_layer_id_;
539   scoped_ptr<LayerImpl> mask_layer_;
540   int replica_layer_id_;  // ditto
541   scoped_ptr<LayerImpl> replica_layer_;
542   int layer_id_;
543   LayerTreeImpl* layer_tree_impl_;
544
545   // Properties synchronized from the associated Layer.
546   gfx::PointF anchor_point_;
547   float anchor_point_z_;
548   gfx::Size bounds_;
549   gfx::Vector2d scroll_offset_;
550   LayerScrollOffsetDelegate* scroll_offset_delegate_;
551   bool scrollable_;
552   bool should_scroll_on_main_thread_;
553   bool have_wheel_event_handlers_;
554   bool user_scrollable_horizontal_;
555   bool user_scrollable_vertical_;
556   Region non_fast_scrollable_region_;
557   Region touch_event_handler_region_;
558   SkColor background_color_;
559   bool stacking_order_changed_;
560
561   // Whether the "back" of this layer should draw.
562   bool double_sided_;
563
564   // Tracks if drawing-related properties have changed since last redraw.
565   bool layer_property_changed_;
566
567   bool masks_to_bounds_;
568   bool contents_opaque_;
569   float opacity_;
570   gfx::PointF position_;
571   bool preserves_3d_;
572   bool use_parent_backface_visibility_;
573   bool draw_checkerboard_for_missing_tiles_;
574   gfx::Transform sublayer_transform_;
575   gfx::Transform transform_;
576
577   bool draws_content_;
578   bool hide_layer_and_subtree_;
579   bool force_render_surface_;
580
581   // Set for the layer that other layers are fixed to.
582   bool is_container_for_fixed_position_layers_;
583   // This property is effective when
584   // is_container_for_fixed_position_layers_ == true,
585   gfx::Vector2dF fixed_container_size_delta_;
586
587   LayerPositionConstraint position_constraint_;
588
589   gfx::Vector2dF scroll_delta_;
590   gfx::Vector2d sent_scroll_delta_;
591   gfx::Vector2d max_scroll_offset_;
592   gfx::Vector2dF last_scroll_offset_;
593
594   // The global depth value of the center of the layer. This value is used
595   // to sort layers from back to front.
596   float draw_depth_;
597
598   // Debug layer name.
599   std::string debug_name_;
600   CompositingReasons compositing_reasons_;
601
602   FilterOperations filters_;
603   FilterOperations background_filters_;
604
605  protected:
606   DrawMode current_draw_mode_;
607
608  private:
609   // Rect indicating what was repainted/updated during update.
610   // Note that plugin layers bypass this and leave it empty.
611   // Uses layer's content space.
612   gfx::RectF update_rect_;
613
614   // Manages animations for this layer.
615   scoped_refptr<LayerAnimationController> layer_animation_controller_;
616
617   // Manages scrollbars for this layer
618   scoped_ptr<ScrollbarAnimationController> scrollbar_animation_controller_;
619
620   // Weak pointers to this layer's scrollbars, if it has them. Updated during
621   // tree synchronization.
622   ScrollbarLayerImplBase* horizontal_scrollbar_layer_;
623   ScrollbarLayerImplBase* vertical_scrollbar_layer_;
624
625   ScopedPtrVector<CopyOutputRequest> copy_requests_;
626
627   // Group of properties that need to be computed based on the layer tree
628   // hierarchy before layers can be drawn.
629   DrawProperties<LayerImpl> draw_properties_;
630
631   DISALLOW_COPY_AND_ASSIGN(LayerImpl);
632 };
633
634 }  // namespace cc
635
636 #endif  // CC_LAYERS_LAYER_IMPL_H_