diff options
Diffstat (limited to 'gfx/skia/skia/include/private/gpu/ganesh/GrMockTypesPriv.h')
-rw-r--r-- | gfx/skia/skia/include/private/gpu/ganesh/GrMockTypesPriv.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gfx/skia/skia/include/private/gpu/ganesh/GrMockTypesPriv.h b/gfx/skia/skia/include/private/gpu/ganesh/GrMockTypesPriv.h new file mode 100644 index 0000000000..59a608dcfc --- /dev/null +++ b/gfx/skia/skia/include/private/gpu/ganesh/GrMockTypesPriv.h @@ -0,0 +1,32 @@ +/* + * Copyright 2021 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef GrMockTypesPriv_DEFINED +#define GrMockTypesPriv_DEFINED + +#include "include/core/SkTextureCompressionType.h" +#include "include/gpu/mock/GrMockTypes.h" + +struct GrMockTextureSpec { + GrMockTextureSpec() + : fColorType(GrColorType::kUnknown) + , fCompressionType(SkTextureCompressionType::kNone) {} + GrMockTextureSpec(const GrMockSurfaceInfo& info) + : fColorType(info.fColorType) + , fCompressionType(info.fCompressionType) {} + + GrColorType fColorType = GrColorType::kUnknown; + SkTextureCompressionType fCompressionType = SkTextureCompressionType::kNone; +}; + +GrMockSurfaceInfo GrMockTextureSpecToSurfaceInfo(const GrMockTextureSpec& mockSpec, + uint32_t sampleCount, + uint32_t levelCount, + GrProtected isProtected); + +#endif + |