8#ifndef SurfaceContext_DEFINED
9#define SurfaceContext_DEFINED
40class SurfaceFillContext;
166#if defined(GR_TEST_UTILS)
168 return this->
copy(std::move(
src), srcRect, dstPoint) !=
nullptr;
173 return this->
copy(std::move(
src),
rect, {0, 0}) !=
nullptr;
181 SkDEBUGCODE(
void validate()
const;)
213 friend class ::GrRecordingContextPriv;
214 friend class ::GrSurfaceProxy;
216 SkDEBUGCODE(
virtual void onValidate()
const {})
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static void copy(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
skgpu::Swizzle swizzle() const
skgpu::Mipmapped mipmapped() const
GrTextureProxy * asTextureProxy() const
SkISize dimensions() const
sk_sp< GrTextureProxy > asTextureProxyRef() const
GrSurfaceOrigin origin() const
GrSurfaceProxy * proxy() const
GrRenderTargetProxy * asRenderTargetProxy() const
sk_sp< GrSurfaceProxy > refProxy() const
sk_sp< GrRenderTargetProxy > asRenderTargetProxyRef() const
SkISize dimensions() const
void(ReadPixelsContext, std::unique_ptr< const AsyncReadResult >) ReadPixelsCallback
PixelTransferResult transferPixels(GrColorType colorType, const SkIRect &rect)
GrSurfaceProxy * asSurfaceProxy()
GrDrawingManager * drawingManager()
virtual ~SurfaceContext()=default
sk_sp< GrRenderTargetProxy > asRenderTargetProxyRef()
bool readPixels(GrDirectContext *dContext, GrPixmap dst, SkIPoint srcPt)
SkDEBUGCODE(void validate() const ;) SkDEBUGCODE(skgpu GrRecordingContext * fContext
SkISize dimensions() const
bool writePixels(GrDirectContext *dContext, GrCPixmap src, SkIPoint dstPt)
GrRenderTargetProxy * asRenderTargetProxy()
bool rescaleInto(SurfaceFillContext *dst, SkIRect dstRect, SkIRect srcRect, SkImage::RescaleGamma, SkImage::RescaleMode)
const GrSurfaceProxy * asSurfaceProxy() const
GrImageInfo imageInfo() const
sk_sp< GrTextureProxy > asTextureProxyRef()
const GrCaps * caps() const
SkImage::ReadPixelsCallback ReadPixelsCallback
const GrRenderTargetProxy * asRenderTargetProxy() const
GrRecordingContext * recordingContext() const
const GrColorInfo & colorInfo() const
GrSurfaceProxyView fReadView
GrTextureProxy * asTextureProxy()
void asyncRescaleAndReadPixels(GrDirectContext *, const SkImageInfo &info, const SkIRect &srcRect, RescaleGamma rescaleGamma, RescaleMode, ReadPixelsCallback callback, ReadPixelsContext callbackContext)
skgpu::Mipmapped mipmapped() const
GrSurfaceProxyView readSurfaceView()
SurfaceContext(GrRecordingContext *, GrSurfaceProxyView readView, const GrColorInfo &)
void asyncRescaleAndReadPixelsYUV420(GrDirectContext *, SkYUVColorSpace yuvColorSpace, bool readAlpha, sk_sp< SkColorSpace > dstColorSpace, const SkIRect &srcRect, SkISize dstSize, RescaleGamma rescaleGamma, RescaleMode, ReadPixelsCallback callback, ReadPixelsContext context)
void asyncReadPixels(GrDirectContext *, const SkIRect &srcRect, SkColorType, ReadPixelsCallback, ReadPixelsContext)
const GrTextureProxy * asTextureProxy() const
skgpu::Swizzle readSwizzle() const
SkImage::ReadPixelsContext ReadPixelsContext
std::unique_ptr< SurfaceFillContext > rescale(const GrImageInfo &info, GrSurfaceOrigin, SkIRect srcRect, SkImage::RescaleGamma, SkImage::RescaleMode)
virtual SurfaceFillContext * asFillContext()
sk_sp< GrSurfaceProxy > asSurfaceProxyRef()
GrSurfaceOrigin origin() const
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
sk_sp< SkBlender > blender SkRect rect
static constexpr SkIRect MakeSize(const SkISize &size)
void(void *dst, const void *mappedBuffer) ConversionFn
sk_sp< GrGpuBuffer > fTransferBuffer
std::function< ConversionFn > fPixelConverter