cast_display_util.h 653 B

1234567891011121314151617181920
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef CHROMECAST_GRAPHICS_CAST_DISPLAY_UTIL_H_
  5. #define CHROMECAST_GRAPHICS_CAST_DISPLAY_UTIL_H_
  6. #include "ui/gfx/geometry/size.h"
  7. namespace chromecast {
  8. // Computes the default scale factor for display with given resolution.
  9. //
  10. // Cast applications target 720p; larger resolutions will be scaled up so
  11. // that content fills the screen.
  12. float GetDeviceScaleFactor(const gfx::Size& display_resolution);
  13. } // namespace chromecast
  14. #endif // CHROMECAST_GRAPHICS_CAST_DISPLAY_UTIL_H_