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

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

Issue 206793003: cc: Split animating and drawing into separate actions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. Created 6 years, 8 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // LayerTreeHost->Proxy callback interface. 59 // LayerTreeHost->Proxy callback interface.
60 class LayerTreeHostImplClient { 60 class LayerTreeHostImplClient {
61 public: 61 public:
62 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; 62 virtual void UpdateRendererCapabilitiesOnImplThread() = 0;
63 virtual void DidLoseOutputSurfaceOnImplThread() = 0; 63 virtual void DidLoseOutputSurfaceOnImplThread() = 0;
64 virtual void DidSwapBuffersOnImplThread() = 0; 64 virtual void DidSwapBuffersOnImplThread() = 0;
65 virtual void OnSwapBuffersCompleteOnImplThread() = 0; 65 virtual void OnSwapBuffersCompleteOnImplThread() = 0;
66 virtual void BeginImplFrame(const BeginFrameArgs& args) = 0; 66 virtual void BeginImplFrame(const BeginFrameArgs& args) = 0;
67 virtual void OnCanDrawStateChanged(bool can_draw) = 0; 67 virtual void OnCanDrawStateChanged(bool can_draw) = 0;
68 virtual void NotifyReadyToActivate() = 0; 68 virtual void NotifyReadyToActivate() = 0;
69 // Please call these 2 functions through 69 // Please call these 3 functions through
70 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). 70 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and
71 // SetNeedsAnimate().
71 virtual void SetNeedsRedrawOnImplThread() = 0; 72 virtual void SetNeedsRedrawOnImplThread() = 0;
72 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; 73 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0;
74 virtual void SetNeedsAnimateOnImplThread() = 0;
73 virtual void DidInitializeVisibleTileOnImplThread() = 0; 75 virtual void DidInitializeVisibleTileOnImplThread() = 0;
74 virtual void SetNeedsCommitOnImplThread() = 0; 76 virtual void SetNeedsCommitOnImplThread() = 0;
75 virtual void SetNeedsManageTilesOnImplThread() = 0; 77 virtual void SetNeedsManageTilesOnImplThread() = 0;
76 virtual void PostAnimationEventsToMainThreadOnImplThread( 78 virtual void PostAnimationEventsToMainThreadOnImplThread(
77 scoped_ptr<AnimationEventsVector> events) = 0; 79 scoped_ptr<AnimationEventsVector> events) = 0;
78 // Returns true if resources were deleted by this call. 80 // Returns true if resources were deleted by this call.
79 virtual bool ReduceContentsTextureMemoryOnImplThread( 81 virtual bool ReduceContentsTextureMemoryOnImplThread(
80 size_t limit_bytes, 82 size_t limit_bytes,
81 int priority_cutoff) = 0; 83 int priority_cutoff) = 0;
82 virtual void SendManagedMemoryStats() = 0; 84 virtual void SendManagedMemoryStats() = 0;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 return scroll_layer_id_when_mouse_over_scrollbar_; 290 return scroll_layer_id_when_mouse_over_scrollbar_;
289 } 291 }
290 292
291 bool IsCurrentlyScrolling() const; 293 bool IsCurrentlyScrolling() const;
292 294
293 virtual void SetVisible(bool visible); 295 virtual void SetVisible(bool visible);
294 bool visible() const { return visible_; } 296 bool visible() const { return visible_; }
295 297
296 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); } 298 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); }
297 void SetNeedsRedraw(); 299 void SetNeedsRedraw();
300 void SetNeedsAnimate();
298 301
299 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; 302 ManagedMemoryPolicy ActualManagedMemoryPolicy() const;
300 303
301 size_t memory_allocation_limit_bytes() const; 304 size_t memory_allocation_limit_bytes() const;
302 int memory_allocation_priority_cutoff() const; 305 int memory_allocation_priority_cutoff() const;
303 306
304 void SetViewportSize(const gfx::Size& device_viewport_size); 307 void SetViewportSize(const gfx::Size& device_viewport_size);
305 308
306 void SetOverdrawBottomHeight(float overdraw_bottom_height); 309 void SetOverdrawBottomHeight(float overdraw_bottom_height);
307 float overdraw_bottom_height() const { return overdraw_bottom_height_; } 310 float overdraw_bottom_height() const { return overdraw_bottom_height_; }
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 int id_; 656 int id_;
654 657
655 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 658 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
656 659
657 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 660 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
658 }; 661 };
659 662
660 } // namespace cc 663 } // namespace cc
661 664
662 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 665 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698