ink_drop_util.h 994 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2017 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 UI_VIEWS_ANIMATION_INK_DROP_UTIL_H_
  5. #define UI_VIEWS_ANIMATION_INK_DROP_UTIL_H_
  6. #include "ui/views/views_export.h"
  7. namespace gfx {
  8. class Transform;
  9. } // namespace gfx
  10. namespace views {
  11. class View;
  12. // A layer |transform| may add an offset to its layer relative to the parent
  13. // layer. This offset does not take into consideration the subpixel positioning.
  14. // A subpixel correction needs to be applied to make sure the layers are pixel
  15. // aligned after the transform is applied. Use this function to compute the
  16. // subpixel correction transform.
  17. VIEWS_EXPORT gfx::Transform GetTransformSubpixelCorrection(
  18. const gfx::Transform& transform,
  19. float device_scale_factor);
  20. VIEWS_EXPORT bool UsingPlatformHighContrastInkDrop(const View* view);
  21. } // namespace views
  22. #endif // UI_VIEWS_ANIMATION_INK_DROP_UTIL_H_