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 8 #ifndef SkSurfacePriv_DEFINED 9 #define SkSurfacePriv_DEFINED 10 11 #include "include/core/SkSurfaceProps.h" 12 13 struct SkImageInfo; 14 SkSurfacePropsCopyOrDefault(const SkSurfaceProps * props)15static inline SkSurfaceProps SkSurfacePropsCopyOrDefault(const SkSurfaceProps* props) { 16 return props ? *props : SkSurfaceProps(); 17 } 18 19 enum SkSurfacePropsPrivateFlags { 20 // Use internal MSAA to render to non-MSAA GPU surfaces. 21 kDMSAA_SkSurfacePropsPrivateFlag = SkSurfaceProps::kLast_Flag << 1 22 }; 23 24 constexpr size_t kIgnoreRowBytesValue = static_cast<size_t>(~0); 25 26 bool SkSurfaceValidateRasterInfo(const SkImageInfo&, size_t rb = kIgnoreRowBytesValue); 27 28 #endif 29