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

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

Issue 123563002: Remove gpu side LatencyInfo merging (Closed) Base URL: http://git.chromium.org/chromium/src.git@gpu-per-event-latency-6-small
Patch Set: fix mac build Created 6 years, 11 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
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_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 #endif 1353 #endif
1354 1354
1355 void RenderWidgetHostViewAura::AcceleratedSurfaceBuffersSwapped( 1355 void RenderWidgetHostViewAura::AcceleratedSurfaceBuffersSwapped(
1356 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel, 1356 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params_in_pixel,
1357 int gpu_host_id) { 1357 int gpu_host_id) {
1358 BufferPresentedCallback ack_callback = base::Bind( 1358 BufferPresentedCallback ack_callback = base::Bind(
1359 &AcknowledgeBufferForGpu, 1359 &AcknowledgeBufferForGpu,
1360 params_in_pixel.route_id, 1360 params_in_pixel.route_id,
1361 gpu_host_id, 1361 gpu_host_id,
1362 params_in_pixel.mailbox_name); 1362 params_in_pixel.mailbox_name);
1363 // TODO(miletus) : Pass the params_in_pixel.latency_info directly into
1364 // BuffersSwapped() once GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params
1365 // is converted to contain std::vector<ui::LatencyInfo>.
1366 std::vector<ui::LatencyInfo> latency_info;
1367 latency_info.push_back(params_in_pixel.latency_info);
1368 BuffersSwapped(params_in_pixel.size, 1363 BuffersSwapped(params_in_pixel.size,
1369 gfx::Rect(params_in_pixel.size), 1364 gfx::Rect(params_in_pixel.size),
1370 params_in_pixel.scale_factor, 1365 params_in_pixel.scale_factor,
1371 params_in_pixel.mailbox_name, 1366 params_in_pixel.mailbox_name,
1372 latency_info, 1367 params_in_pixel.latency_info,
1373 ack_callback); 1368 ack_callback);
1374 } 1369 }
1375 1370
1376 void RenderWidgetHostViewAura::SwapDelegatedFrame( 1371 void RenderWidgetHostViewAura::SwapDelegatedFrame(
1377 uint32 output_surface_id, 1372 uint32 output_surface_id,
1378 scoped_ptr<cc::DelegatedFrameData> frame_data, 1373 scoped_ptr<cc::DelegatedFrameData> frame_data,
1379 float frame_device_scale_factor, 1374 float frame_device_scale_factor,
1380 const std::vector<ui::LatencyInfo>& latency_info) { 1375 const std::vector<ui::LatencyInfo>& latency_info) {
1381 DCHECK_NE(0u, frame_data->render_pass_list.size()); 1376 DCHECK_NE(0u, frame_data->render_pass_list.size());
1382 1377
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 int gpu_host_id) { 1759 int gpu_host_id) {
1765 gfx::Rect damage_rect(params_in_pixel.x, 1760 gfx::Rect damage_rect(params_in_pixel.x,
1766 params_in_pixel.y, 1761 params_in_pixel.y,
1767 params_in_pixel.width, 1762 params_in_pixel.width,
1768 params_in_pixel.height); 1763 params_in_pixel.height);
1769 BufferPresentedCallback ack_callback = 1764 BufferPresentedCallback ack_callback =
1770 base::Bind(&AcknowledgeBufferForGpu, 1765 base::Bind(&AcknowledgeBufferForGpu,
1771 params_in_pixel.route_id, 1766 params_in_pixel.route_id,
1772 gpu_host_id, 1767 gpu_host_id,
1773 params_in_pixel.mailbox_name); 1768 params_in_pixel.mailbox_name);
1774 // TODO(miletus) : Pass the params_in_pixel.latency_info directly into
1775 // BuffersSwapped() once GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params
1776 // is converted to contain std::vector<ui::LatencyInfo>.
1777 std::vector<ui::LatencyInfo> latency_info;
1778 latency_info.push_back(params_in_pixel.latency_info);
1779 BuffersSwapped(params_in_pixel.surface_size, 1769 BuffersSwapped(params_in_pixel.surface_size,
1780 damage_rect, 1770 damage_rect,
1781 params_in_pixel.surface_scale_factor, 1771 params_in_pixel.surface_scale_factor,
1782 params_in_pixel.mailbox_name, 1772 params_in_pixel.mailbox_name,
1783 latency_info, 1773 params_in_pixel.latency_info,
1784 ack_callback); 1774 ack_callback);
1785 } 1775 }
1786 1776
1787 void RenderWidgetHostViewAura::AcceleratedSurfaceSuspend() { 1777 void RenderWidgetHostViewAura::AcceleratedSurfaceSuspend() {
1788 } 1778 }
1789 1779
1790 void RenderWidgetHostViewAura::AcceleratedSurfaceRelease() { 1780 void RenderWidgetHostViewAura::AcceleratedSurfaceRelease() {
1791 // This really tells us to release the frontbuffer. 1781 // This really tells us to release the frontbuffer.
1792 if (current_surface_.get()) { 1782 if (current_surface_.get()) {
1793 ui::Compositor* compositor = GetCompositor(); 1783 ui::Compositor* compositor = GetCompositor();
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after
3504 RenderWidgetHost* widget) { 3494 RenderWidgetHost* widget) {
3505 return new RenderWidgetHostViewAura(widget); 3495 return new RenderWidgetHostViewAura(widget);
3506 } 3496 }
3507 3497
3508 // static 3498 // static
3509 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3499 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3510 GetScreenInfoForWindow(results, NULL); 3500 GetScreenInfoForWindow(results, NULL);
3511 } 3501 }
3512 3502
3513 } // namespace content 3503 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698