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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <bitset> | 10 #include <bitset> |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 gfx::ScrollOffset GetScrollOffsetForAnimation( | 302 gfx::ScrollOffset GetScrollOffsetForAnimation( |
303 ElementId element_id) const override; | 303 ElementId element_id) const override; |
304 | 304 |
305 virtual bool PrepareTiles(); | 305 virtual bool PrepareTiles(); |
306 | 306 |
307 // Returns DRAW_SUCCESS unless problems occured preparing the frame, and we | 307 // Returns DRAW_SUCCESS unless problems occured preparing the frame, and we |
308 // should try to avoid displaying the frame. If PrepareToDraw is called, | 308 // should try to avoid displaying the frame. If PrepareToDraw is called, |
309 // DidDrawAllLayers must also be called, regardless of whether DrawLayers is | 309 // DidDrawAllLayers must also be called, regardless of whether DrawLayers is |
310 // called between the two. | 310 // called between the two. |
311 virtual DrawResult PrepareToDraw(FrameData* frame); | 311 virtual DrawResult PrepareToDraw(FrameData* frame); |
312 virtual void DrawLayers(FrameData* frame); | 312 void DrawLayers(FrameData* frame); |
313 // Must be called if and only if PrepareToDraw was called. | 313 // Must be called if and only if PrepareToDraw was called. |
314 void DidDrawAllLayers(const FrameData& frame); | 314 void DidDrawAllLayers(const FrameData& frame); |
315 | 315 |
316 const LayerTreeSettings& settings() const { return settings_; } | 316 const LayerTreeSettings& settings() const { return settings_; } |
317 | 317 |
318 // Evict all textures by enforcing a memory policy with an allocation of 0. | 318 // Evict all textures by enforcing a memory policy with an allocation of 0. |
319 void EvictTexturesForTesting(); | 319 void EvictTexturesForTesting(); |
320 | 320 |
321 // When blocking, this prevents client_->NotifyReadyToActivate() from being | 321 // When blocking, this prevents client_->NotifyReadyToActivate() from being |
322 // called. When disabled, it calls client_->NotifyReadyToActivate() | 322 // called. When disabled, it calls client_->NotifyReadyToActivate() |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 | 413 |
414 bool create_low_res_tiling() const { | 414 bool create_low_res_tiling() const { |
415 return settings_.create_low_res_tiling && !use_gpu_rasterization_; | 415 return settings_.create_low_res_tiling && !use_gpu_rasterization_; |
416 } | 416 } |
417 ResourcePool* resource_pool() { return resource_pool_.get(); } | 417 ResourcePool* resource_pool() { return resource_pool_.get(); } |
418 DelegatingRenderer* renderer() { return renderer_.get(); } | 418 DelegatingRenderer* renderer() { return renderer_.get(); } |
419 ImageDecodeController* image_decode_controller() { | 419 ImageDecodeController* image_decode_controller() { |
420 return image_decode_controller_.get(); | 420 return image_decode_controller_.get(); |
421 } | 421 } |
422 | 422 |
423 bool SwapBuffers(const FrameData& frame); | 423 virtual bool SwapBuffers(const FrameData& frame); |
424 virtual void WillBeginImplFrame(const BeginFrameArgs& args); | 424 virtual void WillBeginImplFrame(const BeginFrameArgs& args); |
425 virtual void DidFinishImplFrame(); | 425 virtual void DidFinishImplFrame(); |
426 void DidModifyTilePriorities(); | 426 void DidModifyTilePriorities(); |
427 | 427 |
428 LayerTreeImpl* active_tree() { return active_tree_.get(); } | 428 LayerTreeImpl* active_tree() { return active_tree_.get(); } |
429 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } | 429 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } |
430 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } | 430 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } |
431 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } | 431 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } |
432 LayerTreeImpl* recycle_tree() { return recycle_tree_.get(); } | 432 LayerTreeImpl* recycle_tree() { return recycle_tree_.get(); } |
433 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } | 433 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 | 852 |
853 std::unique_ptr<PendingTreeDurationHistogramTimer> | 853 std::unique_ptr<PendingTreeDurationHistogramTimer> |
854 pending_tree_duration_timer_; | 854 pending_tree_duration_timer_; |
855 | 855 |
856 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 856 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
857 }; | 857 }; |
858 | 858 |
859 } // namespace cc | 859 } // namespace cc |
860 | 860 |
861 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 861 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |