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