| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_TREES_LAYER_TREE_HOST_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // called. When disabled, it calls client_->NotifyReadyToActivate() | 206 // called. When disabled, it calls client_->NotifyReadyToActivate() |
| 207 // immediately if any notifications had been blocked while blocking. | 207 // immediately if any notifications had been blocked while blocking. |
| 208 virtual void BlockNotifyReadyToActivateForTesting(bool block); | 208 virtual void BlockNotifyReadyToActivateForTesting(bool block); |
| 209 | 209 |
| 210 // This allows us to inject DidInitializeVisibleTile events for testing. | 210 // This allows us to inject DidInitializeVisibleTile events for testing. |
| 211 void DidInitializeVisibleTileForTesting(); | 211 void DidInitializeVisibleTileForTesting(); |
| 212 | 212 |
| 213 // Resets all of the trees to an empty state. | 213 // Resets all of the trees to an empty state. |
| 214 void ResetTreesForTesting(); | 214 void ResetTreesForTesting(); |
| 215 | 215 |
| 216 bool resourceless_software_draw() const { |
| 217 return resourceless_software_draw_; |
| 218 } |
| 219 |
| 216 bool device_viewport_valid_for_tile_management() const { | 220 bool device_viewport_valid_for_tile_management() const { |
| 217 return device_viewport_valid_for_tile_management_; | 221 return device_viewport_valid_for_tile_management_; |
| 218 } | 222 } |
| 219 | 223 |
| 220 // Viewport size in draw space: this size is in physical pixels and is used | 224 // Viewport size in draw space: this size is in physical pixels and is used |
| 221 // for draw properties, tilings, quads and render passes. | 225 // for draw properties, tilings, quads and render passes. |
| 222 gfx::Size DrawViewportSize() const; | 226 gfx::Size DrawViewportSize() const; |
| 223 | 227 |
| 224 // Viewport size for scrolling and fixed-position compensation. This value | 228 // Viewport size for scrolling and fixed-position compensation. This value |
| 225 // excludes the URL bar and non-overlay scrollbars and is in DIP (and | 229 // excludes the URL bar and non-overlay scrollbars and is in DIP (and |
| (...skipping 19 matching lines...) Expand all Loading... |
| 245 virtual void DeferredInitialize() OVERRIDE; | 249 virtual void DeferredInitialize() OVERRIDE; |
| 246 virtual void ReleaseGL() OVERRIDE; | 250 virtual void ReleaseGL() OVERRIDE; |
| 247 virtual void CommitVSyncParameters(base::TimeTicks timebase, | 251 virtual void CommitVSyncParameters(base::TimeTicks timebase, |
| 248 base::TimeDelta interval) OVERRIDE; | 252 base::TimeDelta interval) OVERRIDE; |
| 249 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; | 253 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; |
| 250 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; | 254 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; |
| 251 virtual void SetExternalDrawConstraints( | 255 virtual void SetExternalDrawConstraints( |
| 252 const gfx::Transform& transform, | 256 const gfx::Transform& transform, |
| 253 const gfx::Rect& viewport, | 257 const gfx::Rect& viewport, |
| 254 const gfx::Rect& clip, | 258 const gfx::Rect& clip, |
| 259 bool resourceless_software_draw, |
| 255 bool valid_for_tile_management) OVERRIDE; | 260 bool valid_for_tile_management) OVERRIDE; |
| 256 virtual void DidLoseOutputSurface() OVERRIDE; | 261 virtual void DidLoseOutputSurface() OVERRIDE; |
| 257 virtual void DidSwapBuffers() OVERRIDE; | 262 virtual void DidSwapBuffers() OVERRIDE; |
| 258 virtual void DidSwapBuffersComplete() OVERRIDE; | 263 virtual void DidSwapBuffersComplete() OVERRIDE; |
| 259 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; | 264 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; |
| 260 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; | 265 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; |
| 261 virtual void SetTreeActivationCallback(const base::Closure& callback) | 266 virtual void SetTreeActivationCallback(const base::Closure& callback) |
| 262 OVERRIDE; | 267 OVERRIDE; |
| 263 | 268 |
| 264 // Called from LayerTreeImpl. | 269 // Called from LayerTreeImpl. |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 float overdraw_bottom_height_; | 657 float overdraw_bottom_height_; |
| 653 | 658 |
| 654 // Optional top-level constraints that can be set by the OutputSurface. | 659 // Optional top-level constraints that can be set by the OutputSurface. |
| 655 // - external_transform_ applies a transform above the root layer | 660 // - external_transform_ applies a transform above the root layer |
| 656 // - external_viewport_ is used DrawProperties, tile management and | 661 // - external_viewport_ is used DrawProperties, tile management and |
| 657 // glViewport/window projection matrix. | 662 // glViewport/window projection matrix. |
| 658 // - external_clip_ specifies a top-level clip rect | 663 // - external_clip_ specifies a top-level clip rect |
| 659 gfx::Transform external_transform_; | 664 gfx::Transform external_transform_; |
| 660 gfx::Rect external_viewport_; | 665 gfx::Rect external_viewport_; |
| 661 gfx::Rect external_clip_; | 666 gfx::Rect external_clip_; |
| 667 bool resourceless_software_draw_; |
| 662 bool device_viewport_valid_for_tile_management_; | 668 bool device_viewport_valid_for_tile_management_; |
| 663 | 669 |
| 664 gfx::Rect viewport_damage_rect_; | 670 gfx::Rect viewport_damage_rect_; |
| 665 | 671 |
| 666 base::TimeTicks current_frame_timeticks_; | 672 base::TimeTicks current_frame_timeticks_; |
| 667 | 673 |
| 668 // Expected time between two begin impl frame calls. | 674 // Expected time between two begin impl frame calls. |
| 669 base::TimeDelta begin_impl_frame_interval_; | 675 base::TimeDelta begin_impl_frame_interval_; |
| 670 | 676 |
| 671 scoped_ptr<AnimationRegistrar> animation_registrar_; | 677 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 689 size_t transfer_buffer_memory_limit_; | 695 size_t transfer_buffer_memory_limit_; |
| 690 | 696 |
| 691 std::vector<PictureLayerImpl*> picture_layers_; | 697 std::vector<PictureLayerImpl*> picture_layers_; |
| 692 | 698 |
| 693 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 699 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 694 }; | 700 }; |
| 695 | 701 |
| 696 } // namespace cc | 702 } // namespace cc |
| 697 | 703 |
| 698 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 704 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |