| 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_android.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
| 6 | 6 |
| 7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 host_->GetRoutingID(), | 790 host_->GetRoutingID(), |
| 791 current_mailbox_, | 791 current_mailbox_, |
| 792 texture_size_in_layer_); | 792 texture_size_in_layer_); |
| 793 ImageTransportFactoryAndroid::GetInstance()->WaitSyncPoint( | 793 ImageTransportFactoryAndroid::GetInstance()->WaitSyncPoint( |
| 794 frame->gl_frame_data->sync_point); | 794 frame->gl_frame_data->sync_point); |
| 795 | 795 |
| 796 texture_size_in_layer_ = frame->gl_frame_data->size; | 796 texture_size_in_layer_ = frame->gl_frame_data->size; |
| 797 ComputeContentsSize(frame->metadata); | 797 ComputeContentsSize(frame->metadata); |
| 798 | 798 |
| 799 if (layer_->layer_tree_host()) { | 799 if (layer_->layer_tree_host()) { |
| 800 scoped_ptr<cc::SwapPromise> swap_promise( | 800 for (size_t i = 0; i < frame->metadata.latency_info.size(); i++) { |
| 801 new cc::LatencyInfoSwapPromise(frame->metadata.latency_info)); | 801 scoped_ptr<cc::SwapPromise> swap_promise( |
| 802 layer_->layer_tree_host()->QueueSwapPromise(swap_promise.Pass()); | 802 new cc::LatencyInfoSwapPromise(frame->metadata.latency_info[i])); |
| 803 layer_->layer_tree_host()->QueueSwapPromise(swap_promise.Pass()); |
| 804 } |
| 803 } | 805 } |
| 804 | 806 |
| 805 BuffersSwapped(frame->gl_frame_data->mailbox, output_surface_id, callback); | 807 BuffersSwapped(frame->gl_frame_data->mailbox, output_surface_id, callback); |
| 806 frame_evictor_->SwappedFrame(!host_->is_hidden()); | 808 frame_evictor_->SwappedFrame(!host_->is_hidden()); |
| 807 } | 809 } |
| 808 | 810 |
| 809 void RenderWidgetHostViewAndroid::SynchronousFrameMetadata( | 811 void RenderWidgetHostViewAndroid::SynchronousFrameMetadata( |
| 810 const cc::CompositorFrameMetadata& frame_metadata) { | 812 const cc::CompositorFrameMetadata& frame_metadata) { |
| 811 // This is a subset of OnSwapCompositorFrame() used in the synchronous | 813 // This is a subset of OnSwapCompositorFrame() used in the synchronous |
| 812 // compositor flow. | 814 // compositor flow. |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1407 // RenderWidgetHostView, public: | 1409 // RenderWidgetHostView, public: |
| 1408 | 1410 |
| 1409 // static | 1411 // static |
| 1410 RenderWidgetHostView* | 1412 RenderWidgetHostView* |
| 1411 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1413 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
| 1412 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1414 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
| 1413 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1415 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
| 1414 } | 1416 } |
| 1415 | 1417 |
| 1416 } // namespace content | 1418 } // namespace content |
| OLD | NEW |