legacy_display_globals.h 867 B

123456789101112131415161718192021222324252627
  1. // Copyright 2020 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 SKIA_EXT_LEGACY_DISPLAY_GLOBALS_H_
  5. #define SKIA_EXT_LEGACY_DISPLAY_GLOBALS_H_
  6. #include "third_party/skia/include/core/SkSurfaceProps.h"
  7. namespace skia {
  8. class SK_API LegacyDisplayGlobals {
  9. public:
  10. static void SetCachedPixelGeometry(SkPixelGeometry pixel_geometry);
  11. static SkPixelGeometry GetCachedPixelGeometry();
  12. // Returns a SkSurfaceProps with the cached geometry settings.
  13. static SkSurfaceProps GetSkSurfaceProps();
  14. static SkSurfaceProps GetSkSurfaceProps(uint32_t flags);
  15. // Will turn off LCD text if |can_use_lcd_text| is false.
  16. static SkSurfaceProps ComputeSurfaceProps(bool can_use_lcd_text);
  17. };
  18. } // namespace skia
  19. #endif // SKIA_EXT_LEGACY_DISPLAY_GLOBALS_H_