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

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

Issue 14999012: Move cc/debug/latency_info to ui/base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
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_proxy.h" 8 #include "base/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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return true; 93 return true;
94 } 94 }
95 95
96 void CompositorOutputSurface::SendFrameToParentCompositor( 96 void CompositorOutputSurface::SendFrameToParentCompositor(
97 cc::CompositorFrame* frame) { 97 cc::CompositorFrame* frame) {
98 DCHECK(CalledOnValidThread()); 98 DCHECK(CalledOnValidThread());
99 Send(new ViewHostMsg_SwapCompositorFrame(routing_id_, *frame)); 99 Send(new ViewHostMsg_SwapCompositorFrame(routing_id_, *frame));
100 } 100 }
101 101
102 void CompositorOutputSurface::SwapBuffers( 102 void CompositorOutputSurface::SwapBuffers(
103 const cc::LatencyInfo& latency_info) { 103 const ui::LatencyInfo& latency_info) {
104 WebGraphicsContext3DCommandBufferImpl* command_buffer = 104 WebGraphicsContext3DCommandBufferImpl* command_buffer =
105 static_cast<WebGraphicsContext3DCommandBufferImpl*>(context3d()); 105 static_cast<WebGraphicsContext3DCommandBufferImpl*>(context3d());
106 CommandBufferProxyImpl* command_buffer_proxy = 106 CommandBufferProxyImpl* command_buffer_proxy =
107 command_buffer->GetCommandBufferProxy(); 107 command_buffer->GetCommandBufferProxy();
108 DCHECK(command_buffer_proxy); 108 DCHECK(command_buffer_proxy);
109 context3d()->shallowFlushCHROMIUM(); 109 context3d()->shallowFlushCHROMIUM();
110 command_buffer_proxy->SetLatencyInfo(latency_info); 110 command_buffer_proxy->SetLatencyInfo(latency_info);
111 OutputSurface::SwapBuffers(latency_info); 111 OutputSurface::SwapBuffers(latency_info);
112 } 112 }
113 113
114 void CompositorOutputSurface::PostSubBuffer( 114 void CompositorOutputSurface::PostSubBuffer(
115 gfx::Rect rect, const cc::LatencyInfo& latency_info) { 115 gfx::Rect rect, const ui::LatencyInfo& latency_info) {
116 WebGraphicsContext3DCommandBufferImpl* command_buffer = 116 WebGraphicsContext3DCommandBufferImpl* command_buffer =
117 static_cast<WebGraphicsContext3DCommandBufferImpl*>(context3d()); 117 static_cast<WebGraphicsContext3DCommandBufferImpl*>(context3d());
118 CommandBufferProxyImpl* command_buffer_proxy = 118 CommandBufferProxyImpl* command_buffer_proxy =
119 command_buffer->GetCommandBufferProxy(); 119 command_buffer->GetCommandBufferProxy();
120 DCHECK(command_buffer_proxy); 120 DCHECK(command_buffer_proxy);
121 context3d()->shallowFlushCHROMIUM(); 121 context3d()->shallowFlushCHROMIUM();
122 command_buffer_proxy->SetLatencyInfo(latency_info); 122 command_buffer_proxy->SetLatencyInfo(latency_info);
123 OutputSurface::PostSubBuffer(rect, latency_info); 123 OutputSurface::PostSubBuffer(rect, latency_info);
124 } 124 }
125 125
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // If this is the last surface to stop preferring smoothness, 197 // If this is the last surface to stop preferring smoothness,
198 // Reset the main thread's priority to the default. 198 // Reset the main thread's priority to the default.
199 if (prefers_smoothness_ == true && 199 if (prefers_smoothness_ == true &&
200 --g_prefer_smoothness_count == 0) { 200 --g_prefer_smoothness_count == 0) {
201 SetThreadPriorityToDefault(main_thread_handle_); 201 SetThreadPriorityToDefault(main_thread_handle_);
202 } 202 }
203 prefers_smoothness_ = prefers_smoothness; 203 prefers_smoothness_ = prefers_smoothness;
204 } 204 }
205 205
206 } // namespace content 206 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.h ('k') | content/renderer/gpu/input_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698