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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 10690168: Aura: Resize locks with --ui-enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OSX compile fix. Created 8 years, 1 month 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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 int32 surface_id, 1384 int32 surface_id,
1385 uint64 surface_handle, 1385 uint64 surface_handle,
1386 int32 route_id, 1386 int32 route_id,
1387 const gfx::Size& size, 1387 const gfx::Size& size,
1388 int32 gpu_process_host_id) { 1388 int32 gpu_process_host_id) {
1389 TRACE_EVENT0("renderer_host", 1389 TRACE_EVENT0("renderer_host",
1390 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwapped"); 1390 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwapped");
1391 if (!view_) { 1391 if (!view_) {
1392 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, 1392 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id,
1393 gpu_process_host_id, 1393 gpu_process_host_id,
1394 false,
1394 0); 1395 0);
1395 return; 1396 return;
1396 } 1397 }
1397 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params gpu_params; 1398 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params gpu_params;
1398 gpu_params.surface_id = surface_id; 1399 gpu_params.surface_id = surface_id;
1399 gpu_params.surface_handle = surface_handle; 1400 gpu_params.surface_handle = surface_handle;
1400 gpu_params.route_id = route_id; 1401 gpu_params.route_id = route_id;
1401 gpu_params.size = size; 1402 gpu_params.size = size;
1402 #if defined(OS_MACOSX) 1403 #if defined(OS_MACOSX)
1403 // Compositor window is always gfx::kNullPluginWindow. 1404 // Compositor window is always gfx::kNullPluginWindow.
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 return false; 2124 return false;
2124 } else { 2125 } else {
2125 Send(new ViewMsg_LockMouse_ACK(routing_id_, true)); 2126 Send(new ViewMsg_LockMouse_ACK(routing_id_, true));
2126 return true; 2127 return true;
2127 } 2128 }
2128 } 2129 }
2129 } 2130 }
2130 2131
2131 // static 2132 // static
2132 void RenderWidgetHostImpl::AcknowledgeBufferPresent( 2133 void RenderWidgetHostImpl::AcknowledgeBufferPresent(
2133 int32 route_id, int gpu_host_id, uint32 sync_point) { 2134 int32 route_id, int gpu_host_id, bool presented, uint32 sync_point) {
2134 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); 2135 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id);
2135 if (ui_shim) 2136 if (ui_shim)
2136 ui_shim->Send(new AcceleratedSurfaceMsg_BufferPresented(route_id, 2137 ui_shim->Send(new AcceleratedSurfaceMsg_BufferPresented(route_id,
2138 presented,
2137 sync_point)); 2139 sync_point));
2138 } 2140 }
2139 2141
2140 void RenderWidgetHostImpl::AcknowledgeSwapBuffersToRenderer() { 2142 void RenderWidgetHostImpl::AcknowledgeSwapBuffersToRenderer() {
2141 if (!is_threaded_compositing_enabled_) 2143 if (!is_threaded_compositing_enabled_)
2142 Send(new ViewMsg_SwapBuffers_ACK(routing_id_)); 2144 Send(new ViewMsg_SwapBuffers_ACK(routing_id_));
2143 } 2145 }
2144 2146
2145 #if defined(USE_AURA) 2147 #if defined(USE_AURA)
2146 // static 2148 // static
(...skipping 20 matching lines...) Expand all
2167 return; 2169 return;
2168 2170
2169 OnRenderAutoResized(new_size); 2171 OnRenderAutoResized(new_size);
2170 } 2172 }
2171 2173
2172 void RenderWidgetHostImpl::DetachDelegate() { 2174 void RenderWidgetHostImpl::DetachDelegate() {
2173 delegate_ = NULL; 2175 delegate_ = NULL;
2174 } 2176 }
2175 2177
2176 } // namespace content 2178 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698