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_LAYERS_LAYER_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 235 |
236 void SetDrawCheckerboardForMissingTiles(bool checkerboard); | 236 void SetDrawCheckerboardForMissingTiles(bool checkerboard); |
237 bool DrawCheckerboardForMissingTiles() const { | 237 bool DrawCheckerboardForMissingTiles() const { |
238 return draw_checkerboard_for_missing_tiles_; | 238 return draw_checkerboard_for_missing_tiles_; |
239 } | 239 } |
240 | 240 |
241 void SetForceRenderSurface(bool force_render_surface); | 241 void SetForceRenderSurface(bool force_render_surface); |
242 bool force_render_surface() const { return force_render_surface_; } | 242 bool force_render_surface() const { return force_render_surface_; } |
243 | 243 |
244 gfx::Vector2d ScrollDelta() const { return gfx::Vector2d(); } | 244 gfx::Vector2d ScrollDelta() const { return gfx::Vector2d(); } |
| 245 gfx::Vector2dF TotalScrollOffset() const { |
| 246 // Floating point to match the LayerImpl version. |
| 247 return scroll_offset() + ScrollDelta(); |
| 248 } |
245 | 249 |
246 void SetDoubleSided(bool double_sided); | 250 void SetDoubleSided(bool double_sided); |
247 bool double_sided() const { return double_sided_; } | 251 bool double_sided() const { return double_sided_; } |
248 | 252 |
249 void SetPreserves3d(bool preserves_3d) { preserves_3d_ = preserves_3d; } | 253 void SetPreserves3d(bool preserves_3d) { preserves_3d_ = preserves_3d; } |
250 bool preserves_3d() const { return preserves_3d_; } | 254 bool preserves_3d() const { return preserves_3d_; } |
251 | 255 |
252 void set_use_parent_backface_visibility(bool use) { | 256 void set_use_parent_backface_visibility(bool use) { |
253 use_parent_backface_visibility_ = use; | 257 use_parent_backface_visibility_ = use; |
254 } | 258 } |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 DrawProperties<Layer, RenderSurface> draw_properties_; | 491 DrawProperties<Layer, RenderSurface> draw_properties_; |
488 | 492 |
489 PaintProperties paint_properties_; | 493 PaintProperties paint_properties_; |
490 | 494 |
491 DISALLOW_COPY_AND_ASSIGN(Layer); | 495 DISALLOW_COPY_AND_ASSIGN(Layer); |
492 }; | 496 }; |
493 | 497 |
494 } // namespace cc | 498 } // namespace cc |
495 | 499 |
496 #endif // CC_LAYERS_LAYER_H_ | 500 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |