Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / cc / layers / layer.h
1 // Copyright 2010 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_H_
6 #define CC_LAYERS_LAYER_H_
7
8 #include <set>
9 #include <string>
10
11 #include "base/callback.h"
12 #include "base/memory/ref_counted.h"
13 #include "base/observer_list.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/debug/micro_benchmark.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/paint_properties.h"
25 #include "cc/layers/render_surface.h"
26 #include "cc/output/filter_operations.h"
27 #include "skia/ext/refptr.h"
28 #include "third_party/skia/include/core/SkColor.h"
29 #include "third_party/skia/include/core/SkImageFilter.h"
30 #include "third_party/skia/include/core/SkPicture.h"
31 #include "third_party/skia/include/core/SkXfermode.h"
32 #include "ui/gfx/rect.h"
33 #include "ui/gfx/rect_f.h"
34 #include "ui/gfx/transform.h"
35
36 namespace gfx {
37 class BoxF;
38 }
39
40 namespace base {
41 namespace debug {
42 class ConvertableToTraceFormat;
43 }
44 }
45
46 namespace cc {
47
48 class Animation;
49 class AnimationDelegate;
50 struct AnimationEvent;
51 class CopyOutputRequest;
52 class LayerAnimationDelegate;
53 class LayerAnimationEventObserver;
54 class LayerClient;
55 class LayerImpl;
56 class LayerTreeHost;
57 class LayerTreeImpl;
58 class PriorityCalculator;
59 class RenderingStatsInstrumentation;
60 class ResourceUpdateQueue;
61 class ScrollbarLayerInterface;
62 struct AnimationEvent;
63 template <typename LayerType>
64 class OcclusionTracker;
65
66 // Base class for composited layers. Special layer types are derived from
67 // this class.
68 class CC_EXPORT Layer : public base::RefCounted<Layer>,
69                         public LayerAnimationValueObserver,
70                         public LayerAnimationValueProvider {
71  public:
72   typedef RenderSurfaceLayerList RenderSurfaceListType;
73   typedef LayerList LayerListType;
74   typedef RenderSurface RenderSurfaceType;
75
76   enum LayerIdLabels {
77     INVALID_ID = -1,
78   };
79
80   static scoped_refptr<Layer> Create();
81
82   int id() const { return layer_id_; }
83
84   Layer* RootLayer();
85   Layer* parent() { return parent_; }
86   const Layer* parent() const { return parent_; }
87   void AddChild(scoped_refptr<Layer> child);
88   void InsertChild(scoped_refptr<Layer> child, size_t index);
89   void ReplaceChild(Layer* reference, scoped_refptr<Layer> new_layer);
90   void RemoveFromParent();
91   void RemoveAllChildren();
92   void SetChildren(const LayerList& children);
93   bool HasAncestor(const Layer* ancestor) const;
94
95   const LayerList& children() const { return children_; }
96   Layer* child_at(size_t index) { return children_[index].get(); }
97
98   // This requests the layer and its subtree be rendered and given to the
99   // callback. If the copy is unable to be produced (the layer is destroyed
100   // first), then the callback is called with a NULL/empty result.
101   void RequestCopyOfOutput(scoped_ptr<CopyOutputRequest> request);
102   bool HasCopyRequest() const {
103     return !copy_requests_.empty();
104   }
105
106   void SetAnchorPoint(const gfx::PointF& anchor_point);
107   gfx::PointF anchor_point() const { return anchor_point_; }
108
109   void SetAnchorPointZ(float anchor_point_z);
110   float anchor_point_z() const { return anchor_point_z_; }
111
112   virtual void SetBackgroundColor(SkColor background_color);
113   SkColor background_color() const { return background_color_; }
114   // If contents_opaque(), return an opaque color else return a
115   // non-opaque color.  Tries to return background_color(), if possible.
116   SkColor SafeOpaqueBackgroundColor() const;
117
118   // A layer's bounds are in logical, non-page-scaled pixels (however, the
119   // root layer's bounds are in physical pixels).
120   void SetBounds(const gfx::Size& bounds);
121   gfx::Size bounds() const { return bounds_; }
122
123   void SetMasksToBounds(bool masks_to_bounds);
124   bool masks_to_bounds() const { return masks_to_bounds_; }
125
126   void SetMaskLayer(Layer* mask_layer);
127   Layer* mask_layer() { return mask_layer_.get(); }
128   const Layer* mask_layer() const { return mask_layer_.get(); }
129
130   virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect);
131   void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); }
132
133   void SetOpacity(float opacity);
134   float opacity() const { return opacity_; }
135   bool OpacityIsAnimating() const;
136   virtual bool OpacityCanAnimateOnImplThread() const;
137
138   void SetBlendMode(SkXfermode::Mode blend_mode);
139   SkXfermode::Mode blend_mode() const { return blend_mode_; }
140
141   bool uses_default_blend_mode() const {
142     return blend_mode_ == SkXfermode::kSrcOver_Mode;
143   }
144
145   // A layer is root for an isolated group when it and all its descendants are
146   // drawn over a black and fully transparent background, creating an isolated
147   // group. It should be used along with SetBlendMode(), in order to restrict
148   // layers within the group to blend with layers outside this group.
149   void SetIsRootForIsolatedGroup(bool root);
150   bool is_root_for_isolated_group() const {
151     return is_root_for_isolated_group_;
152   }
153
154   void SetFilters(const FilterOperations& filters);
155   const FilterOperations& filters() const { return filters_; }
156   bool FilterIsAnimating() const;
157
158   // Background filters are filters applied to what is behind this layer, when
159   // they are viewed through non-opaque regions in this layer. They are used
160   // through the WebLayer interface, and are not exposed to HTML.
161   void SetBackgroundFilters(const FilterOperations& filters);
162   const FilterOperations& background_filters() const {
163     return background_filters_;
164   }
165
166   virtual void SetContentsOpaque(bool opaque);
167   bool contents_opaque() const { return contents_opaque_; }
168
169   void SetPosition(const gfx::PointF& position);
170   gfx::PointF position() const { return position_; }
171
172   void SetIsContainerForFixedPositionLayers(bool container);
173   bool IsContainerForFixedPositionLayers() const;
174
175   void SetPositionConstraint(const LayerPositionConstraint& constraint);
176   const LayerPositionConstraint& position_constraint() const {
177     return position_constraint_;
178   }
179
180   void SetTransform(const gfx::Transform& transform);
181   const gfx::Transform& transform() const { return transform_; }
182   bool TransformIsAnimating() const;
183   bool transform_is_invertible() const { return transform_is_invertible_; }
184
185   void SetScrollParent(Layer* parent);
186
187   Layer* scroll_parent() { return scroll_parent_; }
188   const Layer* scroll_parent() const { return scroll_parent_; }
189
190   void AddScrollChild(Layer* child);
191   void RemoveScrollChild(Layer* child);
192
193   std::set<Layer*>* scroll_children() { return scroll_children_.get(); }
194   const std::set<Layer*>* scroll_children() const {
195     return scroll_children_.get();
196   }
197
198   void SetClipParent(Layer* ancestor);
199
200   Layer* clip_parent() { return clip_parent_; }
201   const Layer* clip_parent() const {
202     return clip_parent_;
203   }
204
205   void AddClipChild(Layer* child);
206   void RemoveClipChild(Layer* child);
207
208   std::set<Layer*>* clip_children() { return clip_children_.get(); }
209   const std::set<Layer*>* clip_children() const {
210     return clip_children_.get();
211   }
212
213   DrawProperties<Layer>& draw_properties() { return draw_properties_; }
214   const DrawProperties<Layer>& draw_properties() const {
215     return draw_properties_;
216   }
217
218   // The following are shortcut accessors to get various information from
219   // draw_properties_
220   const gfx::Transform& draw_transform() const {
221     return draw_properties_.target_space_transform;
222   }
223   const gfx::Transform& screen_space_transform() const {
224     return draw_properties_.screen_space_transform;
225   }
226   float draw_opacity() const { return draw_properties_.opacity; }
227   bool draw_opacity_is_animating() const {
228     return draw_properties_.opacity_is_animating;
229   }
230   bool draw_transform_is_animating() const {
231     return draw_properties_.target_space_transform_is_animating;
232   }
233   bool screen_space_transform_is_animating() const {
234     return draw_properties_.screen_space_transform_is_animating;
235   }
236   bool screen_space_opacity_is_animating() const {
237     return draw_properties_.screen_space_opacity_is_animating;
238   }
239   bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; }
240   bool is_clipped() const { return draw_properties_.is_clipped; }
241   gfx::Rect clip_rect() const { return draw_properties_.clip_rect; }
242   gfx::Rect drawable_content_rect() const {
243     return draw_properties_.drawable_content_rect;
244   }
245   gfx::Rect visible_content_rect() const {
246     return draw_properties_.visible_content_rect;
247   }
248   Layer* render_target() {
249     DCHECK(!draw_properties_.render_target ||
250            draw_properties_.render_target->render_surface());
251     return draw_properties_.render_target;
252   }
253   const Layer* render_target() const {
254     DCHECK(!draw_properties_.render_target ||
255            draw_properties_.render_target->render_surface());
256     return draw_properties_.render_target;
257   }
258   RenderSurface* render_surface() const {
259     return draw_properties_.render_surface.get();
260   }
261   int num_unclipped_descendants() const {
262     return draw_properties_.num_unclipped_descendants;
263   }
264
265   void SetScrollOffset(gfx::Vector2d scroll_offset);
266   gfx::Vector2d scroll_offset() const { return scroll_offset_; }
267   void SetScrollOffsetFromImplSide(const gfx::Vector2d& scroll_offset);
268
269   void SetScrollClipLayerId(int clip_layer_id);
270   bool scrollable() const { return scroll_clip_layer_id_ != INVALID_ID; }
271
272   void SetUserScrollable(bool horizontal, bool vertical);
273   bool user_scrollable_horizontal() const {
274     return user_scrollable_horizontal_;
275   }
276   bool user_scrollable_vertical() const { return user_scrollable_vertical_; }
277
278   void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread);
279   bool should_scroll_on_main_thread() const {
280     return should_scroll_on_main_thread_;
281   }
282
283   void SetHaveWheelEventHandlers(bool have_wheel_event_handlers);
284   bool have_wheel_event_handlers() const { return have_wheel_event_handlers_; }
285
286   void SetHaveScrollEventHandlers(bool have_scroll_event_handlers);
287   bool have_scroll_event_handlers() const {
288     return have_scroll_event_handlers_;
289   }
290
291   void SetNonFastScrollableRegion(const Region& non_fast_scrollable_region);
292   const Region& non_fast_scrollable_region() const {
293     return non_fast_scrollable_region_;
294   }
295
296   void SetTouchEventHandlerRegion(const Region& touch_event_handler_region);
297   const Region& touch_event_handler_region() const {
298     return touch_event_handler_region_;
299   }
300
301   void set_did_scroll_callback(const base::Closure& callback) {
302     did_scroll_callback_ = callback;
303   }
304
305   void SetDrawCheckerboardForMissingTiles(bool checkerboard);
306   bool draw_checkerboard_for_missing_tiles() const {
307     return draw_checkerboard_for_missing_tiles_;
308   }
309
310   void SetForceRenderSurface(bool force_render_surface);
311   bool force_render_surface() const { return force_render_surface_; }
312
313   gfx::Vector2d ScrollDelta() const { return gfx::Vector2d(); }
314   gfx::Vector2dF TotalScrollOffset() const {
315     // Floating point to match the LayerImpl version.
316     return scroll_offset() + ScrollDelta();
317   }
318
319   void SetDoubleSided(bool double_sided);
320   bool double_sided() const { return double_sided_; }
321
322   void SetShouldFlattenTransform(bool flatten);
323   bool should_flatten_transform() const { return should_flatten_transform_; }
324
325   void SetIs3dSorted(bool sorted);
326   bool is_3d_sorted() const { return is_3d_sorted_; }
327
328   void set_use_parent_backface_visibility(bool use) {
329     use_parent_backface_visibility_ = use;
330   }
331   bool use_parent_backface_visibility() const {
332     return use_parent_backface_visibility_;
333   }
334
335   virtual void SetLayerTreeHost(LayerTreeHost* host);
336
337   bool HasDelegatedContent() const { return false; }
338   bool HasContributingDelegatedRenderPasses() const { return false; }
339
340   void SetIsDrawable(bool is_drawable);
341
342   void SetHideLayerAndSubtree(bool hide);
343   bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; }
344
345   void SetReplicaLayer(Layer* layer);
346   Layer* replica_layer() { return replica_layer_.get(); }
347   const Layer* replica_layer() const { return replica_layer_.get(); }
348
349   bool has_mask() const { return !!mask_layer_.get(); }
350   bool has_replica() const { return !!replica_layer_.get(); }
351   bool replica_has_mask() const {
352     return replica_layer_.get() &&
353            (mask_layer_.get() || replica_layer_->mask_layer_.get());
354   }
355
356   // These methods typically need to be overwritten by derived classes.
357   virtual bool DrawsContent() const;
358   virtual void SavePaintProperties();
359   // Returns true iff any resources were updated that need to be committed.
360   virtual bool Update(ResourceUpdateQueue* queue,
361                       const OcclusionTracker<Layer>* occlusion);
362   virtual bool NeedMoreUpdates();
363   virtual void SetIsMask(bool is_mask) {}
364   virtual void ReduceMemoryUsage() {}
365   virtual void OnOutputSurfaceCreated() {}
366   virtual bool IsSuitableForGpuRasterization() const;
367
368   virtual scoped_refptr<base::debug::ConvertableToTraceFormat> TakeDebugInfo();
369
370   void SetLayerClient(LayerClient* client) { client_ = client; }
371
372   virtual void PushPropertiesTo(LayerImpl* layer);
373
374   void CreateRenderSurface();
375   void ClearRenderSurface();
376   void ClearRenderSurfaceLayerList();
377
378   // The contents scale converts from logical, non-page-scaled pixels to target
379   // pixels. The contents scale is 1 for the root layer as it is already in
380   // physical pixels. By default contents scale is forced to be 1 except for
381   // subclasses of ContentsScalingLayer.
382   float contents_scale_x() const { return draw_properties_.contents_scale_x; }
383   float contents_scale_y() const { return draw_properties_.contents_scale_y; }
384   gfx::Size content_bounds() const { return draw_properties_.content_bounds; }
385
386   virtual void CalculateContentsScale(float ideal_contents_scale,
387                                       float device_scale_factor,
388                                       float page_scale_factor,
389                                       float maximum_animation_contents_scale,
390                                       bool animating_transform_to_screen,
391                                       float* contents_scale_x,
392                                       float* contents_scale_y,
393                                       gfx::Size* content_bounds);
394
395   LayerTreeHost* layer_tree_host() { return layer_tree_host_; }
396   const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; }
397
398   // Set the priority of all desired textures in this layer.
399   virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {}
400
401   bool AddAnimation(scoped_ptr<Animation> animation);
402   void PauseAnimation(int animation_id, double time_offset);
403   void RemoveAnimation(int animation_id);
404
405   LayerAnimationController* layer_animation_controller() {
406     return layer_animation_controller_.get();
407   }
408   void SetLayerAnimationControllerForTest(
409       scoped_refptr<LayerAnimationController> controller);
410
411   void set_layer_animation_delegate(AnimationDelegate* delegate) {
412     layer_animation_controller_->set_layer_animation_delegate(delegate);
413   }
414
415   bool HasActiveAnimation() const;
416
417   void AddLayerAnimationEventObserver(
418       LayerAnimationEventObserver* animation_observer);
419   void RemoveLayerAnimationEventObserver(
420       LayerAnimationEventObserver* animation_observer);
421
422   virtual Region VisibleContentOpaqueRegion() const;
423
424   virtual ScrollbarLayerInterface* ToScrollbarLayer();
425
426   gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const;
427
428   virtual skia::RefPtr<SkPicture> GetPicture() const;
429
430   // Constructs a LayerImpl of the correct runtime type for this Layer type.
431   virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl);
432
433   bool NeedsDisplayForTesting() const { return !update_rect_.IsEmpty(); }
434   void ResetNeedsDisplayForTesting() { update_rect_ = gfx::RectF(); }
435
436   RenderingStatsInstrumentation* rendering_stats_instrumentation() const;
437
438   const PaintProperties& paint_properties() const {
439     return paint_properties_;
440   }
441
442   // The scale at which contents should be rastered, to match the scale at
443   // which they will drawn to the screen. This scale is a component of the
444   // contents scale but does not include page/device scale factors.
445   // TODO(danakj): This goes away when TiledLayer goes away.
446   void set_raster_scale(float scale) { raster_scale_ = scale; }
447   float raster_scale() const { return raster_scale_; }
448   bool raster_scale_is_unknown() const { return raster_scale_ == 0.f; }
449
450   virtual bool SupportsLCDText() const;
451
452   void SetNeedsPushProperties();
453   bool needs_push_properties() const { return needs_push_properties_; }
454   bool descendant_needs_push_properties() const {
455     return num_dependents_need_push_properties_ > 0;
456   }
457   void reset_needs_push_properties_for_testing() {
458     needs_push_properties_ = false;
459   }
460
461   virtual void RunMicroBenchmark(MicroBenchmark* benchmark);
462
463  protected:
464   friend class LayerImpl;
465   friend class TreeSynchronizer;
466   virtual ~Layer();
467
468   Layer();
469
470   // These SetNeeds functions are in order of severity of update:
471   //
472   // Called when this layer has been modified in some way, but isn't sure
473   // that it needs a commit yet.  It needs CalcDrawProperties and UpdateLayers
474   // before it knows whether or not a commit is required.
475   void SetNeedsUpdate();
476   // Called when a property has been modified in a way that the layer
477   // knows immediately that a commit is required.  This implies SetNeedsUpdate
478   // as well as SetNeedsPushProperties to push that property.
479   void SetNeedsCommit();
480   // Called when there's been a change in layer structure.  Implies both
481   // SetNeedsUpdate and SetNeedsCommit, but not SetNeedsPushProperties.
482   void SetNeedsFullTreeSync();
483
484   // Called when the next commit should wait until the pending tree is activated
485   // before finishing the commit and unblocking the main thread. Used to ensure
486   // unused resources on the impl thread are returned before commit completes.
487   void SetNextCommitWaitsForActivation();
488
489   void AddDependentNeedsPushProperties();
490   void RemoveDependentNeedsPushProperties();
491   bool parent_should_know_need_push_properties() const {
492     return needs_push_properties() || descendant_needs_push_properties();
493   }
494
495   bool IsPropertyChangeAllowed() const;
496
497   // If this layer has a scroll parent, it removes |this| from its list of
498   // scroll children.
499   void RemoveFromScrollTree();
500
501   // If this layer has a clip parent, it removes |this| from its list of clip
502   // children.
503   void RemoveFromClipTree();
504
505   void reset_raster_scale_to_unknown() { raster_scale_ = 0.f; }
506
507   // This flag is set when the layer needs to push properties to the impl
508   // side.
509   bool needs_push_properties_;
510
511   // The number of direct children or dependent layers that need to be recursed
512   // to in order for them or a descendent of them to push properties to the impl
513   // side.
514   int num_dependents_need_push_properties_;
515
516   // Tracks whether this layer may have changed stacking order with its
517   // siblings.
518   bool stacking_order_changed_;
519
520   // The update rect is the region of the compositor resource that was
521   // actually updated by the compositor. For layers that may do updating
522   // outside the compositor's control (i.e. plugin layers), this information
523   // is not available and the update rect will remain empty.
524   // Note this rect is in layer space (not content space).
525   gfx::RectF update_rect_;
526
527   scoped_refptr<Layer> mask_layer_;
528
529   int layer_id_;
530
531   // When true, the layer is about to perform an update. Any commit requests
532   // will be handled implicitly after the update completes.
533   bool ignore_set_needs_commit_;
534
535  private:
536   friend class base::RefCounted<Layer>;
537
538   void SetParent(Layer* layer);
539   bool DescendantIsFixedToContainerLayer() const;
540
541   // Returns the index of the child or -1 if not found.
542   int IndexOfChild(const Layer* reference);
543
544   // This should only be called from RemoveFromParent().
545   void RemoveChildOrDependent(Layer* child);
546
547   // LayerAnimationValueProvider implementation.
548   virtual gfx::Vector2dF ScrollOffsetForAnimation() const OVERRIDE;
549
550   // LayerAnimationValueObserver implementation.
551   virtual void OnFilterAnimated(const FilterOperations& filters) OVERRIDE;
552   virtual void OnOpacityAnimated(float opacity) OVERRIDE;
553   virtual void OnTransformAnimated(const gfx::Transform& transform) OVERRIDE;
554   virtual void OnScrollOffsetAnimated(
555       const gfx::Vector2dF& scroll_offset) OVERRIDE;
556   virtual void OnAnimationWaitingForDeletion() OVERRIDE;
557   virtual bool IsActive() const OVERRIDE;
558
559   LayerList children_;
560   Layer* parent_;
561
562   // Layer instances have a weak pointer to their LayerTreeHost.
563   // This pointer value is nil when a Layer is not in a tree and is
564   // updated via SetLayerTreeHost() if a layer moves between trees.
565   LayerTreeHost* layer_tree_host_;
566
567   scoped_refptr<LayerAnimationController> layer_animation_controller_;
568
569   // Layer properties.
570   gfx::Size bounds_;
571
572   gfx::Vector2d scroll_offset_;
573   // This variable indicates which ancestor layer (if any) whose size,
574   // transformed relative to this layer, defines the maximum scroll offset for
575   // this layer.
576   int scroll_clip_layer_id_;
577   bool should_scroll_on_main_thread_ : 1;
578   bool have_wheel_event_handlers_ : 1;
579   bool have_scroll_event_handlers_ : 1;
580   bool user_scrollable_horizontal_ : 1;
581   bool user_scrollable_vertical_ : 1;
582   bool is_root_for_isolated_group_ : 1;
583   bool is_container_for_fixed_position_layers_ : 1;
584   bool is_drawable_ : 1;
585   bool hide_layer_and_subtree_ : 1;
586   bool masks_to_bounds_ : 1;
587   bool contents_opaque_ : 1;
588   bool double_sided_ : 1;
589   bool should_flatten_transform_ : 1;
590   bool use_parent_backface_visibility_ : 1;
591   bool draw_checkerboard_for_missing_tiles_ : 1;
592   bool force_render_surface_ : 1;
593   bool is_3d_sorted_ : 1;
594   bool transform_is_invertible_ : 1;
595   Region non_fast_scrollable_region_;
596   Region touch_event_handler_region_;
597   gfx::PointF position_;
598   gfx::PointF anchor_point_;
599   SkColor background_color_;
600   float opacity_;
601   SkXfermode::Mode blend_mode_;
602   FilterOperations filters_;
603   FilterOperations background_filters_;
604   float anchor_point_z_;
605   LayerPositionConstraint position_constraint_;
606   Layer* scroll_parent_;
607   scoped_ptr<std::set<Layer*> > scroll_children_;
608
609   Layer* clip_parent_;
610   scoped_ptr<std::set<Layer*> > clip_children_;
611
612   gfx::Transform transform_;
613
614   // Replica layer used for reflections.
615   scoped_refptr<Layer> replica_layer_;
616
617   // Transient properties.
618   float raster_scale_;
619
620   LayerClient* client_;
621
622   ScopedPtrVector<CopyOutputRequest> copy_requests_;
623
624   base::Closure did_scroll_callback_;
625
626   DrawProperties<Layer> draw_properties_;
627
628   PaintProperties paint_properties_;
629
630   DISALLOW_COPY_AND_ASSIGN(Layer);
631 };
632
633 }  // namespace cc
634
635 #endif  // CC_LAYERS_LAYER_H_