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

Side by Side Diff: content/renderer/gpu/compositor_output_surface.cc

Issue 16863005: cc: Add BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@nofrc12
Patch Set: Rebase Created 7 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
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/renderer/gpu/compositor_output_surface.h" 5 #include "content/renderer/gpu/compositor_output_surface.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/compositor_frame_ack.h" 10 #include "cc/output/compositor_frame_ack.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 OnVSyncParametersChanged(timebase, interval); 131 OnVSyncParametersChanged(timebase, interval);
132 } 132 }
133 133
134 #if defined(OS_ANDROID) 134 #if defined(OS_ANDROID)
135 void CompositorOutputSurface::SetNeedsBeginFrame(bool enable) { 135 void CompositorOutputSurface::SetNeedsBeginFrame(bool enable) {
136 DCHECK(CalledOnValidThread()); 136 DCHECK(CalledOnValidThread());
137 Send(new ViewHostMsg_SetNeedsBeginFrame(routing_id_, enable)); 137 Send(new ViewHostMsg_SetNeedsBeginFrame(routing_id_, enable));
138 OutputSurface::SetNeedsBeginFrame(enable); 138 OutputSurface::SetNeedsBeginFrame(enable);
139 } 139 }
140 140
141 void CompositorOutputSurface::OnBeginFrame(base::TimeTicks frame_time) { 141 void CompositorOutputSurface::OnBeginFrame(const cc::BeginFrameArgs& args) {
142 DCHECK(CalledOnValidThread()); 142 DCHECK(CalledOnValidThread());
143 BeginFrame(frame_time); 143 BeginFrame(args);
144 } 144 }
145 #endif // defined(OS_ANDROID) 145 #endif // defined(OS_ANDROID)
146 146
147 void CompositorOutputSurface::OnSwapAck(const cc::CompositorFrameAck& ack) { 147 void CompositorOutputSurface::OnSwapAck(const cc::CompositorFrameAck& ack) {
148 OnSwapBuffersComplete(&ack); 148 OnSwapBuffersComplete(&ack);
149 } 149 }
150 150
151 bool CompositorOutputSurface::Send(IPC::Message* message) { 151 bool CompositorOutputSurface::Send(IPC::Message* message) {
152 return message_sender_->Send(message); 152 return message_sender_->Send(message);
153 } 153 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // If this is the last surface to stop preferring smoothness, 187 // If this is the last surface to stop preferring smoothness,
188 // Reset the main thread's priority to the default. 188 // Reset the main thread's priority to the default.
189 if (prefers_smoothness_ == true && 189 if (prefers_smoothness_ == true &&
190 --g_prefer_smoothness_count == 0) { 190 --g_prefer_smoothness_count == 0) {
191 SetThreadPriorityToDefault(main_thread_handle_); 191 SetThreadPriorityToDefault(main_thread_handle_);
192 } 192 }
193 prefers_smoothness_ = prefers_smoothness; 193 prefers_smoothness_ = prefers_smoothness;
194 } 194 }
195 195
196 } // namespace content 196 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698