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 "IntPoint.h" | |
9 #include "Region.h" | 8 #include "Region.h" |
10 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
11 #include "cc/cc_export.h" | 10 #include "cc/cc_export.h" |
12 #include "cc/layer_animation_controller.h" | 11 #include "cc/layer_animation_controller.h" |
13 #include "cc/occlusion_tracker.h" | 12 #include "cc/occlusion_tracker.h" |
14 #include "cc/render_surface.h" | 13 #include "cc/render_surface.h" |
15 #include "third_party/skia/include/core/SkColor.h" | 14 #include "third_party/skia/include/core/SkColor.h" |
16 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
17 #include "ui/gfx/rect_f.h" | 16 #include "ui/gfx/rect_f.h" |
18 #include <public/WebFilterOperations.h> | 17 #include <public/WebFilterOperations.h> |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 121 |
123 void setSublayerTransform(const WebKit::WebTransformationMatrix&); | 122 void setSublayerTransform(const WebKit::WebTransformationMatrix&); |
124 const WebKit::WebTransformationMatrix& sublayerTransform() const { return m_
sublayerTransform; } | 123 const WebKit::WebTransformationMatrix& sublayerTransform() const { return m_
sublayerTransform; } |
125 | 124 |
126 void setTransform(const WebKit::WebTransformationMatrix&); | 125 void setTransform(const WebKit::WebTransformationMatrix&); |
127 bool transformIsAnimating() const; | 126 bool transformIsAnimating() const; |
128 | 127 |
129 const gfx::Rect& visibleContentRect() const { return m_visibleContentRect; } | 128 const gfx::Rect& visibleContentRect() const { return m_visibleContentRect; } |
130 void setVisibleContentRect(const gfx::Rect& visibleContentRect) { m_visibleC
ontentRect = visibleContentRect; } | 129 void setVisibleContentRect(const gfx::Rect& visibleContentRect) { m_visibleC
ontentRect = visibleContentRect; } |
131 | 130 |
132 void setScrollPosition(const IntPoint&); | 131 void setScrollOffset(gfx::Vector2d); |
133 const IntPoint& scrollPosition() const { return m_scrollPosition; } | 132 gfx::Vector2d scrollOffset() const { return m_scrollOffset; } |
134 | 133 |
135 void setMaxScrollPosition(const IntSize&); | 134 void setMaxScrollOffset(gfx::Vector2d); |
136 const IntSize& maxScrollPosition() const { return m_maxScrollPosition; } | 135 gfx::Vector2d maxScrollOffset() const { return m_maxScrollOffset; } |
137 | 136 |
138 void setScrollable(bool); | 137 void setScrollable(bool); |
139 bool scrollable() const { return m_scrollable; } | 138 bool scrollable() const { return m_scrollable; } |
140 | 139 |
141 void setShouldScrollOnMainThread(bool); | 140 void setShouldScrollOnMainThread(bool); |
142 bool shouldScrollOnMainThread() const { return m_shouldScrollOnMainThread; } | 141 bool shouldScrollOnMainThread() const { return m_shouldScrollOnMainThread; } |
143 | 142 |
144 void setHaveWheelEventHandlers(bool); | 143 void setHaveWheelEventHandlers(bool); |
145 bool haveWheelEventHandlers() const { return m_haveWheelEventHandlers; } | 144 bool haveWheelEventHandlers() const { return m_haveWheelEventHandlers; } |
146 | 145 |
147 void setNonFastScrollableRegion(const Region&); | 146 void setNonFastScrollableRegion(const Region&); |
148 void setNonFastScrollableRegionChanged() { m_nonFastScrollableRegionChanged
= true; } | 147 void setNonFastScrollableRegionChanged() { m_nonFastScrollableRegionChanged
= true; } |
149 const Region& nonFastScrollableRegion() const { return m_nonFastScrollableRe
gion; } | 148 const Region& nonFastScrollableRegion() const { return m_nonFastScrollableRe
gion; } |
150 | 149 |
151 void setLayerScrollClient(WebKit::WebLayerScrollClient* layerScrollClient) {
m_layerScrollClient = layerScrollClient; } | 150 void setLayerScrollClient(WebKit::WebLayerScrollClient* layerScrollClient) {
m_layerScrollClient = layerScrollClient; } |
152 | 151 |
153 void setDrawCheckerboardForMissingTiles(bool); | 152 void setDrawCheckerboardForMissingTiles(bool); |
154 bool drawCheckerboardForMissingTiles() const { return m_drawCheckerboardForM
issingTiles; } | 153 bool drawCheckerboardForMissingTiles() const { return m_drawCheckerboardForM
issingTiles; } |
155 | 154 |
156 bool forceRenderSurface() const { return m_forceRenderSurface; } | 155 bool forceRenderSurface() const { return m_forceRenderSurface; } |
157 void setForceRenderSurface(bool); | 156 void setForceRenderSurface(bool); |
158 | 157 |
159 IntSize scrollDelta() const { return IntSize(); } | 158 gfx::Vector2d scrollDelta() const { return gfx::Vector2d(); } |
160 | 159 |
161 void setImplTransform(const WebKit::WebTransformationMatrix&); | 160 void setImplTransform(const WebKit::WebTransformationMatrix&); |
162 const WebKit::WebTransformationMatrix& implTransform() const { return m_impl
Transform; } | 161 const WebKit::WebTransformationMatrix& implTransform() const { return m_impl
Transform; } |
163 | 162 |
164 void setDoubleSided(bool); | 163 void setDoubleSided(bool); |
165 bool doubleSided() const { return m_doubleSided; } | 164 bool doubleSided() const { return m_doubleSided; } |
166 | 165 |
167 void setPreserves3D(bool preserve3D) { m_preserves3D = preserve3D; } | 166 void setPreserves3D(bool preserve3D) { m_preserves3D = preserve3D; } |
168 bool preserves3D() const { return m_preserves3D; } | 167 bool preserves3D() const { return m_preserves3D; } |
169 | 168 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 LayerTreeHost* m_layerTreeHost; | 336 LayerTreeHost* m_layerTreeHost; |
338 | 337 |
339 scoped_ptr<LayerAnimationController> m_layerAnimationController; | 338 scoped_ptr<LayerAnimationController> m_layerAnimationController; |
340 | 339 |
341 // Layer properties. | 340 // Layer properties. |
342 gfx::Size m_bounds; | 341 gfx::Size m_bounds; |
343 | 342 |
344 // Uses layer's content space. | 343 // Uses layer's content space. |
345 gfx::Rect m_visibleContentRect; | 344 gfx::Rect m_visibleContentRect; |
346 | 345 |
347 IntPoint m_scrollPosition; | 346 gfx::Vector2d m_scrollOffset; |
348 IntSize m_maxScrollPosition; | 347 gfx::Vector2d m_maxScrollOffset; |
349 bool m_scrollable; | 348 bool m_scrollable; |
350 bool m_shouldScrollOnMainThread; | 349 bool m_shouldScrollOnMainThread; |
351 bool m_haveWheelEventHandlers; | 350 bool m_haveWheelEventHandlers; |
352 Region m_nonFastScrollableRegion; | 351 Region m_nonFastScrollableRegion; |
353 bool m_nonFastScrollableRegionChanged; | 352 bool m_nonFastScrollableRegionChanged; |
354 gfx::PointF m_position; | 353 gfx::PointF m_position; |
355 gfx::PointF m_anchorPoint; | 354 gfx::PointF m_anchorPoint; |
356 SkColor m_backgroundColor; | 355 SkColor m_backgroundColor; |
357 SkColor m_debugBorderColor; | 356 SkColor m_debugBorderColor; |
358 float m_debugBorderWidth; | 357 float m_debugBorderWidth; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 | 401 |
403 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; | 402 WebKit::WebAnimationDelegate* m_layerAnimationDelegate; |
404 WebKit::WebLayerScrollClient* m_layerScrollClient; | 403 WebKit::WebLayerScrollClient* m_layerScrollClient; |
405 }; | 404 }; |
406 | 405 |
407 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); | 406 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); |
408 | 407 |
409 } // namespace cc | 408 } // namespace cc |
410 | 409 |
411 #endif // CC_LAYER_H_ | 410 #endif // CC_LAYER_H_ |
OLD | NEW |