blob: af5df0fc97281860b1ae3639d6025d1b8262b1a9 [file] [log] [blame]
[email protected]cd57cc5a2012-10-12 22:43:411// Copyright 2010 The Chromium Authors. All rights reserved.
[email protected]0fb25002012-10-12 07:20:022// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
[email protected]cd57cc5a2012-10-12 22:43:414
[email protected]8fcbaa372012-11-05 04:12:415#ifndef CC_LAYER_H_
6#define CC_LAYER_H_
[email protected]cd57cc5a2012-10-12 22:43:417
[email protected]c8686a02012-11-27 08:29:008#include <public/WebFilterOperations.h>
9#include <string>
10#include <vector>
11
[email protected]a8461d82012-10-16 21:11:1412#include "base/memory/ref_counted.h"
[email protected]52347c842012-11-02 21:06:2013#include "cc/cc_export.h"
[email protected]d76806f82012-12-05 21:41:5014#include "cc/draw_properties.h"
[email protected]d50c6862012-10-23 02:08:3115#include "cc/layer_animation_controller.h"
[email protected]55a124d02012-10-22 03:07:1316#include "cc/occlusion_tracker.h"
[email protected]ac7c7f52012-11-08 06:26:5017#include "cc/region.h"
[email protected]a8461d82012-10-16 21:11:1418#include "cc/render_surface.h"
[email protected]1940c4e2012-12-04 05:08:1519#include "skia/ext/refptr.h"
[email protected]ddf9df82012-10-16 06:52:4620#include "third_party/skia/include/core/SkColor.h"
[email protected]1940c4e2012-12-04 05:08:1521#include "third_party/skia/include/core/SkImageFilter.h"
[email protected]aad0a0072012-11-01 18:15:5822#include "ui/gfx/rect.h"
23#include "ui/gfx/rect_f.h"
[email protected]c8686a02012-11-27 08:29:0024#include "ui/gfx/transform.h"
[email protected]cd57cc5a2012-10-12 22:43:4125
26namespace WebKit {
27class WebAnimationDelegate;
28class WebLayerScrollClient;
29}
30
[email protected]cd57cc5a2012-10-12 22:43:4131namespace cc {
32
[email protected]96baf3e2012-10-22 23:09:5533class ActiveAnimation;
34struct AnimationEvent;
35class LayerAnimationDelegate;
36class LayerImpl;
37class LayerTreeHost;
38class PriorityCalculator;
[email protected]b4da2032012-10-25 21:22:5539class ResourceUpdateQueue;
[email protected]96baf3e2012-10-22 23:09:5540class ScrollbarLayer;
41struct AnimationEvent;
42struct RenderingStats;
[email protected]cd57cc5a2012-10-12 22:43:4143
44// Base class for composited layers. Special layer types are derived from
45// this class.
[email protected]52347c842012-11-02 21:06:2046class CC_EXPORT Layer : public base::RefCounted<Layer>, public LayerAnimationControllerClient {
[email protected]cd57cc5a2012-10-12 22:43:4147public:
[email protected]96baf3e2012-10-22 23:09:5548 typedef std::vector<scoped_refptr<Layer> > LayerList;
[email protected]cd57cc5a2012-10-12 22:43:4149
[email protected]96baf3e2012-10-22 23:09:5550 static scoped_refptr<Layer> create();
[email protected]cd57cc5a2012-10-12 22:43:4151
[email protected]96baf3e2012-10-22 23:09:5552 // LayerAnimationControllerClient implementation
[email protected]cd57cc5a2012-10-12 22:43:4153 virtual int id() const OVERRIDE;
54 virtual void setOpacityFromAnimation(float) OVERRIDE;
55 virtual float opacity() const OVERRIDE;
[email protected]c8686a02012-11-27 08:29:0056 virtual void setTransformFromAnimation(const gfx::Transform&) OVERRIDE;
[email protected]cd57cc5a2012-10-12 22:43:4157 // A layer's transform operates layer space. That is, entirely in logical,
58 // non-page-scaled pixels (that is, they have page zoom baked in, but not page scale).
59 // The root layer is a special case -- it operates in physical pixels.
[email protected]c8686a02012-11-27 08:29:0060 virtual const gfx::Transform& transform() const OVERRIDE;
[email protected]cd57cc5a2012-10-12 22:43:4161
[email protected]96baf3e2012-10-22 23:09:5562 Layer* rootLayer();
[email protected]da3a2952012-11-21 04:19:5263 Layer* parent() { return m_parent; }
64 const Layer* parent() const { return m_parent; }
[email protected]96baf3e2012-10-22 23:09:5565 void addChild(scoped_refptr<Layer>);
66 void insertChild(scoped_refptr<Layer>, size_t index);
67 void replaceChild(Layer* reference, scoped_refptr<Layer> newLayer);
[email protected]cd57cc5a2012-10-12 22:43:4168 void removeFromParent();
69 void removeAllChildren();
70 void setChildren(const LayerList&);
71
72 const LayerList& children() const { return m_children; }
73
[email protected]aad0a0072012-11-01 18:15:5874 void setAnchorPoint(const gfx::PointF&);
75 gfx::PointF anchorPoint() const { return m_anchorPoint; }
[email protected]cd57cc5a2012-10-12 22:43:4176
77 void setAnchorPointZ(float);
78 float anchorPointZ() const { return m_anchorPointZ; }
79
[email protected]c3e0e712012-11-08 17:49:1680 virtual void setBackgroundColor(SkColor);
[email protected]cd57cc5a2012-10-12 22:43:4181 SkColor backgroundColor() const { return m_backgroundColor; }
82
83 // A layer's bounds are in logical, non-page-scaled pixels (however, the
84 // root layer's bounds are in physical pixels).
[email protected]aad0a0072012-11-01 18:15:5885 void setBounds(const gfx::Size&);
86 const gfx::Size& bounds() const { return m_bounds; }
87 virtual gfx::Size contentBounds() const;
[email protected]cd57cc5a2012-10-12 22:43:4188
89 void setMasksToBounds(bool);
90 bool masksToBounds() const { return m_masksToBounds; }
91
[email protected]96baf3e2012-10-22 23:09:5592 void setMaskLayer(Layer*);
[email protected]da3a2952012-11-21 04:19:5293 Layer* maskLayer() { return m_maskLayer.get(); }
94 const Layer* maskLayer() const { return m_maskLayer.get(); }
[email protected]cd57cc5a2012-10-12 22:43:4195
[email protected]aad0a0072012-11-01 18:15:5896 virtual void setNeedsDisplayRect(const gfx::RectF& dirtyRect);
97 void setNeedsDisplay() { setNeedsDisplayRect(gfx::RectF(gfx::PointF(), bounds())); }
[email protected]cd57cc5a2012-10-12 22:43:4198 virtual bool needsDisplay() const;
99
100 void setOpacity(float);
101 bool opacityIsAnimating() const;
102
103 void setFilters(const WebKit::WebFilterOperations&);
104 const WebKit::WebFilterOperations& filters() const { return m_filters; }
105
[email protected]1940c4e2012-12-04 05:08:15106 void setFilter(const skia::RefPtr<SkImageFilter>& filter);
107 skia::RefPtr<SkImageFilter> filter() const { return m_filter; }
[email protected]4000abf2012-10-23 04:45:45108
[email protected]cd57cc5a2012-10-12 22:43:41109 // Background filters are filters applied to what is behind this layer, when they are viewed through non-opaque
110 // regions in this layer. They are used through the WebLayer interface, and are not exposed to HTML.
111 void setBackgroundFilters(const WebKit::WebFilterOperations&);
112 const WebKit::WebFilterOperations& backgroundFilters() const { return m_backgroundFilters; }
113
114 virtual void setContentsOpaque(bool);
115 bool contentsOpaque() const { return m_contentsOpaque; }
116
[email protected]aad0a0072012-11-01 18:15:58117 void setPosition(const gfx::PointF&);
118 gfx::PointF position() const { return m_position; }
[email protected]cd57cc5a2012-10-12 22:43:41119
120 void setIsContainerForFixedPositionLayers(bool);
121 bool isContainerForFixedPositionLayers() const { return m_isContainerForFixedPositionLayers; }
122
123 void setFixedToContainerLayer(bool);
124 bool fixedToContainerLayer() const { return m_fixedToContainerLayer; }
125
[email protected]c8686a02012-11-27 08:29:00126 void setSublayerTransform(const gfx::Transform&);
127 const gfx::Transform& sublayerTransform() const { return m_sublayerTransform; }
[email protected]cd57cc5a2012-10-12 22:43:41128
[email protected]c8686a02012-11-27 08:29:00129 void setTransform(const gfx::Transform&);
[email protected]cd57cc5a2012-10-12 22:43:41130 bool transformIsAnimating() const;
131
[email protected]d76806f82012-12-05 21:41:50132 DrawProperties<Layer, RenderSurface>& drawProperties() { return m_drawProperties; }
133 const DrawProperties<Layer, RenderSurface>& drawProperties() const { return m_drawProperties; }
134
135 // The following are shortcut accessors to get various information from m_drawProperties
136 const gfx::Transform& drawTransform() const { return m_drawProperties.target_space_transform; }
137 const gfx::Transform& screenSpaceTransform() const { return m_drawProperties.screen_space_transform; }
138 float drawOpacity() const { return m_drawProperties.opacity; }
139 bool drawOpacityIsAnimating() const { return m_drawProperties.opacity_is_animating; }
140 bool drawTransformIsAnimating() const { return m_drawProperties.target_space_transform_is_animating; }
141 bool screenSpaceTransformIsAnimating() const { return m_drawProperties.screen_space_transform_is_animating; }
142 bool isClipped() const { return m_drawProperties.is_clipped; }
143 const gfx::Rect& clipRect() const { return m_drawProperties.clip_rect; }
144 const gfx::Rect& drawableContentRect() const { return m_drawProperties.drawable_content_rect; }
145 const gfx::Rect& visibleContentRect() const { return m_drawProperties.visible_content_rect; }
146 Layer* renderTarget() { DCHECK(!m_drawProperties.render_target || m_drawProperties.render_target->renderSurface()); return m_drawProperties.render_target; }
147 const Layer* renderTarget() const { DCHECK(!m_drawProperties.render_target || m_drawProperties.render_target->renderSurface()); return m_drawProperties.render_target; }
148 RenderSurface* renderSurface() const { return m_drawProperties.render_surface.get(); }
[email protected]cd57cc5a2012-10-12 22:43:41149
[email protected]c9c1ebe2012-11-05 20:46:13150 void setScrollOffset(gfx::Vector2d);
151 gfx::Vector2d scrollOffset() const { return m_scrollOffset; }
[email protected]cd57cc5a2012-10-12 22:43:41152
[email protected]c9c1ebe2012-11-05 20:46:13153 void setMaxScrollOffset(gfx::Vector2d);
154 gfx::Vector2d maxScrollOffset() const { return m_maxScrollOffset; }
[email protected]cd57cc5a2012-10-12 22:43:41155
156 void setScrollable(bool);
157 bool scrollable() const { return m_scrollable; }
158
159 void setShouldScrollOnMainThread(bool);
160 bool shouldScrollOnMainThread() const { return m_shouldScrollOnMainThread; }
161
162 void setHaveWheelEventHandlers(bool);
163 bool haveWheelEventHandlers() const { return m_haveWheelEventHandlers; }
164
165 void setNonFastScrollableRegion(const Region&);
166 void setNonFastScrollableRegionChanged() { m_nonFastScrollableRegionChanged = true; }
167 const Region& nonFastScrollableRegion() const { return m_nonFastScrollableRegion; }
168
[email protected]23d56be2012-11-08 00:33:34169 void setTouchEventHandlerRegion(const Region&);
170 void setTouchEventHandlerRegionChanged() { m_touchEventHandlerRegionChanged = true; }
171 const Region& touchEventHandlerRegion() const { return m_touchEventHandlerRegion; }
172
[email protected]cd57cc5a2012-10-12 22:43:41173 void setLayerScrollClient(WebKit::WebLayerScrollClient* layerScrollClient) { m_layerScrollClient = layerScrollClient; }
174
175 void setDrawCheckerboardForMissingTiles(bool);
176 bool drawCheckerboardForMissingTiles() const { return m_drawCheckerboardForMissingTiles; }
177
178 bool forceRenderSurface() const { return m_forceRenderSurface; }
179 void setForceRenderSurface(bool);
180
[email protected]c9c1ebe2012-11-05 20:46:13181 gfx::Vector2d scrollDelta() const { return gfx::Vector2d(); }
[email protected]cd57cc5a2012-10-12 22:43:41182
[email protected]c8686a02012-11-27 08:29:00183 void setImplTransform(const gfx::Transform&);
184 const gfx::Transform& implTransform() const { return m_implTransform; }
[email protected]cd57cc5a2012-10-12 22:43:41185
186 void setDoubleSided(bool);
187 bool doubleSided() const { return m_doubleSided; }
188
189 void setPreserves3D(bool preserve3D) { m_preserves3D = preserve3D; }
190 bool preserves3D() const { return m_preserves3D; }
191
192 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_useParentBackfaceVisibility = useParentBackfaceVisibility; }
193 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibility; }
194
[email protected]ed22978e2012-11-15 05:37:44195 void setUseLCDText(bool);
[email protected]cd57cc5a2012-10-12 22:43:41196 bool useLCDText() const { return m_useLCDText; }
197
[email protected]96baf3e2012-10-22 23:09:55198 virtual void setLayerTreeHost(LayerTreeHost*);
[email protected]cd57cc5a2012-10-12 22:43:41199
200 bool hasContributingDelegatedRenderPasses() const { return false; }
201
202 void setIsDrawable(bool);
203
[email protected]96baf3e2012-10-22 23:09:55204 void setReplicaLayer(Layer*);
[email protected]da3a2952012-11-21 04:19:52205 Layer* replicaLayer() { return m_replicaLayer.get(); }
206 const Layer* replicaLayer() const { return m_replicaLayer.get(); }
[email protected]cd57cc5a2012-10-12 22:43:41207
[email protected]ec05af52012-11-21 23:07:00208 bool hasMask() const { return !!m_maskLayer; }
209 bool hasReplica() const { return !!m_replicaLayer; }
[email protected]cd57cc5a2012-10-12 22:43:41210 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_replicaLayer->m_maskLayer); }
211
212 // These methods typically need to be overwritten by derived classes.
213 virtual bool drawsContent() const;
[email protected]b4da2032012-10-25 21:22:55214 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, RenderingStats&) { }
[email protected]cd57cc5a2012-10-12 22:43:41215 virtual bool needMoreUpdates();
216 virtual void setIsMask(bool) { }
217 virtual void bindContentsTexture() { }
[email protected]cd57cc5a2012-10-12 22:43:41218
[email protected]cd57cc5a2012-10-12 22:43:41219 void setDebugName(const std::string&);
220
[email protected]96baf3e2012-10-22 23:09:55221 virtual void pushPropertiesTo(LayerImpl*);
[email protected]cd57cc5a2012-10-12 22:43:41222
[email protected]d76806f82012-12-05 21:41:50223 void clearRenderSurface() { m_drawProperties.render_surface.reset(); }
[email protected]cd57cc5a2012-10-12 22:43:41224 void createRenderSurface();
225
[email protected]cd57cc5a2012-10-12 22:43:41226 // The contentsScale converts from logical, non-page-scaled pixels to target pixels.
227 // The contentsScale is 1 for the root layer as it is already in physical pixels.
[email protected]904e9132012-11-01 00:12:47228 // By default contentsScale is forced to be 1 except for subclasses of ContentsScalingLayer.
229 virtual float contentsScaleX() const;
230 virtual float contentsScaleY() const;
231 virtual void setContentsScale(float contentsScale) { }
[email protected]cd57cc5a2012-10-12 22:43:41232
[email protected]518ee582012-10-24 18:29:44233 // The scale at which contents should be rastered, to match the scale at
234 // which they will drawn to the screen. This scale is a component of the
235 // contentsScale() but does not include page/device scale factors.
236 float rasterScale() const { return m_rasterScale; }
237 void setRasterScale(float scale);
238
239 // When true, the rasterScale() will be set by the compositor. If false, it
240 // will use whatever value is given to it by the embedder.
241 bool automaticallyComputeRasterScale() { return m_automaticallyComputeRasterScale; }
242 void setAutomaticallyComputeRasterScale(bool);
243
244 void forceAutomaticRasterScaleToBeRecomputed();
245
[email protected]cd57cc5a2012-10-12 22:43:41246 // When true, the layer's contents are not scaled by the current page scale factor.
247 // setBoundsContainPageScale recursively sets the value on all child layers.
248 void setBoundsContainPageScale(bool);
249 bool boundsContainPageScale() const { return m_boundsContainPageScale; }
250
[email protected]498ec6e0e2012-11-30 18:24:57251 // Returns 0 if none of the layer's descendants has content to draw,
252 // 1 if exactly one descendant has content to draw, or a number >1
253 // (but necessary the exact number of descendants) otherwise.
254 int descendantsDrawContent();
[email protected]cd57cc5a2012-10-12 22:43:41255
[email protected]96baf3e2012-10-22 23:09:55256 LayerTreeHost* layerTreeHost() const { return m_layerTreeHost; }
[email protected]cd57cc5a2012-10-12 22:43:41257
258 // Set the priority of all desired textures in this layer.
[email protected]96baf3e2012-10-22 23:09:55259 virtual void setTexturePriorities(const PriorityCalculator&) { }
[email protected]cd57cc5a2012-10-12 22:43:41260
[email protected]96baf3e2012-10-22 23:09:55261 bool addAnimation(scoped_ptr<ActiveAnimation>);
[email protected]cd57cc5a2012-10-12 22:43:41262 void pauseAnimation(int animationId, double timeOffset);
263 void removeAnimation(int animationId);
264
265 void suspendAnimations(double monotonicTime);
266 void resumeAnimations(double monotonicTime);
267
[email protected]96baf3e2012-10-22 23:09:55268 LayerAnimationController* layerAnimationController() { return m_layerAnimationController.get(); }
269 void setLayerAnimationController(scoped_ptr<LayerAnimationController>);
270 scoped_ptr<LayerAnimationController> releaseLayerAnimationController();
[email protected]cd57cc5a2012-10-12 22:43:41271
272 void setLayerAnimationDelegate(WebKit::WebAnimationDelegate* layerAnimationDelegate) { m_layerAnimationDelegate = layerAnimationDelegate; }
273
274 bool hasActiveAnimation() const;
275
[email protected]96baf3e2012-10-22 23:09:55276 virtual void notifyAnimationStarted(const AnimationEvent&, double wallClockTime);
[email protected]cd57cc5a2012-10-12 22:43:41277 virtual void notifyAnimationFinished(double wallClockTime);
278
279 virtual Region visibleContentOpaqueRegion() const;
280
[email protected]96baf3e2012-10-22 23:09:55281 virtual ScrollbarLayer* toScrollbarLayer();
[email protected]cd57cc5a2012-10-12 22:43:41282
[email protected]aad0a0072012-11-01 18:15:58283 gfx::Rect layerRectToContentRect(const gfx::RectF& layerRect) const;
[email protected]904e9132012-11-01 00:12:47284
[email protected]cd57cc5a2012-10-12 22:43:41285protected:
[email protected]96baf3e2012-10-22 23:09:55286 friend class LayerImpl;
[email protected]cd57cc5a2012-10-12 22:43:41287 friend class TreeSynchronizer;
[email protected]96baf3e2012-10-22 23:09:55288 virtual ~Layer();
[email protected]cd57cc5a2012-10-12 22:43:41289
[email protected]96baf3e2012-10-22 23:09:55290 Layer();
[email protected]cd57cc5a2012-10-12 22:43:41291
292 void setNeedsCommit();
[email protected]0bf947242012-12-04 04:25:11293 void setNeedsFullTreeSync();
[email protected]cd57cc5a2012-10-12 22:43:41294
[email protected]cd57cc5a2012-10-12 22:43:41295 // This flag is set when layer need repainting/updating.
296 bool m_needsDisplay;
297
298 // Tracks whether this layer may have changed stacking order with its siblings.
299 bool m_stackingOrderChanged;
300
301 // The update rect is the region of the compositor resource that was actually updated by the compositor.
302 // For layers that may do updating outside the compositor's control (i.e. plugin layers), this information
303 // is not available and the update rect will remain empty.
304 // Note this rect is in layer space (not content space).
[email protected]aad0a0072012-11-01 18:15:58305 gfx::RectF m_updateRect;
[email protected]cd57cc5a2012-10-12 22:43:41306
[email protected]96baf3e2012-10-22 23:09:55307 scoped_refptr<Layer> m_maskLayer;
[email protected]cd57cc5a2012-10-12 22:43:41308
[email protected]96baf3e2012-10-22 23:09:55309 // Constructs a LayerImpl of the correct runtime type for this Layer type.
310 virtual scoped_ptr<LayerImpl> createLayerImpl();
[email protected]cd57cc5a2012-10-12 22:43:41311 int m_layerId;
312
313private:
[email protected]96baf3e2012-10-22 23:09:55314 friend class base::RefCounted<Layer>;
[email protected]cd57cc5a2012-10-12 22:43:41315
[email protected]96baf3e2012-10-22 23:09:55316 void setParent(Layer*);
317 bool hasAncestor(Layer*) const;
[email protected]cd57cc5a2012-10-12 22:43:41318 bool descendantIsFixedToContainerLayer() const;
319
320 size_t numChildren() const { return m_children.size(); }
321
322 // Returns the index of the child or -1 if not found.
[email protected]96baf3e2012-10-22 23:09:55323 int indexOfChild(const Layer*);
[email protected]cd57cc5a2012-10-12 22:43:41324
325 // This should only be called from removeFromParent.
[email protected]96baf3e2012-10-22 23:09:55326 void removeChild(Layer*);
[email protected]cd57cc5a2012-10-12 22:43:41327
328 LayerList m_children;
[email protected]96baf3e2012-10-22 23:09:55329 Layer* m_parent;
[email protected]cd57cc5a2012-10-12 22:43:41330
[email protected]96baf3e2012-10-22 23:09:55331 // Layer instances have a weak pointer to their LayerTreeHost.
332 // This pointer value is nil when a Layer is not in a tree and is
[email protected]cd57cc5a2012-10-12 22:43:41333 // updated via setLayerTreeHost() if a layer moves between trees.
[email protected]96baf3e2012-10-22 23:09:55334 LayerTreeHost* m_layerTreeHost;
[email protected]cd57cc5a2012-10-12 22:43:41335
[email protected]96baf3e2012-10-22 23:09:55336 scoped_ptr<LayerAnimationController> m_layerAnimationController;
[email protected]cd57cc5a2012-10-12 22:43:41337
338 // Layer properties.
[email protected]aad0a0072012-11-01 18:15:58339 gfx::Size m_bounds;
[email protected]cd57cc5a2012-10-12 22:43:41340
[email protected]c9c1ebe2012-11-05 20:46:13341 gfx::Vector2d m_scrollOffset;
342 gfx::Vector2d m_maxScrollOffset;
[email protected]cd57cc5a2012-10-12 22:43:41343 bool m_scrollable;
344 bool m_shouldScrollOnMainThread;
345 bool m_haveWheelEventHandlers;
346 Region m_nonFastScrollableRegion;
347 bool m_nonFastScrollableRegionChanged;
[email protected]23d56be2012-11-08 00:33:34348 Region m_touchEventHandlerRegion;
349 bool m_touchEventHandlerRegionChanged;
[email protected]aad0a0072012-11-01 18:15:58350 gfx::PointF m_position;
351 gfx::PointF m_anchorPoint;
[email protected]cd57cc5a2012-10-12 22:43:41352 SkColor m_backgroundColor;
[email protected]cd57cc5a2012-10-12 22:43:41353 std::string m_debugName;
354 float m_opacity;
[email protected]1940c4e2012-12-04 05:08:15355 skia::RefPtr<SkImageFilter> m_filter;
[email protected]cd57cc5a2012-10-12 22:43:41356 WebKit::WebFilterOperations m_filters;
357 WebKit::WebFilterOperations m_backgroundFilters;
358 float m_anchorPointZ;
359 bool m_isContainerForFixedPositionLayers;
360 bool m_fixedToContainerLayer;
361 bool m_isDrawable;
362 bool m_masksToBounds;
363 bool m_contentsOpaque;
364 bool m_doubleSided;
365 bool m_useLCDText;
366 bool m_preserves3D;
367 bool m_useParentBackfaceVisibility;
368 bool m_drawCheckerboardForMissingTiles;
369 bool m_forceRenderSurface;
370
[email protected]c8686a02012-11-27 08:29:00371 gfx::Transform m_transform;
372 gfx::Transform m_sublayerTransform;
[email protected]cd57cc5a2012-10-12 22:43:41373
374 // Replica layer used for reflections.
[email protected]96baf3e2012-10-22 23:09:55375 scoped_refptr<Layer> m_replicaLayer;
[email protected]cd57cc5a2012-10-12 22:43:41376
377 // Transient properties.
[email protected]518ee582012-10-24 18:29:44378 float m_rasterScale;
379 bool m_automaticallyComputeRasterScale;
[email protected]cd57cc5a2012-10-12 22:43:41380 bool m_boundsContainPageScale;
381
[email protected]c8686a02012-11-27 08:29:00382 gfx::Transform m_implTransform;
[email protected]cd57cc5a2012-10-12 22:43:41383
384 WebKit::WebAnimationDelegate* m_layerAnimationDelegate;
385 WebKit::WebLayerScrollClient* m_layerScrollClient;
[email protected]d76806f82012-12-05 21:41:50386
387 DrawProperties<Layer, RenderSurface> m_drawProperties;
[email protected]cd57cc5a2012-10-12 22:43:41388};
389
[email protected]96baf3e2012-10-22 23:09:55390void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped_refptr<Layer> >::iterator, void*);
[email protected]cd57cc5a2012-10-12 22:43:41391
[email protected]ddf9df82012-10-16 06:52:46392} // namespace cc
393
[email protected]8fcbaa372012-11-05 04:12:41394#endif // CC_LAYER_H_