| 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 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1181 if (locks_on_frame_count_ > 0) { | 1181 if (locks_on_frame_count_ > 0) { |
| 1182 DCHECK(HasValidFrame()); | 1182 DCHECK(HasValidFrame()); |
| 1183 RetainFrame(output_surface_id, frame.Pass()); | 1183 RetainFrame(output_surface_id, frame.Pass()); |
| 1184 return; | 1184 return; |
| 1185 } | 1185 } |
| 1186 | 1186 |
| 1187 if (layer_.get() && layer_->layer_tree_host()) { | 1187 if (layer_.get() && layer_->layer_tree_host()) { |
| 1188 for (size_t i = 0; i < frame->metadata.latency_info.size(); i++) { | 1188 for (size_t i = 0; i < frame->metadata.latency_info.size(); i++) { |
| 1189 scoped_ptr<cc::SwapPromise> swap_promise( | 1189 scoped_ptr<cc::SwapPromise> swap_promise( |
| 1190 new cc::LatencyInfoSwapPromise(frame->metadata.latency_info[i])); | 1190 new cc::LatencyInfoSwapPromise(frame->metadata.latency_info[i])); |
| 1191 layer_->layer_tree_host()->QueueSwapPromise(swap_promise.Pass()); | 1191 layer_->layer_tree_host()->QueuePromise(swap_promise.Pass()); |
| 1192 } | 1192 } |
| 1193 } | 1193 } |
| 1194 | 1194 |
| 1195 DCHECK(!frame->delegated_frame_data->render_pass_list.empty()); | 1195 DCHECK(!frame->delegated_frame_data->render_pass_list.empty()); |
| 1196 | 1196 |
| 1197 cc::RenderPass* root_pass = | 1197 cc::RenderPass* root_pass = |
| 1198 frame->delegated_frame_data->render_pass_list.back(); | 1198 frame->delegated_frame_data->render_pass_list.back(); |
| 1199 texture_size_in_layer_ = root_pass->output_rect.size(); | 1199 texture_size_in_layer_ = root_pass->output_rect.size(); |
| 1200 ComputeContentsSize(frame->metadata); | 1200 ComputeContentsSize(frame->metadata); |
| 1201 | 1201 |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1967 results->orientationAngle = display.RotationAsDegree(); | 1967 results->orientationAngle = display.RotationAsDegree(); |
| 1968 results->orientationType = | 1968 results->orientationType = |
| 1969 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1969 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 1970 gfx::DeviceDisplayInfo info; | 1970 gfx::DeviceDisplayInfo info; |
| 1971 results->depth = info.GetBitsPerPixel(); | 1971 results->depth = info.GetBitsPerPixel(); |
| 1972 results->depthPerComponent = info.GetBitsPerComponent(); | 1972 results->depthPerComponent = info.GetBitsPerComponent(); |
| 1973 results->isMonochrome = (results->depthPerComponent == 0); | 1973 results->isMonochrome = (results->depthPerComponent == 0); |
| 1974 } | 1974 } |
| 1975 | 1975 |
| 1976 } // namespace content | 1976 } // namespace content |
| OLD | NEW |