8#ifndef SkSurface_DEFINED
9#define SkSurface_DEFINED
82 return Raster(imageInfo, 0, props);
178 int width()
const {
return fWidth; }
198 uint32_t generationID();
215 void notifyContentWillChange(ContentChangeMode
mode);
235 kFlushRead_BackendHandleAccess = kFlushRead,
236 kFlushWrite_BackendHandleAccess = kFlushWrite,
237 kDiscardWrite_BackendHandleAccess = kDiscardWrite,
242 BackendHandleAccess::kFlushRead;
244 BackendHandleAccess::kFlushWrite;
246 BackendHandleAccess::kDiscardWrite;
395 bool readPixels(
const SkPixmap&
dst,
int srcX,
int srcY);
426 bool readPixels(
const SkImageInfo& dstInfo,
void* dstPixels,
size_t dstRowBytes,
459 bool readPixels(
const SkBitmap&
dst,
int srcX,
int srcY);
581 void writePixels(
const SkPixmap&
src,
int dstX,
int dstY);
598 void writePixels(
const SkBitmap&
src,
int dstX,
int dstY);
625 bool deleteSemaphoresAfterWait =
true);
654 uint32_t fGenerationID;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define INHERITED(method,...)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
const SkImageInfo & info() const
void * writable_addr() const
@ kDiscard_ContentChangeMode
discards surface on change
@ kRetain_ContentChangeMode
preserves surface on change
void(ReadPixelsContext, std::unique_ptr< const AsyncReadResult >) ReadPixelsCallback
const SkSurfaceProps & props() const
virtual bool replaceBackendTexture(const GrBackendTexture &backendTexture, GrSurfaceOrigin origin, ContentChangeMode mode=kRetain_ContentChangeMode, TextureReleaseProc=nullptr, ReleaseContext=nullptr)=0
virtual SkImageInfo imageInfo() const
void draw(SkCanvas *canvas, SkScalar x, SkScalar y, const SkPaint *paint=nullptr)
void(*)(ReleaseContext) TextureReleaseProc
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Optional< SkRect > bounds
SkSamplingOptions sampling
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
SK_API sk_sp< SkSurface > WrapPixels(const SkImageInfo &imageInfo, void *pixels, size_t rowBytes, const SkSurfaceProps *surfaceProps=nullptr)
void(void *pixels, void *context) PixelsReleaseProc
@ kPresent
back-end surface will be used for presenting to screen
@ kNoAccess
back-end surface will not be used by client
SK_API sk_sp< SkSurface > Null(int width, int height)
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
SkSamplingOptions(SkFilterMode::kLinear))
static SkImageInfo MakeUnknown()