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

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

Issue 2409923002: cc: Rename SwapBuffers on CompositorFrameSink to SubmitCompositorFrame (Closed)
Patch Set: swap-to-submit: rebase Created 4 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_PROXY_IMPL_H_ 5 #ifndef CC_TREES_PROXY_IMPL_H_
6 #define CC_TREES_PROXY_IMPL_H_ 6 #define CC_TREES_PROXY_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // the main thread is blocked for a commit. 61 // the main thread is blocked for a commit.
62 struct BlockedMainCommitOnly { 62 struct BlockedMainCommitOnly {
63 BlockedMainCommitOnly(); 63 BlockedMainCommitOnly();
64 ~BlockedMainCommitOnly(); 64 ~BlockedMainCommitOnly();
65 LayerTreeHostInProcess* layer_tree_host; 65 LayerTreeHostInProcess* layer_tree_host;
66 }; 66 };
67 67
68 // LayerTreeHostImplClient implementation 68 // LayerTreeHostImplClient implementation
69 void DidLoseCompositorFrameSinkOnImplThread() override; 69 void DidLoseCompositorFrameSinkOnImplThread() override;
70 void SetBeginFrameSource(BeginFrameSource* source) override; 70 void SetBeginFrameSource(BeginFrameSource* source) override;
71 void DidSwapBuffersCompleteOnImplThread() override; 71 void DidReceiveCompositorFrameAckOnImplThread() override;
72 void OnCanDrawStateChanged(bool can_draw) override; 72 void OnCanDrawStateChanged(bool can_draw) override;
73 void NotifyReadyToActivate() override; 73 void NotifyReadyToActivate() override;
74 void NotifyReadyToDraw() override; 74 void NotifyReadyToDraw() override;
75 // Please call these 2 functions through 75 // Please call these 2 functions through
76 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsOneBeginImplFrame(). 76 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsOneBeginImplFrame().
77 void SetNeedsRedrawOnImplThread() override; 77 void SetNeedsRedrawOnImplThread() override;
78 void SetNeedsOneBeginImplFrameOnImplThread() override; 78 void SetNeedsOneBeginImplFrameOnImplThread() override;
79 void SetNeedsPrepareTilesOnImplThread() override; 79 void SetNeedsPrepareTilesOnImplThread() override;
80 void SetNeedsCommitOnImplThread() override; 80 void SetNeedsCommitOnImplThread() override;
81 void SetVideoNeedsBeginFrames(bool needs_begin_frames) override; 81 void SetVideoNeedsBeginFrames(bool needs_begin_frames) override;
82 void PostAnimationEventsToMainThreadOnImplThread( 82 void PostAnimationEventsToMainThreadOnImplThread(
83 std::unique_ptr<AnimationEvents> events) override; 83 std::unique_ptr<AnimationEvents> events) override;
84 bool IsInsideDraw() override; 84 bool IsInsideDraw() override;
85 void RenewTreePriority() override; 85 void RenewTreePriority() override;
86 void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, 86 void PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
87 base::TimeDelta delay) override; 87 base::TimeDelta delay) override;
88 void DidActivateSyncTree() override; 88 void DidActivateSyncTree() override;
89 void WillPrepareTiles() override; 89 void WillPrepareTiles() override;
90 void DidPrepareTiles() override; 90 void DidPrepareTiles() override;
91 void DidCompletePageScaleAnimationOnImplThread() override; 91 void DidCompletePageScaleAnimationOnImplThread() override;
92 void OnDrawForCompositorFrameSink(bool resourceless_software_draw) override; 92 void OnDrawForCompositorFrameSink(bool resourceless_software_draw) override;
93 93
94 // SchedulerClient implementation 94 // SchedulerClient implementation
95 void WillBeginImplFrame(const BeginFrameArgs& args) override; 95 void WillBeginImplFrame(const BeginFrameArgs& args) override;
96 void DidFinishImplFrame() override; 96 void DidFinishImplFrame() override;
97 void ScheduledActionSendBeginMainFrame(const BeginFrameArgs& args) override; 97 void ScheduledActionSendBeginMainFrame(const BeginFrameArgs& args) override;
98 DrawResult ScheduledActionDrawAndSwapIfPossible() override; 98 DrawResult ScheduledActionSubmitCompositorFrameIfPossible() override;
99 DrawResult ScheduledActionDrawAndSwapForced() override; 99 DrawResult ScheduledActionSubmitCompositorFrameForced() override;
100 void ScheduledActionCommit() override; 100 void ScheduledActionCommit() override;
101 void ScheduledActionActivateSyncTree() override; 101 void ScheduledActionActivateSyncTree() override;
102 void ScheduledActionBeginCompositorFrameSinkCreation() override; 102 void ScheduledActionBeginCompositorFrameSinkCreation() override;
103 void ScheduledActionPrepareTiles() override; 103 void ScheduledActionPrepareTiles() override;
104 void ScheduledActionInvalidateCompositorFrameSink() override; 104 void ScheduledActionInvalidateCompositorFrameSink() override;
105 void SendBeginMainFrameNotExpectedSoon() override; 105 void SendBeginMainFrameNotExpectedSoon() override;
106 106
107 DrawResult DrawAndSwapInternal(bool forced_draw); 107 DrawResult SubmitCompositorFrameInternal(bool forced_draw);
108 108
109 bool IsImplThread() const; 109 bool IsImplThread() const;
110 bool IsMainThreadBlocked() const; 110 bool IsMainThreadBlocked() const;
111 111
112 const int layer_tree_host_id_; 112 const int layer_tree_host_id_;
113 113
114 std::unique_ptr<Scheduler> scheduler_; 114 std::unique_ptr<Scheduler> scheduler_;
115 115
116 // Set when the main thread is waiting on a pending tree activation. 116 // Set when the main thread is waiting on a pending tree activation.
117 bool commit_completion_waits_for_activation_; 117 bool commit_completion_waits_for_activation_;
(...skipping 24 matching lines...) Expand all
142 // Use accessors instead of this variable directly. 142 // Use accessors instead of this variable directly.
143 BlockedMainCommitOnly main_thread_blocked_commit_vars_unsafe_; 143 BlockedMainCommitOnly main_thread_blocked_commit_vars_unsafe_;
144 BlockedMainCommitOnly& blocked_main_commit(); 144 BlockedMainCommitOnly& blocked_main_commit();
145 145
146 DISALLOW_COPY_AND_ASSIGN(ProxyImpl); 146 DISALLOW_COPY_AND_ASSIGN(ProxyImpl);
147 }; 147 };
148 148
149 } // namespace cc 149 } // namespace cc
150 150
151 #endif // CC_TREES_PROXY_IMPL_H_ 151 #endif // CC_TREES_PROXY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698