| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 // Resets all of the trees to an empty state. | 216 // Resets all of the trees to an empty state. |
| 217 void ResetTreesForTesting(); | 217 void ResetTreesForTesting(); |
| 218 | 218 |
| 219 DrawMode GetDrawMode() const; | 219 DrawMode GetDrawMode() const; |
| 220 | 220 |
| 221 // Viewport size in draw space: this size is in physical pixels and is used | 221 // Viewport size in draw space: this size is in physical pixels and is used |
| 222 // for draw properties, tilings, quads and render passes. | 222 // for draw properties, tilings, quads and render passes. |
| 223 gfx::Size DrawViewportSize() const; | 223 gfx::Size DrawViewportSize() const; |
| 224 | 224 |
| 225 // Viewport rect in screen space used for tiling prioritization. |
| 226 gfx::Rect TilingViewportRect() const; |
| 227 const gfx::Transform& TilingTransform() const; |
| 228 |
| 225 // Viewport size for scrolling and fixed-position compensation. This value | 229 // Viewport size for scrolling and fixed-position compensation. This value |
| 226 // excludes the URL bar and non-overlay scrollbars and is in DIP (and | 230 // excludes the URL bar and non-overlay scrollbars and is in DIP (and |
| 227 // invariant relative to page scale). | 231 // invariant relative to page scale). |
| 228 gfx::SizeF UnscaledScrollableViewportSize() const; | 232 gfx::SizeF UnscaledScrollableViewportSize() const; |
| 229 float VerticalAdjust() const; | 233 float VerticalAdjust() const; |
| 230 | 234 |
| 231 // RendererClient implementation. | 235 // RendererClient implementation. |
| 232 virtual void SetFullRootLayerDamage() OVERRIDE; | 236 virtual void SetFullRootLayerDamage() OVERRIDE; |
| 233 virtual void RunOnDemandRasterTask(Task* on_demand_raster_task) OVERRIDE; | 237 virtual void RunOnDemandRasterTask(Task* on_demand_raster_task) OVERRIDE; |
| 234 | 238 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 246 virtual void DeferredInitialize() OVERRIDE; | 250 virtual void DeferredInitialize() OVERRIDE; |
| 247 virtual void ReleaseGL() OVERRIDE; | 251 virtual void ReleaseGL() OVERRIDE; |
| 248 virtual void CommitVSyncParameters(base::TimeTicks timebase, | 252 virtual void CommitVSyncParameters(base::TimeTicks timebase, |
| 249 base::TimeDelta interval) OVERRIDE; | 253 base::TimeDelta interval) OVERRIDE; |
| 250 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; | 254 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; |
| 251 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; | 255 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; |
| 252 virtual void SetExternalDrawConstraints( | 256 virtual void SetExternalDrawConstraints( |
| 253 const gfx::Transform& transform, | 257 const gfx::Transform& transform, |
| 254 const gfx::Rect& viewport, | 258 const gfx::Rect& viewport, |
| 255 const gfx::Rect& clip, | 259 const gfx::Rect& clip, |
| 260 const gfx::Rect& device_rect_for_tiling, |
| 256 bool resourceless_software_draw) OVERRIDE; | 261 bool resourceless_software_draw) OVERRIDE; |
| 257 virtual void DidLoseOutputSurface() OVERRIDE; | 262 virtual void DidLoseOutputSurface() OVERRIDE; |
| 258 virtual void DidSwapBuffers() OVERRIDE; | 263 virtual void DidSwapBuffers() OVERRIDE; |
| 259 virtual void DidSwapBuffersComplete() OVERRIDE; | 264 virtual void DidSwapBuffersComplete() OVERRIDE; |
| 260 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; | 265 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; |
| 261 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; | 266 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; |
| 262 virtual void SetTreeActivationCallback(const base::Closure& callback) | 267 virtual void SetTreeActivationCallback(const base::Closure& callback) |
| 263 OVERRIDE; | 268 OVERRIDE; |
| 264 | 269 |
| 265 // Called from LayerTreeImpl. | 270 // Called from LayerTreeImpl. |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 float overdraw_bottom_height_; | 664 float overdraw_bottom_height_; |
| 660 | 665 |
| 661 // Optional top-level constraints that can be set by the OutputSurface. | 666 // Optional top-level constraints that can be set by the OutputSurface. |
| 662 // - external_transform_ applies a transform above the root layer | 667 // - external_transform_ applies a transform above the root layer |
| 663 // - external_viewport_ is used DrawProperties, tile management and | 668 // - external_viewport_ is used DrawProperties, tile management and |
| 664 // glViewport/window projection matrix. | 669 // glViewport/window projection matrix. |
| 665 // - external_clip_ specifies a top-level clip rect | 670 // - external_clip_ specifies a top-level clip rect |
| 666 gfx::Transform external_transform_; | 671 gfx::Transform external_transform_; |
| 667 gfx::Rect external_viewport_; | 672 gfx::Rect external_viewport_; |
| 668 gfx::Rect external_clip_; | 673 gfx::Rect external_clip_; |
| 674 gfx::Rect external_viewport_rect_for_tiling_; |
| 675 gfx::Transform external_transform_for_tiling_; |
| 669 bool resourceless_software_draw_; | 676 bool resourceless_software_draw_; |
| 670 | 677 |
| 671 gfx::Rect viewport_damage_rect_; | 678 gfx::Rect viewport_damage_rect_; |
| 672 | 679 |
| 673 base::TimeTicks current_frame_timeticks_; | 680 base::TimeTicks current_frame_timeticks_; |
| 674 | 681 |
| 675 // Expected time between two begin impl frame calls. | 682 // Expected time between two begin impl frame calls. |
| 676 base::TimeDelta begin_impl_frame_interval_; | 683 base::TimeDelta begin_impl_frame_interval_; |
| 677 | 684 |
| 678 scoped_ptr<AnimationRegistrar> animation_registrar_; | 685 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 696 size_t transfer_buffer_memory_limit_; | 703 size_t transfer_buffer_memory_limit_; |
| 697 | 704 |
| 698 std::vector<PictureLayerImpl*> picture_layers_; | 705 std::vector<PictureLayerImpl*> picture_layers_; |
| 699 | 706 |
| 700 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 707 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 701 }; | 708 }; |
| 702 | 709 |
| 703 } // namespace cc | 710 } // namespace cc |
| 704 | 711 |
| 705 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 712 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |