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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 | 415 |
416 bool create_low_res_tiling() const { | 416 bool create_low_res_tiling() const { |
417 return settings_.create_low_res_tiling && !use_gpu_rasterization_; | 417 return settings_.create_low_res_tiling && !use_gpu_rasterization_; |
418 } | 418 } |
419 ResourcePool* resource_pool() { return resource_pool_.get(); } | 419 ResourcePool* resource_pool() { return resource_pool_.get(); } |
420 DelegatingRenderer* renderer() { return renderer_.get(); } | 420 DelegatingRenderer* renderer() { return renderer_.get(); } |
421 ImageDecodeController* image_decode_controller() { | 421 ImageDecodeController* image_decode_controller() { |
422 return image_decode_controller_.get(); | 422 return image_decode_controller_.get(); |
423 } | 423 } |
424 | 424 |
425 bool SwapBuffers(const FrameData& frame); | 425 virtual bool SwapBuffers(const FrameData& frame); |
426 virtual void WillBeginImplFrame(const BeginFrameArgs& args); | 426 virtual void WillBeginImplFrame(const BeginFrameArgs& args); |
427 virtual void DidFinishImplFrame(); | 427 virtual void DidFinishImplFrame(); |
428 void DidModifyTilePriorities(); | 428 void DidModifyTilePriorities(); |
429 | 429 |
430 LayerTreeImpl* active_tree() { return active_tree_.get(); } | 430 LayerTreeImpl* active_tree() { return active_tree_.get(); } |
431 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } | 431 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } |
432 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } | 432 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } |
433 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } | 433 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } |
434 LayerTreeImpl* recycle_tree() { return recycle_tree_.get(); } | 434 LayerTreeImpl* recycle_tree() { return recycle_tree_.get(); } |
435 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } | 435 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 | 841 |
842 std::unique_ptr<PendingTreeDurationHistogramTimer> | 842 std::unique_ptr<PendingTreeDurationHistogramTimer> |
843 pending_tree_duration_timer_; | 843 pending_tree_duration_timer_; |
844 | 844 |
845 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 845 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
846 }; | 846 }; |
847 | 847 |
848 } // namespace cc | 848 } // namespace cc |
849 | 849 |
850 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 850 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |