175 {
176 auto dContext = ctxInfo.directContext();
177
180
181 auto mbet = sk_gpu_test::ManagedBackendTexture::MakeFromInfo(
182 dContext,
info, skgpu::Mipmapped::kNo, GrRenderable::kYes);
183 if (!mbet) {
184 return;
185 }
186
188 mbet->texture(),
190 1,
192 nullptr,
193 nullptr,
194 sk_gpu_test::ManagedBackendTexture::ReleaseProc,
195 mbet->releaseContext(nullptr, nullptr));
196
198 return;
199 }
202
203
204
205
209
210 dContext->flush(flushInfo);
211
214 SkImage::RescaleGamma::kSrc,
215 SkImage::RescaleMode::kNearest,
217 nullptr);
218
220
222}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static void async_callback(void *c, std::unique_ptr< const SkImage::AsyncReadResult > result)
static void abandon_context(void *context)
@ kTopLeft_GrSurfaceOrigin
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
constexpr SkColor SK_ColorGREEN
void clear(SkColor color)
SK_API sk_sp< SkSurface > WrapBackendTexture(GrRecordingContext *context, const GrBackendTexture &backendTexture, GrSurfaceOrigin origin, int sampleCnt, SkColorType colorType, sk_sp< SkColorSpace > colorSpace, const SkSurfaceProps *surfaceProps, TextureReleaseProc textureReleaseProc=nullptr, ReleaseContext releaseContext=nullptr)
GrGpuFinishedContext fFinishedContext
GrGpuFinishedProc fFinishedProc
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)