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

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: Introduce HasSentDrawRequestThisFrame() 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 void UpdateBackgroundAnimateTicking(bool should_background_tick); 177 void UpdateBackgroundAnimateTicking(bool should_background_tick);
178 void DidAnimateScrollOffset(); 178 void DidAnimateScrollOffset();
179 void SetViewportDamage(const gfx::Rect& damage_rect); 179 void SetViewportDamage(const gfx::Rect& damage_rect);
180 180
181 virtual void ManageTiles(); 181 virtual void ManageTiles();
182 182
183 // Returns false if problems occured preparing the frame, and we should try 183 // Returns false if problems occured preparing the frame, and we should try
184 // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers 184 // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers
185 // must also be called, regardless of whether DrawLayers is called between the 185 // must also be called, regardless of whether DrawLayers is called between the
186 // two. 186 // two.
187 virtual DrawSwapReadbackResult::DrawResult PrepareToDraw( 187 virtual DrawResult PrepareToDraw(FrameData* frame,
188 FrameData* frame, 188 const gfx::Rect& damage_rect);
189 const gfx::Rect& damage_rect);
190 virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time); 189 virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time);
191 // Must be called if and only if PrepareToDraw was called. 190 // Must be called if and only if PrepareToDraw was called.
192 void DidDrawAllLayers(const FrameData& frame); 191 void DidDrawAllLayers(const FrameData& frame);
193 192
194 const LayerTreeSettings& settings() const { return settings_; } 193 const LayerTreeSettings& settings() const { return settings_; }
195 194
196 // Evict all textures by enforcing a memory policy with an allocation of 0. 195 // Evict all textures by enforcing a memory policy with an allocation of 0.
197 void EvictTexturesForTesting(); 196 void EvictTexturesForTesting();
198 197
199 // When blocking, this prevents client_->NotifyReadyToActivate() from being 198 // When blocking, this prevents client_->NotifyReadyToActivate() from being
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 485
487 void TrackDamageForAllSurfaces( 486 void TrackDamageForAllSurfaces(
488 LayerImpl* root_draw_layer, 487 LayerImpl* root_draw_layer,
489 const LayerImplList& render_surface_layer_list); 488 const LayerImplList& render_surface_layer_list);
490 489
491 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); 490 void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy);
492 491
493 // This function should only be called from PrepareToDraw, as DidDrawAllLayers 492 // This function should only be called from PrepareToDraw, as DidDrawAllLayers
494 // must be called if this helper function is called. Returns DRAW_SUCCESS if 493 // must be called if this helper function is called. Returns DRAW_SUCCESS if
495 // the frame should be drawn. 494 // the frame should be drawn.
496 DrawSwapReadbackResult::DrawResult CalculateRenderPasses(FrameData* frame); 495 DrawResult CalculateRenderPasses(FrameData* frame);
497 496
498 void SendReleaseResourcesRecursive(LayerImpl* current); 497 void SendReleaseResourcesRecursive(LayerImpl* current);
499 bool EnsureRenderSurfaceLayerList(); 498 bool EnsureRenderSurfaceLayerList();
500 void ClearCurrentlyScrollingLayer(); 499 void ClearCurrentlyScrollingLayer();
501 500
502 bool HandleMouseOverScrollbar(LayerImpl* layer_impl, 501 bool HandleMouseOverScrollbar(LayerImpl* layer_impl,
503 const gfx::PointF& device_viewport_point); 502 const gfx::PointF& device_viewport_point);
504 503
505 void AnimateScrollbarsRecursive(LayerImpl* layer, 504 void AnimateScrollbarsRecursive(LayerImpl* layer,
506 base::TimeTicks time); 505 base::TimeTicks time);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 int id_; 653 int id_;
655 654
656 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 655 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
657 656
658 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 657 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
659 }; 658 };
660 659
661 } // namespace cc 660 } // namespace cc
662 661
663 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 662 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698