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

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 now uses frame sources, working on scheduler_unittests. 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_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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 virtual void Start() OVERRIDE; 48 virtual void Start() OVERRIDE;
49 virtual void Stop() OVERRIDE; 49 virtual void Stop() OVERRIDE;
50 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; 50 virtual size_t MaxPartialTextureUpdates() const OVERRIDE;
51 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; 51 virtual void ForceSerializeOnSwapBuffers() OVERRIDE;
52 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; 52 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE;
53 virtual bool CommitPendingForTesting() OVERRIDE; 53 virtual bool CommitPendingForTesting() OVERRIDE;
54 54
55 // LayerTreeHostImplClient implementation 55 // LayerTreeHostImplClient implementation
56 virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE; 56 virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE;
57 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; 57 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE;
58 virtual void CommitVSyncParameters(base::TimeTicks timebase,
59 base::TimeDelta interval) OVERRIDE {}
60 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) OVERRIDE {} 58 virtual void SetEstimatedParentDrawTime(base::TimeDelta draw_time) OVERRIDE {}
61 virtual void SetMaxSwapsPendingOnImplThread(int max) OVERRIDE {} 59 virtual void SetMaxSwapsPendingOnImplThread(int max) OVERRIDE {}
62 virtual void DidSwapBuffersOnImplThread() OVERRIDE; 60 virtual void DidSwapBuffersOnImplThread() OVERRIDE;
63 virtual void DidSwapBuffersCompleteOnImplThread() OVERRIDE; 61 virtual void DidSwapBuffersCompleteOnImplThread() OVERRIDE;
64 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE {} 62 // FIXME(mithro): Why is this an empty???
brianderson 2014/05/07 18:09:59 @enne is working on a patch to make SingleThreadPr
mithro-old 2014/05/07 22:02:32 I'll have to figure out how this interacts with th
65 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; 63 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE;
66 virtual void NotifyReadyToActivate() OVERRIDE; 64 virtual void NotifyReadyToActivate() OVERRIDE;
67 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; 65 virtual void SetNeedsRedrawOnImplThread() OVERRIDE;
68 virtual void SetNeedsRedrawRectOnImplThread( 66 virtual void SetNeedsRedrawRectOnImplThread(
69 const gfx::Rect& dirty_rect) OVERRIDE; 67 const gfx::Rect& dirty_rect) OVERRIDE;
70 virtual void SetNeedsAnimateOnImplThread() OVERRIDE; 68 virtual void SetNeedsAnimateOnImplThread() OVERRIDE;
71 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE; 69 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE;
72 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; 70 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE;
73 virtual void SetNeedsCommitOnImplThread() OVERRIDE; 71 virtual void SetNeedsCommitOnImplThread() OVERRIDE;
74 virtual void PostAnimationEventsToMainThreadOnImplThread( 72 virtual void PostAnimationEventsToMainThreadOnImplThread(
(...skipping 23 matching lines...) Expand all
98 bool for_readback, 96 bool for_readback,
99 LayerTreeHostImpl::FrameData* frame); 97 LayerTreeHostImpl::FrameData* frame);
100 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue); 98 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue);
101 bool DoComposite(base::TimeTicks frame_begin_time, 99 bool DoComposite(base::TimeTicks frame_begin_time,
102 const gfx::Rect& device_viewport_damage_rect, 100 const gfx::Rect& device_viewport_damage_rect,
103 bool for_readback, 101 bool for_readback,
104 LayerTreeHostImpl::FrameData* frame); 102 LayerTreeHostImpl::FrameData* frame);
105 void DidSwapFrame(); 103 void DidSwapFrame();
106 104
107 bool ShouldComposite() const; 105 bool ShouldComposite() const;
108 void UpdateBackgroundAnimateTicking();
109 106
110 // Accessed on main thread only. 107 // Accessed on main thread only.
111 LayerTreeHost* layer_tree_host_; 108 LayerTreeHost* layer_tree_host_;
112 LayerTreeHostSingleThreadClient* client_; 109 LayerTreeHostSingleThreadClient* client_;
113 110
114 // Used on the Thread, but checked on main thread during 111 // Used on the Thread, but checked on main thread during
115 // initialization/shutdown. 112 // initialization/shutdown.
116 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; 113 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_;
117 RendererCapabilities renderer_capabilities_for_main_thread_; 114 RendererCapabilities renderer_capabilities_for_main_thread_;
118 115
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 private: 177 private:
181 DebugScopedSetImplThread impl_thread_; 178 DebugScopedSetImplThread impl_thread_;
182 DebugScopedSetMainThreadBlocked main_thread_blocked_; 179 DebugScopedSetMainThreadBlocked main_thread_blocked_;
183 180
184 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); 181 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked);
185 }; 182 };
186 183
187 } // namespace cc 184 } // namespace cc
188 185
189 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ 186 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698