1 /* 2 * Copyright 2021 Google LLC 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 GrMockTypesPriv_DEFINED 9 #define GrMockTypesPriv_DEFINED 10 11 #include "include/core/SkTextureCompressionType.h" 12 #include "include/gpu/ganesh/GrTypes.h" 13 #include "include/gpu/ganesh/mock/GrMockTypes.h" 14 #include "include/private/gpu/ganesh/GrTypesPriv.h" 15 16 #include <cstdint> 17 18 struct GrMockTextureSpec { GrMockTextureSpecGrMockTextureSpec19 GrMockTextureSpec() 20 : fColorType(GrColorType::kUnknown) 21 , fCompressionType(SkTextureCompressionType::kNone) {} GrMockTextureSpecGrMockTextureSpec22 GrMockTextureSpec(const GrMockSurfaceInfo& info) 23 : fColorType(info.fColorType) 24 , fCompressionType(info.fCompressionType) {} 25 26 GrColorType fColorType = GrColorType::kUnknown; 27 SkTextureCompressionType fCompressionType = SkTextureCompressionType::kNone; 28 }; 29 30 GrMockSurfaceInfo GrMockTextureSpecToSurfaceInfo(const GrMockTextureSpec& mockSpec, 31 uint32_t sampleCount, 32 uint32_t levelCount, 33 GrProtected isProtected); 34 35 #endif 36 37