Chromium Code Reviews| Index: cc/heads_up_display_layer.cc |
| diff --git a/cc/heads_up_display_layer.cc b/cc/heads_up_display_layer.cc |
| index cfbfea7af0825b4548419bb670eb20f270f0fb4e..72a8a6b014e0d11cee23b3d9db6dc584735ab28e 100644 |
| --- a/cc/heads_up_display_layer.cc |
| +++ b/cc/heads_up_display_layer.cc |
| @@ -35,12 +35,12 @@ void HeadsUpDisplayLayer::update(ResourceUpdateQueue&, const OcclusionTracker*, |
| matrix.MakeIdentity(); |
| if (debugState.showPlatformLayerTree || debugState.showHudRects()) { |
| - int width = std::min(maxTextureSize, layerTreeHost()->layoutViewportSize().width()); |
| - int height = std::min(maxTextureSize, layerTreeHost()->layoutViewportSize().height()); |
| + int width = std::min(maxTextureSize, static_cast<int>(layerTreeHost()->deviceViewportSize().width() / layerTreeHost()->deviceScaleFactor())); |
|
danakj
2013/02/20 02:46:08
split these "static_cast<>(dVS.width/lTH.dSF)" par
|
| + int height = std::min(maxTextureSize, static_cast<int>(layerTreeHost()->deviceViewportSize().height() / layerTreeHost()->deviceScaleFactor())); |
| bounds = gfx::Size(width, height); |
| } else { |
| bounds = gfx::Size(256, 256); |
| - matrix.Translate(layerTreeHost()->layoutViewportSize().width() - 256, 0); |
| + matrix.Translate(static_cast<int>(layerTreeHost()->deviceViewportSize().width() / layerTreeHost()->deviceScaleFactor()) - 256, 0); |
| } |
| setBounds(bounds); |