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/android/build_info.h" | 9 #include "base/android/build_info.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 for (size_t i = 0; i < frame->metadata.latency_info.size(); i++) { | 1139 for (size_t i = 0; i < frame->metadata.latency_info.size(); i++) { |
1140 scoped_ptr<cc::SwapPromise> swap_promise( | 1140 scoped_ptr<cc::SwapPromise> swap_promise( |
1141 new cc::LatencyInfoSwapPromise(frame->metadata.latency_info[i])); | 1141 new cc::LatencyInfoSwapPromise(frame->metadata.latency_info[i])); |
1142 layer_->layer_tree_host()->QueueSwapPromise(swap_promise.Pass()); | 1142 layer_->layer_tree_host()->QueueSwapPromise(swap_promise.Pass()); |
1143 } | 1143 } |
1144 } | 1144 } |
1145 | 1145 |
1146 DCHECK(!frame->delegated_frame_data->render_pass_list.empty()); | 1146 DCHECK(!frame->delegated_frame_data->render_pass_list.empty()); |
1147 | 1147 |
1148 cc::RenderPass* root_pass = | 1148 cc::RenderPass* root_pass = |
1149 frame->delegated_frame_data->render_pass_list.back(); | 1149 frame->delegated_frame_data->render_pass_list.back().get(); |
1150 texture_size_in_layer_ = root_pass->output_rect.size(); | 1150 texture_size_in_layer_ = root_pass->output_rect.size(); |
1151 | 1151 |
1152 cc::CompositorFrameMetadata metadata = frame->metadata; | 1152 cc::CompositorFrameMetadata metadata = frame->metadata; |
1153 | 1153 |
1154 SwapDelegatedFrame(output_surface_id, frame.Pass()); | 1154 SwapDelegatedFrame(output_surface_id, frame.Pass()); |
1155 frame_evictor_->SwappedFrame(!host_->is_hidden()); | 1155 frame_evictor_->SwappedFrame(!host_->is_hidden()); |
1156 | 1156 |
1157 // As the metadata update may trigger view invalidation, always call it after | 1157 // As the metadata update may trigger view invalidation, always call it after |
1158 // any potential compositor scheduling. | 1158 // any potential compositor scheduling. |
1159 OnFrameMetadataUpdated(metadata); | 1159 OnFrameMetadataUpdated(metadata); |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2059 results->orientationAngle = display.RotationAsDegree(); | 2059 results->orientationAngle = display.RotationAsDegree(); |
2060 results->orientationType = | 2060 results->orientationType = |
2061 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2061 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2062 gfx::DeviceDisplayInfo info; | 2062 gfx::DeviceDisplayInfo info; |
2063 results->depth = info.GetBitsPerPixel(); | 2063 results->depth = info.GetBitsPerPixel(); |
2064 results->depthPerComponent = info.GetBitsPerComponent(); | 2064 results->depthPerComponent = info.GetBitsPerComponent(); |
2065 results->isMonochrome = (results->depthPerComponent == 0); | 2065 results->isMonochrome = (results->depthPerComponent == 0); |
2066 } | 2066 } |
2067 | 2067 |
2068 } // namespace content | 2068 } // namespace content |
OLD | NEW |