Index: content/browser/renderer_host/render_widget_host_view_android.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc |
index 644343df3754e8b8d962c298eb860135033e7536..5691cd33932e5317897a477256fb9f297153b161 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_android.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc |
@@ -794,6 +794,13 @@ void RenderWidgetHostViewAndroid::SwapDelegatedFrame( |
last_output_surface_id_ = output_surface_id; |
} |
+ // DelegatedRendererLayerImpl applies the inverse device_scale_factor of the |
+ // renderer frame, assuming that the browser compositor will scale |
+ // it back up to device scale. But on Android we put our browser layers in |
+ // physical pixels and set our browser CC device_scale_factor to 1, so this |
+ // suppresses the transform. |
jamesr
2014/06/12 23:00:04
maybe include a link to the crbug about multiple m
aelias_OOO_until_Jul13
2014/06/13 00:17:46
crbug archeology didn't turn up anything, but I li
jamesr
2014/06/13 00:27:53
I was thinking of http://code.google.com/p/chromiu
aelias_OOO_until_Jul13
2014/06/13 00:36:07
OK, linked.
|
+ frame_data->device_scale_factor = 1.0f; |
+ |
if (!has_content) { |
DestroyDelegatedContent(); |
} else { |
@@ -818,19 +825,6 @@ void RenderWidgetHostViewAndroid::SwapDelegatedFrame( |
layer_->SetContentsOpaque(true); |
layer_->SetBounds(content_size_in_layer_); |
layer_->SetNeedsDisplay(); |
- // DelegatedRendererLayer scales the frame data from physical space to DIPs |
- // by inverting the frame's device scale factor, assuming that the browser |
- // compositor will map from DIPs back to physical pixels using its own |
- // device scale factor. However, the Android browser compositor always uses |
- // a device scale factor of 1.0, so we have to transform the delegated |
- // layer by the device scale to get it into the same physical pixel space as |
- // the rest of the UI. |
- const gfx::Display& display = |
- gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); |
- float device_scale_factor = display.device_scale_factor(); |
- gfx::Transform layer_scale( |
- device_scale_factor, 0.f, 0.f, device_scale_factor, 0.f, 0.f); |
- layer_->SetTransform(layer_scale); |
} |
base::Closure ack_callback = |