26 , fContextFactory(
std::move(contextFactory))
27 , fContextInfo(contextInfo)
41 std::unique_ptr<sk_gpu_test::GrContextFactory> fContextFactory;
56 uint32_t surfaceFlags,
64 auto contextFactory = std::make_unique<sk_gpu_test::GrContextFactory>(grContextOptions);
76 switch (surfaceType) {
104 return std::make_unique<GaneshVulkanSurfaceManager>(
105 std::move(contextFactory), contextInfo, context,
surface, config, colorInfo);
119 if (config ==
"vk") {
130 if (config ==
"vk_1010102") {
142 if (config ==
"vk_msaa4") {
153 if (config ==
"vk_msaa8") {
164 if (config ==
"vk_dmsaa") {
175 if (config ==
"vk_betex") {
186 if (config ==
"vk_bert") {
std::unique_ptr< SurfaceManager > makeVulkanSurfaceManager(std::string config, SurfaceOptions surfaceOptions, GrContextOptions grContextOptions, sk_gpu_test::GrContextFactory::ContextOverrides contextOverrides, SkColorInfo colorInfo, SurfaceType surfaceType, uint32_t surfaceFlags, int sampleCount)
@ kBottomLeft_GrSurfaceOrigin
@ kTopLeft_GrSurfaceOrigin
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SkASSERT_RELEASE(cond)
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
@ kRGBA_1010102_SkColorType
10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
sk_sp< SkSurface > getSurface() override
GaneshVulkanSurfaceManager(std::unique_ptr< sk_gpu_test::GrContextFactory > contextFactory, sk_gpu_test::ContextInfo contextInfo, GrDirectContext *context, sk_sp< SkSurface > surface, std::string config, SkColorInfo colorInfo)
sk_gpu_test::ContextInfo * getGaneshContextInfo() override
void flushAndSubmit(GrSyncCpu sync=GrSyncCpu::kNo)
static sk_sp< SkColorSpace > MakeSRGB()
static std::unique_ptr< SurfaceManager > FromConfig(std::string config, SurfaceOptions surfaceOptions)
GrDirectContext * directContext() const
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
sk_sp< SkSurface > MakeBackendRenderTargetSurface(GrDirectContext *dContext, const SkImageInfo &ii, GrSurfaceOrigin origin, int sampleCnt, GrProtected isProtected, const SkSurfaceProps *props)
sk_sp< SkSurface > MakeBackendTextureSurface(GrDirectContext *dContext, const SkImageInfo &ii, GrSurfaceOrigin origin, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected isProtected, const SkSurfaceProps *props)
@ kVulkan
ANGLE on Metal ES 3 context.
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
std::function< void(GrContextOptions *)> modifyGrContextOptions