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

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

Issue 267783004: Refactoring the way begin frame sources inside scheduler work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Scheduler tests now pass and the code is cleaner. Created 6 years, 6 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
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SINGLE_THREAD_PROXY_H_ 5 #ifndef CC_TREES_SINGLE_THREAD_PROXY_H_
6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ 6 #define CC_TREES_SINGLE_THREAD_PROXY_H_
7 7
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual void Start() OVERRIDE; 46 virtual void Start() OVERRIDE;
47 virtual void Stop() OVERRIDE; 47 virtual void Stop() OVERRIDE;
48 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; 48 virtual size_t MaxPartialTextureUpdates() const OVERRIDE;
49 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; 49 virtual void ForceSerializeOnSwapBuffers() OVERRIDE;
50 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; 50 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE;
51 virtual bool CommitPendingForTesting() OVERRIDE; 51 virtual bool CommitPendingForTesting() OVERRIDE;
52 52
53 // LayerTreeHostImplClient implementation 53 // LayerTreeHostImplClient implementation
54 virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE; 54 virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE;
55 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; 55 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE;
56 virtual void CommitVSyncParameters(base::TimeTicks timebase,
57 base::TimeDelta interval) OVERRIDE {}
58 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) OVERRIDE {} 56 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) OVERRIDE {}
59 virtual void SetMaxSwapsPendingOnImplThread(int max) OVERRIDE {} 57 virtual void SetMaxSwapsPendingOnImplThread(int max) OVERRIDE {}
60 virtual void DidSwapBuffersOnImplThread() OVERRIDE; 58 virtual void DidSwapBuffersOnImplThread() OVERRIDE;
61 virtual void DidSwapBuffersCompleteOnImplThread() OVERRIDE; 59 virtual void DidSwapBuffersCompleteOnImplThread() OVERRIDE;
62 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE {} 60 // TODO(mithro): Why is this an empty???
63 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; 61 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE;
64 virtual void NotifyReadyToActivate() OVERRIDE; 62 virtual void NotifyReadyToActivate() OVERRIDE;
65 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; 63 virtual void SetNeedsRedrawOnImplThread() OVERRIDE;
66 virtual void SetNeedsRedrawRectOnImplThread( 64 virtual void SetNeedsRedrawRectOnImplThread(
67 const gfx::Rect& dirty_rect) OVERRIDE; 65 const gfx::Rect& dirty_rect) OVERRIDE;
68 virtual void SetNeedsAnimateOnImplThread() OVERRIDE; 66 virtual void SetNeedsAnimateOnImplThread() OVERRIDE;
69 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE; 67 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE;
70 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; 68 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE;
71 virtual void SetNeedsCommitOnImplThread() OVERRIDE; 69 virtual void SetNeedsCommitOnImplThread() OVERRIDE;
72 virtual void PostAnimationEventsToMainThreadOnImplThread( 70 virtual void PostAnimationEventsToMainThreadOnImplThread(
(...skipping 21 matching lines...) Expand all
94 private: 92 private:
95 SingleThreadProxy(LayerTreeHost* layer_tree_host, 93 SingleThreadProxy(LayerTreeHost* layer_tree_host,
96 LayerTreeHostSingleThreadClient* client); 94 LayerTreeHostSingleThreadClient* client);
97 95
98 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue); 96 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue);
99 bool DoComposite(base::TimeTicks frame_begin_time, 97 bool DoComposite(base::TimeTicks frame_begin_time,
100 LayerTreeHostImpl::FrameData* frame); 98 LayerTreeHostImpl::FrameData* frame);
101 void DidSwapFrame(); 99 void DidSwapFrame();
102 100
103 bool ShouldComposite() const; 101 bool ShouldComposite() const;
104 void UpdateBackgroundAnimateTicking();
105 102
106 // Accessed on main thread only. 103 // Accessed on main thread only.
107 LayerTreeHost* layer_tree_host_; 104 LayerTreeHost* layer_tree_host_;
108 LayerTreeHostSingleThreadClient* client_; 105 LayerTreeHostSingleThreadClient* client_;
109 106
110 // Used on the Thread, but checked on main thread during 107 // Used on the Thread, but checked on main thread during
111 // initialization/shutdown. 108 // initialization/shutdown.
112 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; 109 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_;
113 RendererCapabilities renderer_capabilities_for_main_thread_; 110 RendererCapabilities renderer_capabilities_for_main_thread_;
114 111
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 private: 173 private:
177 DebugScopedSetImplThread impl_thread_; 174 DebugScopedSetImplThread impl_thread_;
178 DebugScopedSetMainThreadBlocked main_thread_blocked_; 175 DebugScopedSetMainThreadBlocked main_thread_blocked_;
179 176
180 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); 177 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked);
181 }; 178 };
182 179
183 } // namespace cc 180 } // namespace cc
184 181
185 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ 182 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698