blob: c07602a361a0ba7d9533f8996eeb6e62ce84f115 [file] [log] [blame]
/*
* 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 "include/core/SkSurfaceProps.h"
struct SkImageInfo;
static inline SkSurfaceProps SkSurfacePropsCopyOrDefault(const SkSurfaceProps* props) {
return props ? *props : SkSurfaceProps();
}
enum SkSurfacePropsPrivateFlags {
// Use internal MSAA to render to non-MSAA GPU surfaces.
kDMSAA_SkSurfacePropsPrivateFlag = SkSurfaceProps::kLast_Flag << 1
};
constexpr size_t kIgnoreRowBytesValue = static_cast<size_t>(~0);
bool SkSurfaceValidateRasterInfo(const SkImageInfo&, size_t rb = kIgnoreRowBytesValue);
#endif