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 13 matching lines...) Expand all Loading... |
24 #include "cc/input/top_controls_manager_client.h" | 24 #include "cc/input/top_controls_manager_client.h" |
25 #include "cc/layers/layer_lists.h" | 25 #include "cc/layers/layer_lists.h" |
26 #include "cc/layers/render_pass_sink.h" | 26 #include "cc/layers/render_pass_sink.h" |
27 #include "cc/output/begin_frame_args.h" | 27 #include "cc/output/begin_frame_args.h" |
28 #include "cc/output/managed_memory_policy.h" | 28 #include "cc/output/managed_memory_policy.h" |
29 #include "cc/output/output_surface_client.h" | 29 #include "cc/output/output_surface_client.h" |
30 #include "cc/output/renderer.h" | 30 #include "cc/output/renderer.h" |
31 #include "cc/quads/render_pass.h" | 31 #include "cc/quads/render_pass.h" |
32 #include "cc/resources/resource_provider.h" | 32 #include "cc/resources/resource_provider.h" |
33 #include "cc/resources/tile_manager.h" | 33 #include "cc/resources/tile_manager.h" |
34 #include "cc/scheduler/draw_swap_readback_result.h" | 34 #include "cc/scheduler/draw_result.h" |
35 #include "skia/ext/refptr.h" | 35 #include "skia/ext/refptr.h" |
36 #include "third_party/skia/include/core/SkColor.h" | 36 #include "third_party/skia/include/core/SkColor.h" |
37 #include "ui/gfx/rect.h" | 37 #include "ui/gfx/rect.h" |
38 | 38 |
39 namespace cc { | 39 namespace cc { |
40 | 40 |
41 class CompletionEvent; | 41 class CompletionEvent; |
42 class CompositorFrameMetadata; | 42 class CompositorFrameMetadata; |
43 class DebugRectHistory; | 43 class DebugRectHistory; |
44 class FrameRateCounter; | 44 class FrameRateCounter; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 void UpdateBackgroundAnimateTicking(bool should_background_tick); | 185 void UpdateBackgroundAnimateTicking(bool should_background_tick); |
186 void DidAnimateScrollOffset(); | 186 void DidAnimateScrollOffset(); |
187 void SetViewportDamage(const gfx::Rect& damage_rect); | 187 void SetViewportDamage(const gfx::Rect& damage_rect); |
188 | 188 |
189 virtual void ManageTiles(); | 189 virtual void ManageTiles(); |
190 | 190 |
191 // Returns false if problems occured preparing the frame, and we should try | 191 // Returns false if problems occured preparing the frame, and we should try |
192 // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers | 192 // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers |
193 // must also be called, regardless of whether DrawLayers is called between the | 193 // must also be called, regardless of whether DrawLayers is called between the |
194 // two. | 194 // two. |
195 virtual DrawSwapReadbackResult::DrawResult PrepareToDraw( | 195 virtual DrawResult PrepareToDraw(FrameData* frame, |
196 FrameData* frame, | 196 const gfx::Rect& damage_rect); |
197 const gfx::Rect& damage_rect); | |
198 virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time); | 197 virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time); |
199 // Must be called if and only if PrepareToDraw was called. | 198 // Must be called if and only if PrepareToDraw was called. |
200 void DidDrawAllLayers(const FrameData& frame); | 199 void DidDrawAllLayers(const FrameData& frame); |
201 | 200 |
202 const LayerTreeSettings& settings() const { return settings_; } | 201 const LayerTreeSettings& settings() const { return settings_; } |
203 | 202 |
204 // Evict all textures by enforcing a memory policy with an allocation of 0. | 203 // Evict all textures by enforcing a memory policy with an allocation of 0. |
205 void EvictTexturesForTesting(); | 204 void EvictTexturesForTesting(); |
206 | 205 |
207 // When blocking, this prevents client_->NotifyReadyToActivate() from being | 206 // When blocking, this prevents client_->NotifyReadyToActivate() from being |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 | 501 |
503 void TrackDamageForAllSurfaces( | 502 void TrackDamageForAllSurfaces( |
504 LayerImpl* root_draw_layer, | 503 LayerImpl* root_draw_layer, |
505 const LayerImplList& render_surface_layer_list); | 504 const LayerImplList& render_surface_layer_list); |
506 | 505 |
507 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); | 506 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); |
508 | 507 |
509 // This function should only be called from PrepareToDraw, as DidDrawAllLayers | 508 // This function should only be called from PrepareToDraw, as DidDrawAllLayers |
510 // must be called if this helper function is called. Returns DRAW_SUCCESS if | 509 // must be called if this helper function is called. Returns DRAW_SUCCESS if |
511 // the frame should be drawn. | 510 // the frame should be drawn. |
512 DrawSwapReadbackResult::DrawResult CalculateRenderPasses(FrameData* frame); | 511 DrawResult CalculateRenderPasses(FrameData* frame); |
513 | 512 |
514 void SendReleaseResourcesRecursive(LayerImpl* current); | 513 void SendReleaseResourcesRecursive(LayerImpl* current); |
515 bool EnsureRenderSurfaceLayerList(); | 514 bool EnsureRenderSurfaceLayerList(); |
516 void ClearCurrentlyScrollingLayer(); | 515 void ClearCurrentlyScrollingLayer(); |
517 | 516 |
518 bool HandleMouseOverScrollbar(LayerImpl* layer_impl, | 517 bool HandleMouseOverScrollbar(LayerImpl* layer_impl, |
519 const gfx::PointF& device_viewport_point); | 518 const gfx::PointF& device_viewport_point); |
520 | 519 |
521 void AnimateScrollbarsRecursive(LayerImpl* layer, | 520 void AnimateScrollbarsRecursive(LayerImpl* layer, |
522 base::TimeTicks time); | 521 base::TimeTicks time); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 672 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
674 | 673 |
675 size_t transfer_buffer_memory_limit_; | 674 size_t transfer_buffer_memory_limit_; |
676 | 675 |
677 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 676 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
678 }; | 677 }; |
679 | 678 |
680 } // namespace cc | 679 } // namespace cc |
681 | 680 |
682 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 681 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |