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_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 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1505 // Compositor window is always gfx::kNullPluginWindow. | 1505 // Compositor window is always gfx::kNullPluginWindow. |
1506 // TODO(jbates) http://crbug.com/105344 This will be removed when there are no | 1506 // TODO(jbates) http://crbug.com/105344 This will be removed when there are no |
1507 // plugin windows. | 1507 // plugin windows. |
1508 gpu_params.window = gfx::kNullPluginWindow; | 1508 gpu_params.window = gfx::kNullPluginWindow; |
1509 #endif | 1509 #endif |
1510 view_->AcceleratedSurfaceBuffersSwapped(gpu_params, | 1510 view_->AcceleratedSurfaceBuffersSwapped(gpu_params, |
1511 gpu_process_host_id); | 1511 gpu_process_host_id); |
1512 } | 1512 } |
1513 | 1513 |
1514 void RenderWidgetHostImpl::OnSwapCompositorFrame( | 1514 void RenderWidgetHostImpl::OnSwapCompositorFrame( |
1515 const cc::CompositorFrame& frame) { | 1515 cc::CompositorFrame& frame) { |
1516 #if defined(OS_ANDROID) | 1516 #if defined(OS_ANDROID) |
1517 gfx::Vector2dF scroll_offset = ScaleVector2d( | 1517 gfx::Vector2dF scroll_offset = ScaleVector2d( |
1518 frame.metadata.root_scroll_offset, frame.metadata.page_scale_factor); | 1518 frame.metadata.root_scroll_offset, frame.metadata.page_scale_factor); |
1519 gfx::SizeF content_size = ScaleSize( | 1519 gfx::SizeF content_size = ScaleSize( |
1520 frame.metadata.root_layer_size, frame.metadata.page_scale_factor); | 1520 frame.metadata.root_layer_size, frame.metadata.page_scale_factor); |
1521 | 1521 |
1522 if (view_) { | 1522 if (view_) { |
1523 view_->UpdateFrameInfo( | 1523 view_->UpdateFrameInfo( |
1524 gfx::ToRoundedVector2d(scroll_offset), | 1524 gfx::ToRoundedVector2d(scroll_offset), |
1525 frame.metadata.page_scale_factor, | 1525 frame.metadata.page_scale_factor, |
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2331 return; | 2331 return; |
2332 | 2332 |
2333 OnRenderAutoResized(new_size); | 2333 OnRenderAutoResized(new_size); |
2334 } | 2334 } |
2335 | 2335 |
2336 void RenderWidgetHostImpl::DetachDelegate() { | 2336 void RenderWidgetHostImpl::DetachDelegate() { |
2337 delegate_ = NULL; | 2337 delegate_ = NULL; |
2338 } | 2338 } |
2339 | 2339 |
2340 } // namespace content | 2340 } // namespace content |
OLD | NEW |