| OLD | NEW |
| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(); | 189 context_provider()->ContextGL()->ShallowFlushCHROMIUM(); |
| 190 ContextProviderCommandBuffer* provider_command_buffer = | 190 ContextProviderCommandBuffer* provider_command_buffer = |
| 191 static_cast<ContextProviderCommandBuffer*>(context_provider().get()); | 191 static_cast<ContextProviderCommandBuffer*>(context_provider()); |
| 192 CommandBufferProxyImpl* command_buffer_proxy = | 192 CommandBufferProxyImpl* command_buffer_proxy = |
| 193 provider_command_buffer->GetCommandBufferProxy(); | 193 provider_command_buffer->GetCommandBufferProxy(); |
| 194 DCHECK(command_buffer_proxy); | 194 DCHECK(command_buffer_proxy); |
| 195 command_buffer_proxy->SetLatencyInfo(frame->metadata.latency_info); | 195 command_buffer_proxy->SetLatencyInfo(frame->metadata.latency_info); |
| 196 } | 196 } |
| 197 | 197 |
| 198 OutputSurface::SwapBuffers(frame); | 198 OutputSurface::SwapBuffers(frame); |
| 199 } | 199 } |
| 200 | 200 |
| 201 void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) { | 201 void CompositorOutputSurface::OnMessageReceived(const IPC::Message& message) { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 // If this is the last surface to stop preferring smoothness, | 291 // If this is the last surface to stop preferring smoothness, |
| 292 // Reset the main thread's priority to the default. | 292 // Reset the main thread's priority to the default. |
| 293 if (prefers_smoothness_ == true && | 293 if (prefers_smoothness_ == true && |
| 294 --g_prefer_smoothness_count == 0) { | 294 --g_prefer_smoothness_count == 0) { |
| 295 SetThreadPriorityToDefault(main_thread_handle_); | 295 SetThreadPriorityToDefault(main_thread_handle_); |
| 296 } | 296 } |
| 297 prefers_smoothness_ = prefers_smoothness; | 297 prefers_smoothness_ = prefers_smoothness; |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace content | 300 } // namespace content |
| OLD | NEW |