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

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

Issue 888793002: Make content_browsertests for Chrome on Android running with valid Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set valid physical backing size before viewport size is set Created 5 years, 10 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 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 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 1101
1102 void RenderWidgetHostViewAndroid::ComputeContentsSize( 1102 void RenderWidgetHostViewAndroid::ComputeContentsSize(
1103 const cc::CompositorFrameMetadata& frame_metadata) { 1103 const cc::CompositorFrameMetadata& frame_metadata) {
1104 // Calculate the content size. This should be 0 if the texture_size is 0. 1104 // Calculate the content size. This should be 0 if the texture_size is 0.
1105 gfx::Vector2dF offset; 1105 gfx::Vector2dF offset;
1106 if (texture_size_in_layer_.IsEmpty()) 1106 if (texture_size_in_layer_.IsEmpty())
1107 content_size_in_layer_ = gfx::Size(); 1107 content_size_in_layer_ = gfx::Size();
1108 content_size_in_layer_ = gfx::ToCeiledSize(gfx::ScaleSize( 1108 content_size_in_layer_ = gfx::ToCeiledSize(gfx::ScaleSize(
1109 frame_metadata.scrollable_viewport_size, 1109 frame_metadata.scrollable_viewport_size,
1110 frame_metadata.device_scale_factor * frame_metadata.page_scale_factor)); 1110 frame_metadata.device_scale_factor * frame_metadata.page_scale_factor));
1111 1111 last_page_scale_factor_ = frame_metadata.page_scale_factor;
1112 } 1112 }
1113 1113
1114 void RenderWidgetHostViewAndroid::InternalSwapCompositorFrame( 1114 void RenderWidgetHostViewAndroid::InternalSwapCompositorFrame(
1115 uint32 output_surface_id, 1115 uint32 output_surface_id,
1116 scoped_ptr<cc::CompositorFrame> frame) { 1116 scoped_ptr<cc::CompositorFrame> frame) {
1117 last_scroll_offset_ = frame->metadata.root_scroll_offset; 1117 last_scroll_offset_ = frame->metadata.root_scroll_offset;
1118 if (!frame->delegated_frame_data) { 1118 if (!frame->delegated_frame_data) {
1119 LOG(ERROR) << "Non-delegated renderer path no longer supported"; 1119 LOG(ERROR) << "Non-delegated renderer path no longer supported";
1120 return; 1120 return;
1121 } 1121 }
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
1917 results->orientationAngle = display.RotationAsDegree(); 1917 results->orientationAngle = display.RotationAsDegree();
1918 results->orientationType = 1918 results->orientationType =
1919 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 1919 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
1920 gfx::DeviceDisplayInfo info; 1920 gfx::DeviceDisplayInfo info;
1921 results->depth = info.GetBitsPerPixel(); 1921 results->depth = info.GetBitsPerPixel();
1922 results->depthPerComponent = info.GetBitsPerComponent(); 1922 results->depthPerComponent = info.GetBitsPerComponent();
1923 results->isMonochrome = (results->depthPerComponent == 0); 1923 results->isMonochrome = (results->depthPerComponent == 0);
1924 } 1924 }
1925 1925
1926 } // namespace content 1926 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698