SkSurfacePriv.h 654 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright 2014 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef SkSurfacePriv_DEFINED
  8. #define SkSurfacePriv_DEFINED
  9. #include "include/core/SkSurfaceProps.h"
  10. struct SkImageInfo;
  11. static inline SkSurfaceProps SkSurfacePropsCopyOrDefault(const SkSurfaceProps* props) {
  12. if (props) {
  13. return *props;
  14. } else {
  15. return SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType);
  16. }
  17. }
  18. constexpr size_t kIgnoreRowBytesValue = static_cast<size_t>(~0);
  19. bool SkSurfaceValidateRasterInfo(const SkImageInfo&, size_t rb = kIgnoreRowBytesValue);
  20. #endif