8#ifndef SkSurface_Base_DEFINED
9#define SkSurface_Base_DEFINED
158 bool deleteSemaphoresAfterWait) {
178 std::unique_ptr<SkCanvas> fCachedCanvas =
nullptr;
186 bool outstandingImageSnapshot()
const;
193 if (
nullptr == fCachedCanvas) {
194 fCachedCanvas = std::unique_ptr<SkCanvas>(this->
onNewCanvas());
196 fCachedCanvas->setSurfaceBase(
this);
199 return fCachedCanvas.get();
209 SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() ==
this);
static const SkSurface_Base * asConstSB(const SkSurface *surface)
static SkSurface_Base * asSB(SkSurface *surface)
virtual GrRecordingContext * onGetRecordingContext() const
virtual void onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace, bool readAlpha, sk_sp< SkColorSpace > dstColorSpace, SkIRect srcRect, SkISize dstSize, RescaleGamma, RescaleMode, ReadPixelsCallback, ReadPixelsContext)
bool isGraphiteBacked() const
virtual bool onCharacterize(GrSurfaceCharacterization *) const
virtual sk_sp< SkImage > onNewImageSnapshot(const SkIRect *subset=nullptr)
virtual SkCanvas * onNewCanvas()=0
virtual skgpu::graphite::Recorder * onGetRecorder() const
sk_sp< SkImage > refCachedImage()
virtual sk_sp< const SkCapabilities > onCapabilities()
virtual sk_sp< SkSurface > onNewSurface(const SkImageInfo &)=0
uint32_t newGenerationID()
~SkSurface_Base() override
SkSurface_Base(int width, int height, const SkSurfaceProps *)
virtual bool onWait(int numSemaphores, const GrBackendSemaphore *waitSemaphores, bool deleteSemaphoresAfterWait)
virtual void onWritePixels(const SkPixmap &, int x, int y)=0
virtual bool onCopyOnWrite(ContentChangeMode)=0
virtual bool onIsCompatible(const GrSurfaceCharacterization &) const
virtual void onRestoreBackingMutability()
SkCanvas * getCachedCanvas()
virtual void onDraw(SkCanvas *, SkScalar x, SkScalar y, const SkSamplingOptions &, const SkPaint *)
bool isRasterBacked() const
virtual void onAsyncRescaleAndReadPixels(const SkImageInfo &, const SkIRect srcRect, RescaleGamma, RescaleMode, ReadPixelsCallback, ReadPixelsContext)
bool isGaneshBacked() const
virtual Type type() const
bool hasCachedImage() const
bool replaceBackendTexture(const GrBackendTexture &, GrSurfaceOrigin, ContentChangeMode, TextureReleaseProc, ReleaseContext) override
void(ReadPixelsContext, std::unique_ptr< const AsyncReadResult >) ReadPixelsCallback
void(*)(ReleaseContext) TextureReleaseProc
@ kRaster
Suitable for thread which raster data.
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode