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

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

Issue 564903002: Merge GpuCommandBufferMsg_SetLatencyInfo into GpuCommandBufferMsg_AsyncFlush (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove ShallowFlushCHROMIUM() in CompositorOutputSurface::SwapBuffers Created 6 years, 3 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/common/gpu/gpu_messages.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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 output_surface_id_, 179 output_surface_id_,
180 *frame, 180 *frame,
181 messages_to_deliver_with_frame)); 181 messages_to_deliver_with_frame));
182 // ~send_message_scope. 182 // ~send_message_scope.
183 } 183 }
184 client_->DidSwapBuffers(); 184 client_->DidSwapBuffers();
185 return; 185 return;
186 } 186 }
187 187
188 if (frame->gl_frame_data) { 188 if (frame->gl_frame_data) {
189 context_provider()->ContextGL()->ShallowFlushCHROMIUM();
190 ContextProviderCommandBuffer* provider_command_buffer = 189 ContextProviderCommandBuffer* provider_command_buffer =
191 static_cast<ContextProviderCommandBuffer*>(context_provider()); 190 static_cast<ContextProviderCommandBuffer*>(context_provider());
192 CommandBufferProxyImpl* command_buffer_proxy = 191 CommandBufferProxyImpl* command_buffer_proxy =
193 provider_command_buffer->GetCommandBufferProxy(); 192 provider_command_buffer->GetCommandBufferProxy();
194 DCHECK(command_buffer_proxy); 193 DCHECK(command_buffer_proxy);
195 command_buffer_proxy->SetLatencyInfo(frame->metadata.latency_info); 194 command_buffer_proxy->SetLatencyInfo(frame->metadata.latency_info);
196 } 195 }
197 196
198 OutputSurface::SwapBuffers(frame); 197 OutputSurface::SwapBuffers(frame);
199 } 198 }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // If this is the last surface to stop preferring smoothness, 290 // If this is the last surface to stop preferring smoothness,
292 // Reset the main thread's priority to the default. 291 // Reset the main thread's priority to the default.
293 if (prefers_smoothness_ == true && 292 if (prefers_smoothness_ == true &&
294 --g_prefer_smoothness_count == 0) { 293 --g_prefer_smoothness_count == 0) {
295 SetThreadPriorityToDefault(main_thread_handle_); 294 SetThreadPriorityToDefault(main_thread_handle_);
296 } 295 }
297 prefers_smoothness_ = prefers_smoothness; 296 prefers_smoothness_ = prefers_smoothness;
298 } 297 }
299 298
300 } // namespace content 299 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698