OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_LAYER_H_ | 5 #ifndef CC_LAYER_H_ |
6 #define CC_LAYER_H_ | 6 #define CC_LAYER_H_ |
7 | 7 |
8 #include <public/WebFilterOperations.h> | 8 #include <public/WebFilterOperations.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 DrawProperties<Layer, RenderSurface>& drawProperties() { return m_drawProper
ties; } | 133 DrawProperties<Layer, RenderSurface>& drawProperties() { return m_drawProper
ties; } |
134 const DrawProperties<Layer, RenderSurface>& drawProperties() const { return
m_drawProperties; } | 134 const DrawProperties<Layer, RenderSurface>& drawProperties() const { return
m_drawProperties; } |
135 | 135 |
136 // The following are shortcut accessors to get various information from m_dr
awProperties | 136 // The following are shortcut accessors to get various information from m_dr
awProperties |
137 const gfx::Transform& drawTransform() const { return m_drawProperties.target
_space_transform; } | 137 const gfx::Transform& drawTransform() const { return m_drawProperties.target
_space_transform; } |
138 const gfx::Transform& screenSpaceTransform() const { return m_drawProperties
.screen_space_transform; } | 138 const gfx::Transform& screenSpaceTransform() const { return m_drawProperties
.screen_space_transform; } |
139 float drawOpacity() const { return m_drawProperties.opacity; } | 139 float drawOpacity() const { return m_drawProperties.opacity; } |
140 bool drawOpacityIsAnimating() const { return m_drawProperties.opacity_is_ani
mating; } | 140 bool drawOpacityIsAnimating() const { return m_drawProperties.opacity_is_ani
mating; } |
141 bool drawTransformIsAnimating() const { return m_drawProperties.target_space
_transform_is_animating; } | 141 bool drawTransformIsAnimating() const { return m_drawProperties.target_space
_transform_is_animating; } |
142 bool screenSpaceTransformIsAnimating() const { return m_drawProperties.scree
n_space_transform_is_animating; } | 142 bool screenSpaceTransformIsAnimating() const { return m_drawProperties.scree
n_space_transform_is_animating; } |
| 143 bool screenSpaceOpacityIsAnimating() const { return m_drawProperties.screen_
space_opacity_is_animating; } |
| 144 bool canUseLCDText() const { return m_drawProperties.can_use_lcd_text; } |
143 bool isClipped() const { return m_drawProperties.is_clipped; } | 145 bool isClipped() const { return m_drawProperties.is_clipped; } |
144 const gfx::Rect& clipRect() const { return m_drawProperties.clip_rect; } | 146 const gfx::Rect& clipRect() const { return m_drawProperties.clip_rect; } |
145 const gfx::Rect& drawableContentRect() const { return m_drawProperties.drawa
ble_content_rect; } | 147 const gfx::Rect& drawableContentRect() const { return m_drawProperties.drawa
ble_content_rect; } |
146 const gfx::Rect& visibleContentRect() const { return m_drawProperties.visibl
e_content_rect; } | 148 const gfx::Rect& visibleContentRect() const { return m_drawProperties.visibl
e_content_rect; } |
147 Layer* renderTarget() { DCHECK(!m_drawProperties.render_target || m_drawProp
erties.render_target->renderSurface()); return m_drawProperties.render_target; } | 149 Layer* renderTarget() { DCHECK(!m_drawProperties.render_target || m_drawProp
erties.render_target->renderSurface()); return m_drawProperties.render_target; } |
148 const Layer* renderTarget() const { DCHECK(!m_drawProperties.render_target |
| m_drawProperties.render_target->renderSurface()); return m_drawProperties.rend
er_target; } | 150 const Layer* renderTarget() const { DCHECK(!m_drawProperties.render_target |
| m_drawProperties.render_target->renderSurface()); return m_drawProperties.rend
er_target; } |
149 RenderSurface* renderSurface() const { return m_drawProperties.render_surfac
e.get(); } | 151 RenderSurface* renderSurface() const { return m_drawProperties.render_surfac
e.get(); } |
150 | 152 |
151 void setScrollOffset(gfx::Vector2d); | 153 void setScrollOffset(gfx::Vector2d); |
152 gfx::Vector2d scrollOffset() const { return m_scrollOffset; } | 154 gfx::Vector2d scrollOffset() const { return m_scrollOffset; } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 188 |
187 void setDoubleSided(bool); | 189 void setDoubleSided(bool); |
188 bool doubleSided() const { return m_doubleSided; } | 190 bool doubleSided() const { return m_doubleSided; } |
189 | 191 |
190 void setPreserves3D(bool preserve3D) { m_preserves3D = preserve3D; } | 192 void setPreserves3D(bool preserve3D) { m_preserves3D = preserve3D; } |
191 bool preserves3D() const { return m_preserves3D; } | 193 bool preserves3D() const { return m_preserves3D; } |
192 | 194 |
193 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_us
eParentBackfaceVisibility = useParentBackfaceVisibility; } | 195 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_us
eParentBackfaceVisibility = useParentBackfaceVisibility; } |
194 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibil
ity; } | 196 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibil
ity; } |
195 | 197 |
196 void setUseLCDText(bool); | |
197 bool useLCDText() const { return m_useLCDText; } | |
198 | |
199 virtual void setLayerTreeHost(LayerTreeHost*); | 198 virtual void setLayerTreeHost(LayerTreeHost*); |
200 | 199 |
201 bool hasContributingDelegatedRenderPasses() const { return false; } | 200 bool hasContributingDelegatedRenderPasses() const { return false; } |
202 | 201 |
203 void setIsDrawable(bool); | 202 void setIsDrawable(bool); |
204 | 203 |
205 void setReplicaLayer(Layer*); | 204 void setReplicaLayer(Layer*); |
206 Layer* replicaLayer() { return m_replicaLayer.get(); } | 205 Layer* replicaLayer() { return m_replicaLayer.get(); } |
207 const Layer* replicaLayer() const { return m_replicaLayer.get(); } | 206 const Layer* replicaLayer() const { return m_replicaLayer.get(); } |
208 | 207 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 skia::RefPtr<SkImageFilter> m_filter; | 360 skia::RefPtr<SkImageFilter> m_filter; |
362 WebKit::WebFilterOperations m_filters; | 361 WebKit::WebFilterOperations m_filters; |
363 WebKit::WebFilterOperations m_backgroundFilters; | 362 WebKit::WebFilterOperations m_backgroundFilters; |
364 float m_anchorPointZ; | 363 float m_anchorPointZ; |
365 bool m_isContainerForFixedPositionLayers; | 364 bool m_isContainerForFixedPositionLayers; |
366 bool m_fixedToContainerLayer; | 365 bool m_fixedToContainerLayer; |
367 bool m_isDrawable; | 366 bool m_isDrawable; |
368 bool m_masksToBounds; | 367 bool m_masksToBounds; |
369 bool m_contentsOpaque; | 368 bool m_contentsOpaque; |
370 bool m_doubleSided; | 369 bool m_doubleSided; |
371 bool m_useLCDText; | |
372 bool m_preserves3D; | 370 bool m_preserves3D; |
373 bool m_useParentBackfaceVisibility; | 371 bool m_useParentBackfaceVisibility; |
374 bool m_drawCheckerboardForMissingTiles; | 372 bool m_drawCheckerboardForMissingTiles; |
375 bool m_forceRenderSurface; | 373 bool m_forceRenderSurface; |
376 | 374 |
377 gfx::Transform m_transform; | 375 gfx::Transform m_transform; |
378 gfx::Transform m_sublayerTransform; | 376 gfx::Transform m_sublayerTransform; |
379 | 377 |
380 // Replica layer used for reflections. | 378 // Replica layer used for reflections. |
381 scoped_refptr<Layer> m_replicaLayer; | 379 scoped_refptr<Layer> m_replicaLayer; |
382 | 380 |
383 // Transient properties. | 381 // Transient properties. |
384 float m_rasterScale; | 382 float m_rasterScale; |
385 bool m_automaticallyComputeRasterScale; | 383 bool m_automaticallyComputeRasterScale; |
386 bool m_boundsContainPageScale; | 384 bool m_boundsContainPageScale; |
387 | 385 |
388 gfx::Transform m_implTransform; | 386 gfx::Transform m_implTransform; |
389 | 387 |
390 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; | 388 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; |
391 WebKit::WebLayerScrollClient* m_layerScrollClient; | 389 WebKit::WebLayerScrollClient* m_layerScrollClient; |
392 | 390 |
393 DrawProperties<Layer, RenderSurface> m_drawProperties; | 391 DrawProperties<Layer, RenderSurface> m_drawProperties; |
394 }; | 392 }; |
395 | 393 |
396 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); | 394 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); |
397 | 395 |
398 } // namespace cc | 396 } // namespace cc |
399 | 397 |
400 #endif // CC_LAYER_H_ | 398 #endif // CC_LAYER_H_ |
OLD | NEW |