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/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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1441 float frame_device_scale_factor, | 1441 float frame_device_scale_factor, |
1442 const ui::LatencyInfo& latency_info) { | 1442 const ui::LatencyInfo& latency_info) { |
1443 gfx::Size frame_size_in_dip; | 1443 gfx::Size frame_size_in_dip; |
1444 if (!frame_data->render_pass_list.empty()) { | 1444 if (!frame_data->render_pass_list.empty()) { |
1445 frame_size_in_dip = gfx::ToFlooredSize(gfx::ScaleSize( | 1445 frame_size_in_dip = gfx::ToFlooredSize(gfx::ScaleSize( |
1446 frame_data->render_pass_list.back()->output_rect.size(), | 1446 frame_data->render_pass_list.back()->output_rect.size(), |
1447 1.f/frame_device_scale_factor)); | 1447 1.f/frame_device_scale_factor)); |
1448 } | 1448 } |
1449 if (ShouldSkipFrame(frame_size_in_dip)) { | 1449 if (ShouldSkipFrame(frame_size_in_dip)) { |
1450 cc::CompositorFrameAck ack; | 1450 cc::CompositorFrameAck ack; |
1451 ack.resources.swap(frame_data->resource_list); | 1451 cc::TransferableResource::ReturnResources(frame_data->resource_list, |
| 1452 &ack.resources); |
1452 RenderWidgetHostImpl::SendSwapCompositorFrameAck( | 1453 RenderWidgetHostImpl::SendSwapCompositorFrameAck( |
1453 host_->GetRoutingID(), output_surface_id, | 1454 host_->GetRoutingID(), output_surface_id, |
1454 host_->GetProcess()->GetID(), ack); | 1455 host_->GetProcess()->GetID(), ack); |
1455 return; | 1456 return; |
1456 } | 1457 } |
1457 window_->layer()->SetDelegatedFrame(frame_data.Pass(), frame_size_in_dip); | 1458 window_->layer()->SetDelegatedFrame(frame_data.Pass(), frame_size_in_dip); |
1458 released_front_lock_ = NULL; | 1459 released_front_lock_ = NULL; |
1459 current_frame_size_ = frame_size_in_dip; | 1460 current_frame_size_ = frame_size_in_dip; |
1460 CheckResizeLock(); | 1461 CheckResizeLock(); |
1461 | 1462 |
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3241 RenderWidgetHost* widget) { | 3242 RenderWidgetHost* widget) { |
3242 return new RenderWidgetHostViewAura(widget); | 3243 return new RenderWidgetHostViewAura(widget); |
3243 } | 3244 } |
3244 | 3245 |
3245 // static | 3246 // static |
3246 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 3247 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
3247 GetScreenInfoForWindow(results, NULL); | 3248 GetScreenInfoForWindow(results, NULL); |
3248 } | 3249 } |
3249 | 3250 |
3250 } // namespace content | 3251 } // namespace content |
OLD | NEW |