41 fCachedCanvas->setSurfaceBase(
nullptr);
67 src.installPixels(peek);
68 srcRect = origSrcRect;
72 if (!this->
readPixels(src, origSrcRect.
x(), origSrcRect.
y())) {
91bool SkSurface_Base::outstandingImageSnapshot()
const {
92 return fCachedImage && !fCachedImage->
unique();
95bool SkSurface_Base::aboutToDraw(ContentChangeMode
mode) {
98 SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() ==
this);
113 fCachedImage.
reset();
128 SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() ==
this);
129 static std::atomic<uint32_t> nextID{1};
130 return nextID.fetch_add(1, std::memory_order_relaxed);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
void SkRescaleAndReadPixels(SkBitmap bmp, const SkImageInfo &resultInfo, const SkIRect &srcRect, SkImage::RescaleGamma rescaleGamma, SkImage::RescaleMode rescaleMode, SkImage::ReadPixelsCallback callback, SkImage::ReadPixelsContext context)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< const SkCapabilities > RasterBackend()
virtual GrRecordingContext * onGetRecordingContext() const
virtual void onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace, bool readAlpha, sk_sp< SkColorSpace > dstColorSpace, SkIRect srcRect, SkISize dstSize, RescaleGamma, RescaleMode, ReadPixelsCallback, ReadPixelsContext)
virtual skgpu::graphite::Recorder * onGetRecorder() const
virtual sk_sp< const SkCapabilities > onCapabilities()
uint32_t newGenerationID()
~SkSurface_Base() override
SkSurface_Base(int width, int height, const SkSurfaceProps *)
virtual bool onCopyOnWrite(ContentChangeMode)=0
virtual void onRestoreBackingMutability()
virtual void onDraw(SkCanvas *, SkScalar x, SkScalar y, const SkSamplingOptions &, const SkPaint *)
virtual void onAsyncRescaleAndReadPixels(const SkImageInfo &, const SkIRect srcRect, RescaleGamma, RescaleMode, ReadPixelsCallback, ReadPixelsContext)
@ kDiscard_ContentChangeMode
discards surface on change
void(ReadPixelsContext, std::unique_ptr< const AsyncReadResult >) ReadPixelsCallback
virtual SkImageInfo imageInfo() const
bool peekPixels(SkPixmap *pixmap)
sk_sp< SkImage > makeImageSnapshot()
bool readPixels(const SkPixmap &dst, int srcX, int srcY)
void reset(T *ptr=nullptr)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
sk_sp< const SkImage > image
SkSamplingOptions sampling
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
constexpr int32_t x() const
constexpr int32_t y() const
constexpr SkISize size() const
static constexpr SkIRect MakeSize(const SkISize &size)