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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "cc/cc_export.h" | 9 #include "cc/cc_export.h" |
10 #include "cc/layer_animation_controller.h" | 10 #include "cc/layer_animation_controller.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 bool hasReplica() const { return m_replicaLayer; } | 189 bool hasReplica() const { return m_replicaLayer; } |
190 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep
licaLayer->m_maskLayer); } | 190 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep
licaLayer->m_maskLayer); } |
191 | 191 |
192 // These methods typically need to be overwritten by derived classes. | 192 // These methods typically need to be overwritten by derived classes. |
193 virtual bool drawsContent() const; | 193 virtual bool drawsContent() const; |
194 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering
Stats&) { } | 194 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering
Stats&) { } |
195 virtual bool needMoreUpdates(); | 195 virtual bool needMoreUpdates(); |
196 virtual void setIsMask(bool) { } | 196 virtual void setIsMask(bool) { } |
197 virtual void bindContentsTexture() { } | 197 virtual void bindContentsTexture() { } |
198 | 198 |
199 void setDebugBorderColor(SkColor); | |
200 void setDebugBorderWidth(float); | |
201 void setDebugName(const std::string&); | 199 void setDebugName(const std::string&); |
202 | 200 |
203 virtual void pushPropertiesTo(LayerImpl*); | 201 virtual void pushPropertiesTo(LayerImpl*); |
204 | 202 |
205 void clearRenderSurface() { m_renderSurface.reset(); } | 203 void clearRenderSurface() { m_renderSurface.reset(); } |
206 RenderSurface* renderSurface() const { return m_renderSurface.get(); } | 204 RenderSurface* renderSurface() const { return m_renderSurface.get(); } |
207 void createRenderSurface(); | 205 void createRenderSurface(); |
208 | 206 |
209 float drawOpacity() const { return m_drawOpacity; } | 207 float drawOpacity() const { return m_drawOpacity; } |
210 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; } | 208 void setDrawOpacity(float opacity) { m_drawOpacity = opacity; } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 bool m_scrollable; | 350 bool m_scrollable; |
353 bool m_shouldScrollOnMainThread; | 351 bool m_shouldScrollOnMainThread; |
354 bool m_haveWheelEventHandlers; | 352 bool m_haveWheelEventHandlers; |
355 Region m_nonFastScrollableRegion; | 353 Region m_nonFastScrollableRegion; |
356 bool m_nonFastScrollableRegionChanged; | 354 bool m_nonFastScrollableRegionChanged; |
357 Region m_touchEventHandlerRegion; | 355 Region m_touchEventHandlerRegion; |
358 bool m_touchEventHandlerRegionChanged; | 356 bool m_touchEventHandlerRegionChanged; |
359 gfx::PointF m_position; | 357 gfx::PointF m_position; |
360 gfx::PointF m_anchorPoint; | 358 gfx::PointF m_anchorPoint; |
361 SkColor m_backgroundColor; | 359 SkColor m_backgroundColor; |
362 SkColor m_debugBorderColor; | |
363 float m_debugBorderWidth; | |
364 std::string m_debugName; | 360 std::string m_debugName; |
365 float m_opacity; | 361 float m_opacity; |
366 SkImageFilter* m_filter; | 362 SkImageFilter* m_filter; |
367 WebKit::WebFilterOperations m_filters; | 363 WebKit::WebFilterOperations m_filters; |
368 WebKit::WebFilterOperations m_backgroundFilters; | 364 WebKit::WebFilterOperations m_backgroundFilters; |
369 float m_anchorPointZ; | 365 float m_anchorPointZ; |
370 bool m_isContainerForFixedPositionLayers; | 366 bool m_isContainerForFixedPositionLayers; |
371 bool m_fixedToContainerLayer; | 367 bool m_fixedToContainerLayer; |
372 bool m_isDrawable; | 368 bool m_isDrawable; |
373 bool m_masksToBounds; | 369 bool m_masksToBounds; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 403 |
408 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; | 404 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; |
409 WebKit::WebLayerScrollClient* m_layerScrollClient; | 405 WebKit::WebLayerScrollClient* m_layerScrollClient; |
410 }; | 406 }; |
411 | 407 |
412 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); | 408 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); |
413 | 409 |
414 } // namespace cc | 410 } // namespace cc |
415 | 411 |
416 #endif // CC_LAYER_H_ | 412 #endif // CC_LAYER_H_ |
OLD | NEW |