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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 Layer* renderTarget() { DCHECK(!m_drawProperties.render_target || m_drawProp
erties.render_target->renderSurface()); return m_drawProperties.render_target; } | 148 Layer* renderTarget() { DCHECK(!m_drawProperties.render_target || m_drawProp
erties.render_target->renderSurface()); return m_drawProperties.render_target; } |
149 const Layer* renderTarget() const { DCHECK(!m_drawProperties.render_target |
| m_drawProperties.render_target->renderSurface()); return m_drawProperties.rend
er_target; } | 149 const Layer* renderTarget() const { DCHECK(!m_drawProperties.render_target |
| m_drawProperties.render_target->renderSurface()); return m_drawProperties.rend
er_target; } |
150 RenderSurface* renderSurface() const { return m_drawProperties.render_surfac
e.get(); } | 150 RenderSurface* renderSurface() const { return m_drawProperties.render_surfac
e.get(); } |
151 | 151 |
152 void setScrollOffset(gfx::Vector2d); | 152 void setScrollOffset(gfx::Vector2d); |
153 gfx::Vector2d scrollOffset() const { return m_scrollOffset; } | 153 gfx::Vector2d scrollOffset() const { return m_scrollOffset; } |
154 | 154 |
155 void setMaxScrollOffset(gfx::Vector2d); | 155 void setMaxScrollOffset(gfx::Vector2d); |
156 gfx::Vector2d maxScrollOffset() const { return m_maxScrollOffset; } | 156 gfx::Vector2d maxScrollOffset() const { return m_maxScrollOffset; } |
157 | 157 |
| 158 void setVisibleScrollArea(gfx::Size); |
| 159 gfx::Size visibleScrollArea() const { return m_visibleScrollArea; } |
| 160 |
158 void setScrollable(bool); | 161 void setScrollable(bool); |
159 bool scrollable() const { return m_scrollable; } | 162 bool scrollable() const { return m_scrollable; } |
160 | 163 |
161 void setShouldScrollOnMainThread(bool); | 164 void setShouldScrollOnMainThread(bool); |
162 bool shouldScrollOnMainThread() const { return m_shouldScrollOnMainThread; } | 165 bool shouldScrollOnMainThread() const { return m_shouldScrollOnMainThread; } |
163 | 166 |
164 void setHaveWheelEventHandlers(bool); | 167 void setHaveWheelEventHandlers(bool); |
165 bool haveWheelEventHandlers() const { return m_haveWheelEventHandlers; } | 168 bool haveWheelEventHandlers() const { return m_haveWheelEventHandlers; } |
166 | 169 |
167 void setNonFastScrollableRegion(const Region&); | 170 void setNonFastScrollableRegion(const Region&); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 354 |
352 ObserverList<LayerAnimationEventObserver> m_layerAnimationObservers; | 355 ObserverList<LayerAnimationEventObserver> m_layerAnimationObservers; |
353 | 356 |
354 scoped_refptr<LayerAnimationController> m_layerAnimationController; | 357 scoped_refptr<LayerAnimationController> m_layerAnimationController; |
355 | 358 |
356 // Layer properties. | 359 // Layer properties. |
357 gfx::Size m_bounds; | 360 gfx::Size m_bounds; |
358 | 361 |
359 gfx::Vector2d m_scrollOffset; | 362 gfx::Vector2d m_scrollOffset; |
360 gfx::Vector2d m_maxScrollOffset; | 363 gfx::Vector2d m_maxScrollOffset; |
| 364 gfx::Size m_visibleScrollArea; |
361 bool m_scrollable; | 365 bool m_scrollable; |
362 bool m_shouldScrollOnMainThread; | 366 bool m_shouldScrollOnMainThread; |
363 bool m_haveWheelEventHandlers; | 367 bool m_haveWheelEventHandlers; |
364 Region m_nonFastScrollableRegion; | 368 Region m_nonFastScrollableRegion; |
365 Region m_touchEventHandlerRegion; | 369 Region m_touchEventHandlerRegion; |
366 gfx::PointF m_position; | 370 gfx::PointF m_position; |
367 gfx::PointF m_anchorPoint; | 371 gfx::PointF m_anchorPoint; |
368 SkColor m_backgroundColor; | 372 SkColor m_backgroundColor; |
369 std::string m_debugName; | 373 std::string m_debugName; |
370 float m_opacity; | 374 float m_opacity; |
(...skipping 29 matching lines...) Expand all Loading... |
400 WebKit::WebLayerScrollClient* m_layerScrollClient; | 404 WebKit::WebLayerScrollClient* m_layerScrollClient; |
401 | 405 |
402 DrawProperties<Layer, RenderSurface> m_drawProperties; | 406 DrawProperties<Layer, RenderSurface> m_drawProperties; |
403 }; | 407 }; |
404 | 408 |
405 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); | 409 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); |
406 | 410 |
407 } // namespace cc | 411 } // namespace cc |
408 | 412 |
409 #endif // CC_LAYER_H_ | 413 #endif // CC_LAYER_H_ |
OLD | NEW |