Index: chrome/browser/android/vr_shell/textures/system_indicator_texture.cc |
diff --git a/chrome/browser/android/vr_shell/textures/system_indicator_texture.cc b/chrome/browser/android/vr_shell/textures/system_indicator_texture.cc |
index 2ee7035e4a05040274c290bd6a21bc57dcc8d139..d87c6b945232d0ea4e43a495f70c3f03566d1aba 100644 |
--- a/chrome/browser/android/vr_shell/textures/system_indicator_texture.cc |
+++ b/chrome/browser/android/vr_shell/textures/system_indicator_texture.cc |
@@ -44,8 +44,8 @@ void SystemIndicatorTexture::Draw(SkCanvas* sk_canvas, |
gfx::Canvas gfx_canvas(&paint_canvas, 1.0f); |
gfx::Canvas* canvas = &gfx_canvas; |
- DCHECK(texture_size.height() * kHeightWidthRatio == texture_size.width()); |
size_.set_height(texture_size.height()); |
+ |
SkPaint paint; |
paint.setColor(color_scheme().system_indicator_background); |
@@ -99,9 +99,10 @@ void SystemIndicatorTexture::Draw(SkCanvas* sk_canvas, |
gfx::Size SystemIndicatorTexture::GetPreferredTextureSize( |
int maximum_width) const { |
- // Ensuring height is a quarter of the width. |
+ // All indicators need to be the same height, so compute height, and then |
+ // re-compute with based on whether the indicator has text or not. |
int height = maximum_width / kHeightWidthRatio; |
- return gfx::Size(height * kHeightWidthRatio, height); |
+ return gfx::Size(has_text_ ? maximum_width : height, height); |
} |
gfx::SizeF SystemIndicatorTexture::GetDrawnSize() const { |