Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 1552733002: Convert Pass()→std::move() in //content (Android edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <utility>
8 9
9 #include "base/android/build_info.h" 10 #include "base/android/build_info.h"
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "base/callback_helpers.h" 12 #include "base/callback_helpers.h"
12 #include "base/command_line.h" 13 #include "base/command_line.h"
13 #include "base/logging.h" 14 #include "base/logging.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
16 #include "base/metrics/histogram.h" 17 #include "base/metrics/histogram.h"
17 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 context->SetContextType(BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT); 210 context->SetContextType(BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT);
210 if (context->InitializeOnCurrentThread()) { 211 if (context->InitializeOnCurrentThread()) {
211 context->traceBeginCHROMIUM( 212 context->traceBeginCHROMIUM(
212 "gpu_toplevel", 213 "gpu_toplevel",
213 base::StringPrintf("CmdBufferImageTransportFactory-%p", 214 base::StringPrintf("CmdBufferImageTransportFactory-%p",
214 context.get()).c_str()); 215 context.get()).c_str());
215 } else { 216 } else {
216 context.reset(); 217 context.reset();
217 } 218 }
218 219
219 return context.Pass(); 220 return context;
220 } 221 }
221 222
222 // This can only be used for readback postprocessing. It may return null if the 223 // This can only be used for readback postprocessing. It may return null if the
223 // channel was lost and not reestablished yet. 224 // channel was lost and not reestablished yet.
224 GLHelper* GetPostReadbackGLHelper() { 225 GLHelper* GetPostReadbackGLHelper() {
225 static GLHelperHolder* g_readback_helper_holder = nullptr; 226 static GLHelperHolder* g_readback_helper_holder = nullptr;
226 227
227 if (g_readback_helper_holder && g_readback_helper_holder->IsLost()) { 228 if (g_readback_helper_holder && g_readback_helper_holder->IsLost()) {
228 delete g_readback_helper_holder; 229 delete g_readback_helper_holder;
229 g_readback_helper_holder = nullptr; 230 g_readback_helper_holder = nullptr;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 rect.Union(controller.GetStartHandleRect()); 292 rect.Union(controller.GetStartHandleRect());
292 rect.Union(controller.GetEndHandleRect()); 293 rect.Union(controller.GetEndHandleRect());
293 return rect; 294 return rect;
294 } 295 }
295 296
296 } // anonymous namespace 297 } // anonymous namespace
297 298
298 RenderWidgetHostViewAndroid::LastFrameInfo::LastFrameInfo( 299 RenderWidgetHostViewAndroid::LastFrameInfo::LastFrameInfo(
299 uint32_t output_id, 300 uint32_t output_id,
300 scoped_ptr<cc::CompositorFrame> output_frame) 301 scoped_ptr<cc::CompositorFrame> output_frame)
301 : output_surface_id(output_id), frame(output_frame.Pass()) {} 302 : output_surface_id(output_id), frame(std::move(output_frame)) {}
302 303
303 RenderWidgetHostViewAndroid::LastFrameInfo::~LastFrameInfo() {} 304 RenderWidgetHostViewAndroid::LastFrameInfo::~LastFrameInfo() {}
304 305
305 void RenderWidgetHostViewAndroid::OnContextLost() { 306 void RenderWidgetHostViewAndroid::OnContextLost() {
306 scoped_ptr<RenderWidgetHostIterator> widgets( 307 scoped_ptr<RenderWidgetHostIterator> widgets(
307 RenderWidgetHostImpl::GetAllRenderWidgetHosts()); 308 RenderWidgetHostImpl::GetAllRenderWidgetHosts());
308 while (RenderWidgetHost* widget = widgets->GetNextHost()) { 309 while (RenderWidgetHost* widget = widgets->GetNextHost()) {
309 if (widget->GetView()) { 310 if (widget->GetView()) {
310 static_cast<RenderWidgetHostViewAndroid*>(widget->GetView()) 311 static_cast<RenderWidgetHostViewAndroid*>(widget->GetView())
311 ->OnLostResources(); 312 ->OnLostResources();
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 if (!frame_evictor_->HasFrame() || locks_on_frame_count_ == 0) 565 if (!frame_evictor_->HasFrame() || locks_on_frame_count_ == 0)
565 return; 566 return;
566 567
567 DCHECK(HasValidFrame()); 568 DCHECK(HasValidFrame());
568 frame_evictor_->UnlockFrame(); 569 frame_evictor_->UnlockFrame();
569 locks_on_frame_count_--; 570 locks_on_frame_count_--;
570 571
571 if (locks_on_frame_count_ == 0) { 572 if (locks_on_frame_count_ == 0) {
572 if (last_frame_info_) { 573 if (last_frame_info_) {
573 InternalSwapCompositorFrame(last_frame_info_->output_surface_id, 574 InternalSwapCompositorFrame(last_frame_info_->output_surface_id,
574 last_frame_info_->frame.Pass()); 575 std::move(last_frame_info_->frame));
575 last_frame_info_.reset(); 576 last_frame_info_.reset();
576 } 577 }
577 578
578 if (!is_showing_ && layer_.get()) 579 if (!is_showing_ && layer_.get())
579 layer_->SetHideLayerAndSubtree(true); 580 layer_->SetHideLayerAndSubtree(true);
580 } 581 }
581 } 582 }
582 583
583 void RenderWidgetHostViewAndroid::SetTextSurroundingSelectionCallback( 584 void RenderWidgetHostViewAndroid::SetTextSurroundingSelectionCallback(
584 const TextSurroundingSelectionCallback& callback) { 585 const TextSurroundingSelectionCallback& callback) {
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 compositor->AttachLayerForReadback(layer); 914 compositor->AttachLayerForReadback(layer);
914 915
915 readback_layer = layer; 916 readback_layer = layer;
916 request = cc::CopyOutputRequest::CreateRequest( 917 request = cc::CopyOutputRequest::CreateRequest(
917 base::Bind(&RenderWidgetHostViewAndroid:: 918 base::Bind(&RenderWidgetHostViewAndroid::
918 PrepareTextureCopyOutputResultForDelegatedReadback, 919 PrepareTextureCopyOutputResultForDelegatedReadback,
919 dst_size_in_pixel, preferred_color_type, start_time, 920 dst_size_in_pixel, preferred_color_type, start_time,
920 readback_layer, callback)); 921 readback_layer, callback));
921 if (!src_subrect_in_pixel.IsEmpty()) 922 if (!src_subrect_in_pixel.IsEmpty())
922 request->set_area(src_subrect_in_pixel); 923 request->set_area(src_subrect_in_pixel);
923 readback_layer->RequestCopyOfOutput(request.Pass()); 924 readback_layer->RequestCopyOfOutput(std::move(request));
924 } 925 }
925 926
926 void RenderWidgetHostViewAndroid::CopyFromCompositingSurfaceToVideoFrame( 927 void RenderWidgetHostViewAndroid::CopyFromCompositingSurfaceToVideoFrame(
927 const gfx::Rect& src_subrect, 928 const gfx::Rect& src_subrect,
928 const scoped_refptr<media::VideoFrame>& target, 929 const scoped_refptr<media::VideoFrame>& target,
929 const base::Callback<void(const gfx::Rect&, bool)>& callback) { 930 const base::Callback<void(const gfx::Rect&, bool)>& callback) {
930 NOTIMPLEMENTED(); 931 NOTIMPLEMENTED();
931 callback.Run(gfx::Rect(), false); 932 callback.Run(gfx::Rect(), false);
932 } 933 }
933 934
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 current_surface_size_ = texture_size_in_layer_; 1055 current_surface_size_ = texture_size_in_layer_;
1055 location_bar_content_translation_ = 1056 location_bar_content_translation_ =
1056 frame->metadata.location_bar_content_translation; 1057 frame->metadata.location_bar_content_translation;
1057 current_viewport_selection_ = frame->metadata.selection; 1058 current_viewport_selection_ = frame->metadata.selection;
1058 AttachLayers(); 1059 AttachLayers();
1059 } 1060 }
1060 1061
1061 cc::SurfaceFactory::DrawCallback ack_callback = 1062 cc::SurfaceFactory::DrawCallback ack_callback =
1062 base::Bind(&RenderWidgetHostViewAndroid::RunAckCallbacks, 1063 base::Bind(&RenderWidgetHostViewAndroid::RunAckCallbacks,
1063 weak_ptr_factory_.GetWeakPtr()); 1064 weak_ptr_factory_.GetWeakPtr());
1064 surface_factory_->SubmitCompositorFrame(surface_id_, frame.Pass(), 1065 surface_factory_->SubmitCompositorFrame(surface_id_, std::move(frame),
1065 ack_callback); 1066 ack_callback);
1066 } else { 1067 } else {
1067 if (!resource_collection_.get()) { 1068 if (!resource_collection_.get()) {
1068 resource_collection_ = new cc::DelegatedFrameResourceCollection; 1069 resource_collection_ = new cc::DelegatedFrameResourceCollection;
1069 resource_collection_->SetClient(this); 1070 resource_collection_->SetClient(this);
1070 } 1071 }
1071 if (!frame_provider_.get() || 1072 if (!frame_provider_.get() ||
1072 texture_size_in_layer_ != frame_provider_->frame_size()) { 1073 texture_size_in_layer_ != frame_provider_->frame_size()) {
1073 RemoveLayers(); 1074 RemoveLayers();
1074 frame_provider_ = new cc::DelegatedFrameProvider( 1075 frame_provider_ = new cc::DelegatedFrameProvider(
1075 resource_collection_.get(), frame->delegated_frame_data.Pass()); 1076 resource_collection_.get(), std::move(frame->delegated_frame_data));
1076 layer_ = cc::DelegatedRendererLayer::Create(Compositor::LayerSettings(), 1077 layer_ = cc::DelegatedRendererLayer::Create(Compositor::LayerSettings(),
1077 frame_provider_); 1078 frame_provider_);
1078 AttachLayers(); 1079 AttachLayers();
1079 } else { 1080 } else {
1080 frame_provider_->SetFrameData(frame->delegated_frame_data.Pass()); 1081 frame_provider_->SetFrameData(std::move(frame->delegated_frame_data));
1081 } 1082 }
1082 } 1083 }
1083 } 1084 }
1084 1085
1085 void RenderWidgetHostViewAndroid::SwapDelegatedFrame( 1086 void RenderWidgetHostViewAndroid::SwapDelegatedFrame(
1086 uint32_t output_surface_id, 1087 uint32_t output_surface_id,
1087 scoped_ptr<cc::CompositorFrame> frame) { 1088 scoped_ptr<cc::CompositorFrame> frame) {
1088 CheckOutputSurfaceChanged(output_surface_id); 1089 CheckOutputSurfaceChanged(output_surface_id);
1089 bool has_content = !texture_size_in_layer_.IsEmpty(); 1090 bool has_content = !texture_size_in_layer_.IsEmpty();
1090 1091
1091 // DelegatedRendererLayerImpl applies the inverse device_scale_factor of the 1092 // DelegatedRendererLayerImpl applies the inverse device_scale_factor of the
1092 // renderer frame, assuming that the browser compositor will scale 1093 // renderer frame, assuming that the browser compositor will scale
1093 // it back up to device scale. But on Android we put our browser layers in 1094 // it back up to device scale. But on Android we put our browser layers in
1094 // physical pixels and set our browser CC device_scale_factor to 1, so this 1095 // physical pixels and set our browser CC device_scale_factor to 1, so this
1095 // suppresses the transform. This line may need to be removed when fixing 1096 // suppresses the transform. This line may need to be removed when fixing
1096 // http://crbug.com/384134 or http://crbug.com/310763 1097 // http://crbug.com/384134 or http://crbug.com/310763
1097 frame->delegated_frame_data->device_scale_factor = 1.0f; 1098 frame->delegated_frame_data->device_scale_factor = 1.0f;
1098 1099
1099 base::Closure ack_callback = 1100 base::Closure ack_callback =
1100 base::Bind(&RenderWidgetHostViewAndroid::SendDelegatedFrameAck, 1101 base::Bind(&RenderWidgetHostViewAndroid::SendDelegatedFrameAck,
1101 weak_ptr_factory_.GetWeakPtr(), 1102 weak_ptr_factory_.GetWeakPtr(),
1102 output_surface_id); 1103 output_surface_id);
1103 1104
1104 ack_callbacks_.push(ack_callback); 1105 ack_callbacks_.push(ack_callback);
1105 1106
1106 if (!has_content) { 1107 if (!has_content) {
1107 DestroyDelegatedContent(); 1108 DestroyDelegatedContent();
1108 } else { 1109 } else {
1109 SubmitCompositorFrame(frame.Pass()); 1110 SubmitCompositorFrame(std::move(frame));
1110 } 1111 }
1111 1112
1112 if (layer_.get()) { 1113 if (layer_.get()) {
1113 layer_->SetIsDrawable(true); 1114 layer_->SetIsDrawable(true);
1114 layer_->SetContentsOpaque(true); 1115 layer_->SetContentsOpaque(true);
1115 layer_->SetBounds(texture_size_in_layer_); 1116 layer_->SetBounds(texture_size_in_layer_);
1116 } 1117 }
1117 1118
1118 if (host_->is_hidden()) 1119 if (host_->is_hidden())
1119 RunAckCallbacks(cc::SurfaceDrawStatus::DRAW_SKIPPED); 1120 RunAckCallbacks(cc::SurfaceDrawStatus::DRAW_SKIPPED);
1120 } 1121 }
1121 1122
1122 void RenderWidgetHostViewAndroid::InternalSwapCompositorFrame( 1123 void RenderWidgetHostViewAndroid::InternalSwapCompositorFrame(
1123 uint32_t output_surface_id, 1124 uint32_t output_surface_id,
1124 scoped_ptr<cc::CompositorFrame> frame) { 1125 scoped_ptr<cc::CompositorFrame> frame) {
1125 last_scroll_offset_ = frame->metadata.root_scroll_offset; 1126 last_scroll_offset_ = frame->metadata.root_scroll_offset;
1126 if (!frame->delegated_frame_data) { 1127 if (!frame->delegated_frame_data) {
1127 LOG(ERROR) << "Non-delegated renderer path no longer supported"; 1128 LOG(ERROR) << "Non-delegated renderer path no longer supported";
1128 return; 1129 return;
1129 } 1130 }
1130 1131
1131 if (locks_on_frame_count_ > 0) { 1132 if (locks_on_frame_count_ > 0) {
1132 DCHECK(HasValidFrame()); 1133 DCHECK(HasValidFrame());
1133 RetainFrame(output_surface_id, frame.Pass()); 1134 RetainFrame(output_surface_id, std::move(frame));
1134 return; 1135 return;
1135 } 1136 }
1136 1137
1137 if (!CompositorImpl::GetSurfaceManager() && layer_.get() && 1138 if (!CompositorImpl::GetSurfaceManager() && layer_.get() &&
1138 layer_->layer_tree_host()) { 1139 layer_->layer_tree_host()) {
1139 for (size_t i = 0; i < frame->metadata.latency_info.size(); i++) { 1140 for (size_t i = 0; i < frame->metadata.latency_info.size(); i++) {
1140 scoped_ptr<cc::SwapPromise> swap_promise( 1141 scoped_ptr<cc::SwapPromise> swap_promise(
1141 new cc::LatencyInfoSwapPromise(frame->metadata.latency_info[i])); 1142 new cc::LatencyInfoSwapPromise(frame->metadata.latency_info[i]));
1142 layer_->layer_tree_host()->QueueSwapPromise(swap_promise.Pass()); 1143 layer_->layer_tree_host()->QueueSwapPromise(std::move(swap_promise));
1143 } 1144 }
1144 } 1145 }
1145 1146
1146 DCHECK(!frame->delegated_frame_data->render_pass_list.empty()); 1147 DCHECK(!frame->delegated_frame_data->render_pass_list.empty());
1147 1148
1148 cc::RenderPass* root_pass = 1149 cc::RenderPass* root_pass =
1149 frame->delegated_frame_data->render_pass_list.back().get(); 1150 frame->delegated_frame_data->render_pass_list.back().get();
1150 texture_size_in_layer_ = root_pass->output_rect.size(); 1151 texture_size_in_layer_ = root_pass->output_rect.size();
1151 1152
1152 cc::CompositorFrameMetadata metadata = frame->metadata; 1153 cc::CompositorFrameMetadata metadata = frame->metadata;
1153 1154
1154 SwapDelegatedFrame(output_surface_id, frame.Pass()); 1155 SwapDelegatedFrame(output_surface_id, std::move(frame));
1155 frame_evictor_->SwappedFrame(!host_->is_hidden()); 1156 frame_evictor_->SwappedFrame(!host_->is_hidden());
1156 1157
1157 // As the metadata update may trigger view invalidation, always call it after 1158 // As the metadata update may trigger view invalidation, always call it after
1158 // any potential compositor scheduling. 1159 // any potential compositor scheduling.
1159 OnFrameMetadataUpdated(metadata); 1160 OnFrameMetadataUpdated(metadata);
1160 } 1161 }
1161 1162
1162 void RenderWidgetHostViewAndroid::OnSwapCompositorFrame( 1163 void RenderWidgetHostViewAndroid::OnSwapCompositorFrame(
1163 uint32_t output_surface_id, 1164 uint32_t output_surface_id,
1164 scoped_ptr<cc::CompositorFrame> frame) { 1165 scoped_ptr<cc::CompositorFrame> frame) {
1165 InternalSwapCompositorFrame(output_surface_id, frame.Pass()); 1166 InternalSwapCompositorFrame(output_surface_id, std::move(frame));
1166 } 1167 }
1167 1168
1168 void RenderWidgetHostViewAndroid::ClearCompositorFrame() { 1169 void RenderWidgetHostViewAndroid::ClearCompositorFrame() {
1169 DestroyDelegatedContent(); 1170 DestroyDelegatedContent();
1170 } 1171 }
1171 1172
1172 void RenderWidgetHostViewAndroid::RetainFrame( 1173 void RenderWidgetHostViewAndroid::RetainFrame(
1173 uint32_t output_surface_id, 1174 uint32_t output_surface_id,
1174 scoped_ptr<cc::CompositorFrame> frame) { 1175 scoped_ptr<cc::CompositorFrame> frame) {
1175 DCHECK(locks_on_frame_count_); 1176 DCHECK(locks_on_frame_count_);
1176 1177
1177 // Store the incoming frame so that it can be swapped when all the locks have 1178 // Store the incoming frame so that it can be swapped when all the locks have
1178 // been released. If there is already a stored frame, then replace and skip 1179 // been released. If there is already a stored frame, then replace and skip
1179 // the previous one but make sure we still eventually send the ACK. Holding 1180 // the previous one but make sure we still eventually send the ACK. Holding
1180 // the ACK also blocks the renderer when its max_frames_pending is reached. 1181 // the ACK also blocks the renderer when its max_frames_pending is reached.
1181 if (last_frame_info_) { 1182 if (last_frame_info_) {
1182 base::Closure ack_callback = 1183 base::Closure ack_callback =
1183 base::Bind(&RenderWidgetHostViewAndroid::SendDelegatedFrameAck, 1184 base::Bind(&RenderWidgetHostViewAndroid::SendDelegatedFrameAck,
1184 weak_ptr_factory_.GetWeakPtr(), 1185 weak_ptr_factory_.GetWeakPtr(),
1185 last_frame_info_->output_surface_id); 1186 last_frame_info_->output_surface_id);
1186 1187
1187 ack_callbacks_.push(ack_callback); 1188 ack_callbacks_.push(ack_callback);
1188 } 1189 }
1189 1190
1190 last_frame_info_.reset(new LastFrameInfo(output_surface_id, frame.Pass())); 1191 last_frame_info_.reset(
1192 new LastFrameInfo(output_surface_id, std::move(frame)));
1191 } 1193 }
1192 1194
1193 SynchronousCompositorBase* 1195 SynchronousCompositorBase*
1194 RenderWidgetHostViewAndroid::GetSynchronousCompositor() { 1196 RenderWidgetHostViewAndroid::GetSynchronousCompositor() {
1195 return sync_compositor_.get(); 1197 return sync_compositor_.get();
1196 } 1198 }
1197 1199
1198 void RenderWidgetHostViewAndroid::SynchronousFrameMetadata( 1200 void RenderWidgetHostViewAndroid::SynchronousFrameMetadata(
1199 const cc::CompositorFrameMetadata& frame_metadata) { 1201 const cc::CompositorFrameMetadata& frame_metadata) {
1200 if (!content_view_core_) 1202 if (!content_view_core_)
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 // static 1952 // static
1951 void RenderWidgetHostViewAndroid:: 1953 void RenderWidgetHostViewAndroid::
1952 PrepareTextureCopyOutputResultForDelegatedReadback( 1954 PrepareTextureCopyOutputResultForDelegatedReadback(
1953 const gfx::Size& dst_size_in_pixel, 1955 const gfx::Size& dst_size_in_pixel,
1954 SkColorType color_type, 1956 SkColorType color_type,
1955 const base::TimeTicks& start_time, 1957 const base::TimeTicks& start_time,
1956 scoped_refptr<cc::Layer> readback_layer, 1958 scoped_refptr<cc::Layer> readback_layer,
1957 const ReadbackRequestCallback& callback, 1959 const ReadbackRequestCallback& callback,
1958 scoped_ptr<cc::CopyOutputResult> result) { 1960 scoped_ptr<cc::CopyOutputResult> result) {
1959 readback_layer->RemoveFromParent(); 1961 readback_layer->RemoveFromParent();
1960 PrepareTextureCopyOutputResult( 1962 PrepareTextureCopyOutputResult(dst_size_in_pixel, color_type, start_time,
1961 dst_size_in_pixel, color_type, start_time, callback, result.Pass()); 1963 callback, std::move(result));
1962 } 1964 }
1963 1965
1964 // static 1966 // static
1965 void RenderWidgetHostViewAndroid::PrepareTextureCopyOutputResult( 1967 void RenderWidgetHostViewAndroid::PrepareTextureCopyOutputResult(
1966 const gfx::Size& dst_size_in_pixel, 1968 const gfx::Size& dst_size_in_pixel,
1967 SkColorType color_type, 1969 SkColorType color_type,
1968 const base::TimeTicks& start_time, 1970 const base::TimeTicks& start_time,
1969 const ReadbackRequestCallback& callback, 1971 const ReadbackRequestCallback& callback,
1970 scoped_ptr<cc::CopyOutputResult> result) { 1972 scoped_ptr<cc::CopyOutputResult> result) {
1971 base::ScopedClosureRunner scoped_callback_runner( 1973 base::ScopedClosureRunner scoped_callback_runner(
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
2059 results->orientationAngle = display.RotationAsDegree(); 2061 results->orientationAngle = display.RotationAsDegree();
2060 results->orientationType = 2062 results->orientationType =
2061 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2063 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2062 gfx::DeviceDisplayInfo info; 2064 gfx::DeviceDisplayInfo info;
2063 results->depth = info.GetBitsPerPixel(); 2065 results->depth = info.GetBitsPerPixel();
2064 results->depthPerComponent = info.GetBitsPerComponent(); 2066 results->depthPerComponent = info.GetBitsPerComponent();
2065 results->isMonochrome = (results->depthPerComponent == 0); 2067 results->isMonochrome = (results->depthPerComponent == 0);
2066 } 2068 }
2067 2069
2068 } // namespace content 2070 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | content/browser/vr/android/cardboard/cardboard_vr_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698