Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(618)

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 246753008: cc: Unify use of DidSwapBuffers() and did_request_swap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 506
508 void TrackDamageForAllSurfaces( 507 void TrackDamageForAllSurfaces(
509 LayerImpl* root_draw_layer, 508 LayerImpl* root_draw_layer,
510 const LayerImplList& render_surface_layer_list); 509 const LayerImplList& render_surface_layer_list);
511 510
512 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); 511 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy);
513 512
514 // This function should only be called from PrepareToDraw, as DidDrawAllLayers 513 // This function should only be called from PrepareToDraw, as DidDrawAllLayers
515 // must be called if this helper function is called. Returns DRAW_SUCCESS if 514 // must be called if this helper function is called. Returns DRAW_SUCCESS if
516 // the frame should be drawn. 515 // the frame should be drawn.
517 DrawSwapReadbackResult::DrawResult CalculateRenderPasses(FrameData* frame); 516 DrawResult CalculateRenderPasses(FrameData* frame);
518 517
519 void SendReleaseResourcesRecursive(LayerImpl* current); 518 void SendReleaseResourcesRecursive(LayerImpl* current);
520 bool EnsureRenderSurfaceLayerList(); 519 bool EnsureRenderSurfaceLayerList();
521 void ClearCurrentlyScrollingLayer(); 520 void ClearCurrentlyScrollingLayer();
522 521
523 bool HandleMouseOverScrollbar(LayerImpl* layer_impl, 522 bool HandleMouseOverScrollbar(LayerImpl* layer_impl,
524 const gfx::PointF& device_viewport_point); 523 const gfx::PointF& device_viewport_point);
525 524
526 void AnimateScrollbarsRecursive(LayerImpl* layer, 525 void AnimateScrollbarsRecursive(LayerImpl* layer,
527 base::TimeTicks time); 526 base::TimeTicks time);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 680 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
682 681
683 size_t transfer_buffer_memory_limit_; 682 size_t transfer_buffer_memory_limit_;
684 683
685 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 684 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
686 }; 685 };
687 686
688 } // namespace cc 687 } // namespace cc
689 688
690 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 689 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698