30 , fContextFactory(
std::move(contextFactory))
31 , fContextInfo(contextInfo)
45 std::unique_ptr<sk_gpu_test::GrContextFactory> fContextFactory;
60 uint32_t surfaceFlags,
68 auto contextFactory = std::make_unique<sk_gpu_test::GrContextFactory>(grContextOptions);
79 switch (surfaceType) {
107 return std::make_unique<GaneshGLSurfaceManager>(
108 std::move(contextFactory), contextInfo, context,
surface, config, colorInfo);
122 if (config ==
"gles") {
133 if (config ==
"gles_msaa4") {
144 if (config ==
"gles_msaa8") {
155 if (config ==
"gles_msaa8_noReduceOpsTaskSplitting") {
std::unique_ptr< SurfaceManager > makeGLESSurfaceManager(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
GaneshGLSurfaceManager(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_sp< SkSurface > getSurface() override
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)
Enable fReduceOpsTaskSplitting
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
std::function< void(GrContextOptions *)> modifyGrContextOptions