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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 // called. When disabled, it calls client_->NotifyReadyToActivate() | 209 // called. When disabled, it calls client_->NotifyReadyToActivate() |
210 // immediately if any notifications had been blocked while blocking. | 210 // immediately if any notifications had been blocked while blocking. |
211 virtual void BlockNotifyReadyToActivateForTesting(bool block); | 211 virtual void BlockNotifyReadyToActivateForTesting(bool block); |
212 | 212 |
213 // This allows us to inject DidInitializeVisibleTile events for testing. | 213 // This allows us to inject DidInitializeVisibleTile events for testing. |
214 void DidInitializeVisibleTileForTesting(); | 214 void DidInitializeVisibleTileForTesting(); |
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 bool device_viewport_valid_for_tile_management() const { | 219 DrawMode GetDrawMode() const; |
220 return device_viewport_valid_for_tile_management_; | |
221 } | |
222 | 220 |
223 // 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 |
224 // for draw properties, tilings, quads and render passes. | 222 // for draw properties, tilings, quads and render passes. |
225 gfx::Size DrawViewportSize() const; | 223 gfx::Size DrawViewportSize() const; |
226 | 224 |
227 // Viewport size for scrolling and fixed-position compensation. This value | 225 // Viewport size for scrolling and fixed-position compensation. This value |
228 // excludes the URL bar and non-overlay scrollbars and is in DIP (and | 226 // excludes the URL bar and non-overlay scrollbars and is in DIP (and |
229 // invariant relative to page scale). | 227 // invariant relative to page scale). |
230 gfx::SizeF UnscaledScrollableViewportSize() const; | 228 gfx::SizeF UnscaledScrollableViewportSize() const; |
231 float VerticalAdjust() const; | 229 float VerticalAdjust() const; |
(...skipping 16 matching lines...) Expand all Loading... |
248 virtual void DeferredInitialize() OVERRIDE; | 246 virtual void DeferredInitialize() OVERRIDE; |
249 virtual void ReleaseGL() OVERRIDE; | 247 virtual void ReleaseGL() OVERRIDE; |
250 virtual void CommitVSyncParameters(base::TimeTicks timebase, | 248 virtual void CommitVSyncParameters(base::TimeTicks timebase, |
251 base::TimeDelta interval) OVERRIDE; | 249 base::TimeDelta interval) OVERRIDE; |
252 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; | 250 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; |
253 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; | 251 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; |
254 virtual void SetExternalDrawConstraints( | 252 virtual void SetExternalDrawConstraints( |
255 const gfx::Transform& transform, | 253 const gfx::Transform& transform, |
256 const gfx::Rect& viewport, | 254 const gfx::Rect& viewport, |
257 const gfx::Rect& clip, | 255 const gfx::Rect& clip, |
258 bool valid_for_tile_management) OVERRIDE; | 256 bool resourceless_software_draw) OVERRIDE; |
259 virtual void DidLoseOutputSurface() OVERRIDE; | 257 virtual void DidLoseOutputSurface() OVERRIDE; |
260 virtual void DidSwapBuffers() OVERRIDE; | 258 virtual void DidSwapBuffers() OVERRIDE; |
261 virtual void DidSwapBuffersComplete() OVERRIDE; | 259 virtual void DidSwapBuffersComplete() OVERRIDE; |
262 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; | 260 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; |
263 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; | 261 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; |
264 virtual void SetTreeActivationCallback(const base::Closure& callback) | 262 virtual void SetTreeActivationCallback(const base::Closure& callback) |
265 OVERRIDE; | 263 OVERRIDE; |
266 | 264 |
267 // Called from LayerTreeImpl. | 265 // Called from LayerTreeImpl. |
268 void OnCanDrawStateChangedForTree(); | 266 void OnCanDrawStateChangedForTree(); |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 float overdraw_bottom_height_; | 659 float overdraw_bottom_height_; |
662 | 660 |
663 // Optional top-level constraints that can be set by the OutputSurface. | 661 // Optional top-level constraints that can be set by the OutputSurface. |
664 // - external_transform_ applies a transform above the root layer | 662 // - external_transform_ applies a transform above the root layer |
665 // - external_viewport_ is used DrawProperties, tile management and | 663 // - external_viewport_ is used DrawProperties, tile management and |
666 // glViewport/window projection matrix. | 664 // glViewport/window projection matrix. |
667 // - external_clip_ specifies a top-level clip rect | 665 // - external_clip_ specifies a top-level clip rect |
668 gfx::Transform external_transform_; | 666 gfx::Transform external_transform_; |
669 gfx::Rect external_viewport_; | 667 gfx::Rect external_viewport_; |
670 gfx::Rect external_clip_; | 668 gfx::Rect external_clip_; |
671 bool device_viewport_valid_for_tile_management_; | 669 bool resourceless_software_draw_; |
672 | 670 |
673 gfx::Rect viewport_damage_rect_; | 671 gfx::Rect viewport_damage_rect_; |
674 | 672 |
675 base::TimeTicks current_frame_timeticks_; | 673 base::TimeTicks current_frame_timeticks_; |
676 | 674 |
677 // Expected time between two begin impl frame calls. | 675 // Expected time between two begin impl frame calls. |
678 base::TimeDelta begin_impl_frame_interval_; | 676 base::TimeDelta begin_impl_frame_interval_; |
679 | 677 |
680 scoped_ptr<AnimationRegistrar> animation_registrar_; | 678 scoped_ptr<AnimationRegistrar> animation_registrar_; |
681 | 679 |
(...skipping 16 matching lines...) Expand all Loading... |
698 size_t transfer_buffer_memory_limit_; | 696 size_t transfer_buffer_memory_limit_; |
699 | 697 |
700 std::vector<PictureLayerImpl*> picture_layers_; | 698 std::vector<PictureLayerImpl*> picture_layers_; |
701 | 699 |
702 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 700 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
703 }; | 701 }; |
704 | 702 |
705 } // namespace cc | 703 } // namespace cc |
706 | 704 |
707 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 705 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |