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

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

Issue 767083005: cc: Rename TileManager::ManageTiles to PrepareTiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 virtual void OnCanDrawStateChanged(bool can_draw) = 0; 85 virtual void OnCanDrawStateChanged(bool can_draw) = 0;
86 virtual void NotifyReadyToActivate() = 0; 86 virtual void NotifyReadyToActivate() = 0;
87 virtual void NotifyReadyToDraw() = 0; 87 virtual void NotifyReadyToDraw() = 0;
88 // Please call these 3 functions through 88 // Please call these 3 functions through
89 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and 89 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and
90 // SetNeedsAnimate(). 90 // SetNeedsAnimate().
91 virtual void SetNeedsRedrawOnImplThread() = 0; 91 virtual void SetNeedsRedrawOnImplThread() = 0;
92 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; 92 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0;
93 virtual void SetNeedsAnimateOnImplThread() = 0; 93 virtual void SetNeedsAnimateOnImplThread() = 0;
94 virtual void SetNeedsCommitOnImplThread() = 0; 94 virtual void SetNeedsCommitOnImplThread() = 0;
95 virtual void SetNeedsManageTilesOnImplThread() = 0; 95 virtual void SetNeedsPrepareTilesOnImplThread() = 0;
96 virtual void PostAnimationEventsToMainThreadOnImplThread( 96 virtual void PostAnimationEventsToMainThreadOnImplThread(
97 scoped_ptr<AnimationEventsVector> events) = 0; 97 scoped_ptr<AnimationEventsVector> events) = 0;
98 // Returns true if resources were deleted by this call. 98 // Returns true if resources were deleted by this call.
99 virtual bool ReduceContentsTextureMemoryOnImplThread( 99 virtual bool ReduceContentsTextureMemoryOnImplThread(
100 size_t limit_bytes, 100 size_t limit_bytes,
101 int priority_cutoff) = 0; 101 int priority_cutoff) = 0;
102 virtual bool IsInsideDraw() = 0; 102 virtual bool IsInsideDraw() = 0;
103 virtual void RenewTreePriority() = 0; 103 virtual void RenewTreePriority() = 0;
104 virtual void PostDelayedScrollbarFadeOnImplThread( 104 virtual void PostDelayedScrollbarFadeOnImplThread(
105 const base::Closure& start_fade, 105 const base::Closure& start_fade,
106 base::TimeDelta delay) = 0; 106 base::TimeDelta delay) = 0;
107 virtual void DidActivateSyncTree() = 0; 107 virtual void DidActivateSyncTree() = 0;
108 virtual void DidManageTiles() = 0; 108 virtual void DidPrepareTiles() = 0;
109 109
110 protected: 110 protected:
111 virtual ~LayerTreeHostImplClient() {} 111 virtual ~LayerTreeHostImplClient() {}
112 }; 112 };
113 113
114 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering 114 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering
115 // state. 115 // state.
116 class CC_EXPORT LayerTreeHostImpl 116 class CC_EXPORT LayerTreeHostImpl
117 : public InputHandler, 117 : public InputHandler,
118 public RendererClient, 118 public RendererClient,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 virtual void BeginMainFrameAborted(bool did_handle); 193 virtual void BeginMainFrameAborted(bool did_handle);
194 virtual void BeginCommit(); 194 virtual void BeginCommit();
195 virtual void CommitComplete(); 195 virtual void CommitComplete();
196 virtual void Animate(base::TimeTicks monotonic_time); 196 virtual void Animate(base::TimeTicks monotonic_time);
197 virtual void UpdateAnimationState(bool start_ready_animations); 197 virtual void UpdateAnimationState(bool start_ready_animations);
198 void ActivateAnimations(); 198 void ActivateAnimations();
199 void MainThreadHasStoppedFlinging(); 199 void MainThreadHasStoppedFlinging();
200 void DidAnimateScrollOffset(); 200 void DidAnimateScrollOffset();
201 void SetViewportDamage(const gfx::Rect& damage_rect); 201 void SetViewportDamage(const gfx::Rect& damage_rect);
202 202
203 virtual void ManageTiles(); 203 virtual void PrepareTiles();
204 204
205 // Returns DRAW_SUCCESS unless problems occured preparing the frame, and we 205 // Returns DRAW_SUCCESS unless problems occured preparing the frame, and we
206 // should try to avoid displaying the frame. If PrepareToDraw is called, 206 // should try to avoid displaying the frame. If PrepareToDraw is called,
207 // DidDrawAllLayers must also be called, regardless of whether DrawLayers is 207 // DidDrawAllLayers must also be called, regardless of whether DrawLayers is
208 // called between the two. 208 // called between the two.
209 virtual DrawResult PrepareToDraw(FrameData* frame); 209 virtual DrawResult PrepareToDraw(FrameData* frame);
210 virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time); 210 virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time);
211 // Must be called if and only if PrepareToDraw was called. 211 // Must be called if and only if PrepareToDraw was called.
212 void DidDrawAllLayers(const FrameData& frame); 212 void DidDrawAllLayers(const FrameData& frame);
213 213
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 516
517 void UpdateViewportContainerSizes(); 517 void UpdateViewportContainerSizes();
518 518
519 // Virtual for testing. 519 // Virtual for testing.
520 virtual void AnimateLayers(base::TimeTicks monotonic_time); 520 virtual void AnimateLayers(base::TimeTicks monotonic_time);
521 const AnimationRegistrar::AnimationControllerMap& 521 const AnimationRegistrar::AnimationControllerMap&
522 active_animation_controllers() const { 522 active_animation_controllers() const {
523 return animation_registrar_->active_animation_controllers(); 523 return animation_registrar_->active_animation_controllers();
524 } 524 }
525 525
526 bool manage_tiles_needed() const { return tile_priorities_dirty_; } 526 bool prepare_tiles_needed() const { return tile_priorities_dirty_; }
527 527
528 LayerTreeHostImplClient* client_; 528 LayerTreeHostImplClient* client_;
529 Proxy* proxy_; 529 Proxy* proxy_;
530 530
531 private: 531 private:
532 void CreateAndSetRenderer(); 532 void CreateAndSetRenderer();
533 void CreateAndSetTileManager(); 533 void CreateAndSetTileManager();
534 void DestroyTileManager(); 534 void DestroyTileManager();
535 void ReleaseTreeResources(); 535 void ReleaseTreeResources();
536 void EnforceZeroBudget(bool zero_budget); 536 void EnforceZeroBudget(bool zero_budget);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 726
727 bool requires_high_res_to_draw_; 727 bool requires_high_res_to_draw_;
728 bool required_for_draw_tile_is_top_of_raster_queue_; 728 bool required_for_draw_tile_is_top_of_raster_queue_;
729 729
730 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 730 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
731 }; 731 };
732 732
733 } // namespace cc 733 } // namespace cc
734 734
735 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 735 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698