Home | History | Annotate | Download | only in core

Lines Matching refs:SkSurface

8 /* Generated by tools/bookmaker from include/core/SkSurface.h and docs/SkSurface_Reference.bmh
14 bookmaker -b docs -i include/core/SkSurface.h -p
37 /** \class SkSurface
38 SkSurface is responsible for managing the pixels that a canvas draws into. The pixels can be
40 SkSurface takes care of allocating a SkCanvas that will draw into the surface. Call
42 SkSurface always has non-zero dimensions. If there is a request for a new surface, and either
45 class SK_API SkSurface : public SkRefCnt {
48 /** Allocates raster SkSurface. SkCanvas returned by SkSurface draws directly into pixels.
50 SkSurface is returned if all parameters are valid.
64 @param rowBytes interval from one SkSurface row to the next
67 @return SkSurface if all parameters are valid; otherwise, nullptr
69 static sk_sp<SkSurface> MakeRasterDirect(const SkImageInfo& imageInfo, void* pixels,
73 /** Allocates raster SkSurface. SkCanvas returned by SkSurface draws directly into pixels.
74 releaseProc is called with pixels and context when SkSurface is deleted.
76 SkSurface is returned if all parameters are valid.
90 @param rowBytes interval from one SkSurface row to the next
91 @param releaseProc called when SkSurface is deleted; may be nullptr
95 @return SkSurface if all parameters are valid; otherwise, nullptr
97 static sk_sp<SkSurface> MakeRasterDirectReleaseProc(const SkImageInfo& imageInfo, void* pixels,
102 /** Allocates raster SkSurface. SkCanvas returned by SkSurface draws directly into pixels.
105 Pixel memory is deleted when SkSurface is deleted.
107 SkSurface is returned if all parameters are valid.
118 @param rowBytes interval from one SkSurface row to the next; may be zero
121 @return SkSurface if all parameters are valid; otherwise, nullptr
123 static sk_sp<SkSurface> MakeRaster(const SkImageInfo& imageInfo, size_t rowBytes,
126 /** Allocates raster SkSurface. SkCanvas returned by SkSurface draws directly into pixels.
129 Pixel memory is deleted when SkSurface is deleted.
131 SkSurface is returned if all parameters are valid.
140 @return SkSurface if all parameters are valid; otherwise, nullptr
142 static sk_sp<SkSurface> MakeRaster(const SkImageInfo& imageInfo,
147 /** Allocates raster SkSurface. SkCanvas returned by SkSurface draws directly into pixels.
149 four. Pixel memory is deleted when SkSurface is deleted.
154 SkSurface is returned if width and height are greater than zero.
156 Use to create SkSurface that matches SkPMColor, the native pixel arrangement on
157 the platform. SkSurface drawn to output device skips converting its pixel format.
163 @return SkSurface if all parameters are valid; otherwise, nullptr
165 static sk_sp<SkSurface> MakeRasterN32Premul(int width, int height,
170 /** Wraps a GPU-backed texture into SkSurface. Caller must ensure the texture is
171 valid for the lifetime of returned SkSurface. If sampleCnt greater than zero,
172 creates an intermediate MSAA SkSurface which is used for drawing backendTexture.
174 SkSurface is returned if all parameters are valid. backendTexture is valid if
196 @return SkSurface if all parameters are valid; otherwise, nullptr
198 static sk_sp<SkSurface> MakeFromBackendTexture(GrContext* context,
205 /** Wraps a GPU-backed buffer into SkSurface. Caller must ensure backendRenderTarget
206 is valid for the lifetime of returned SkSurface.
208 SkSurface is returned if all parameters are valid. backendRenderTarget is valid if
230 @return SkSurface if all parameters are valid; otherwise, nullptr
232 static sk_sp<SkSurface> MakeFromBackendRenderTarget(GrContext* context,
239 /** Wraps a GPU-backed texture into SkSurface. Caller must ensure backendTexture is
240 valid for the lifetime of returned SkSurface. If sampleCnt greater than zero,
241 creates an intermediate MSAA SkSurface which is used for drawing backendTexture.
243 SkSurface is returned if all parameters are valid. backendTexture is valid if
249 Returned SkSurface is available only for drawing into, and cannot generate an
267 @return SkSurface if all parameters are valid; otherwise, nullptr
269 static sk_sp<SkSurface> MakeFromBackendTextureAsRenderTarget(GrContext* context,
277 /** Returns SkSurface on GPU indicated by context. Allocates memory for
302 @param shouldCreateWithMips hint that SkSurface will host mip map images
303 @return SkSurface if all parameters are valid; otherwise, nullptr
305 static sk_sp<SkSurface> MakeRenderTarget(GrContext* context, SkBudgeted budgeted,
311 /** Returns SkSurface on GPU indicated by context. Allocates memory for
322 SkSurface bottom-left corner is pinned to the origin.
331 @return SkSurface if all parameters are valid; otherwise, nullptr
333 static sk_sp<SkSurface> MakeRenderTarget(GrContext* context, SkBudgeted budgeted,
340 /** Returns SkSurface on GPU indicated by context. Allocates memory for
346 SkSurface bottom-left corner is pinned to the origin.
352 @return SkSurface if all parameters are valid; otherwise, nullptr
354 static sk_sp<SkSurface> MakeRenderTarget(GrContext* context, SkBudgeted budgeted,
363 /** Returns SkSurface on GPU indicated by context that is compatible with the provided
367 @param characterization description of the desired SkSurface
369 @return SkSurface if all parameters are valid; otherwise, nullptr
371 static sk_sp<SkSurface> MakeRenderTarget(GrContext* context,
375 /** Returns SkSurface without backing pixels. Drawing to SkCanvas returned from SkSurface
376 has no effect. Calling makeImageSnapshot() on returned SkSurface returns nullptr.
380 @return SkSurface if width and height are positive; otherwise, nullptr
382 static sk_sp<SkSurface> MakeNull(int width, int height);
396 /** Returns unique value identifying the content of SkSurface. Returned value changes
404 /** \enum SkSurface::ContentChangeMode
412 /** Notifies that SkSurface contents will be changed by code outside of Skia.
442 /** Retrieves the back-end texture. If SkSurface has no back-end texture, an invalid
446 The returned GrBackendTexture should be discarded if the SkSurface is drawn to or deleted.
455 /** Retrieves the back-end render target. If SkSurface has no back-end render target, an invalid
459 The returned GrBackendRenderTarget should be discarded if the SkSurface is drawn to
469 /** Returns SkCanvas that draws into SkSurface. Subsequent calls return the same SkCanvas.
470 SkCanvas returned is managed and owned by SkSurface, and is deleted when SkSurface
473 @return drawing SkCanvas for SkSurface
477 /** Returns a compatible SkSurface, or nullptr. Returned SkSurface contains
478 the same raster, GPU, or null properties as the original. Returned SkSurface
482 is incompatible with SkSurface.
485 of SkSurface; width and height must be greater than zero
486 @return compatible SkSurface or nullptr
488 sk_sp<SkSurface> makeSurface(const SkImageInfo& imageInfo);
490 /** Returns SkImage capturing SkSurface contents. Subsequent drawing to SkSurface contents
491 are not captured. SkImage allocation is accounted for if SkSurface was created with
494 @return SkImage initialized with SkSurface contents
509 /** Draws SkSurface contents to canvas, with its top-left corner at (x, y).
522 /** Copies SkSurface pixel address, row bytes, and SkImageInfo to SkPixmap, if address
526 pixmap contents become invalid on any future change to SkSurface.
529 @return true if SkSurface has direct access to pixels
535 Source SkRect corners are (srcX, srcY) and SkSurface (width(), height()).
540 Pixels are readable when SkSurface is raster, or backed by a GPU.
555 @param dst storage for pixels copied from SkSurface
564 Source SkRect corners are (srcX, srcY) and SkSurface (width(), height()).
569 Pixels are readable when SkSurface is raster, or backed by a GPU.
581 - SkSurface pixels could not be converted to dstInfo.colorType() or dstInfo.alphaType().
594 /** Copies SkRect of pixels from SkSurface into bitmap.
596 Source SkRect corners are (srcX, srcY) and SkSurface (width(), height()).
601 Pixels are readable when SkSurface is raster, or backed by a GPU.
613 - SkSurface pixels could not be converted to dst.colorType() or dst.alphaType().
617 @param dst storage for pixels copied from SkSurface
624 /** Copies SkRect of pixels from the src SkPixmap to the SkSurface.
631 converting to SkSurface colorType() and SkSurface alphaType() if required.
633 @param src storage for pixels to copy to SkSurface
634 @param dstX x-axis position relative to SkSurface to begin copy; may be negative
635 @param dstY y-axis position relative to SkSurface to begin copy; may be negative
639 /** Copies SkRect of pixels from the src SkBitmap to the SkSurface.
646 converting to SkSurface colorType() and SkSurface alphaType() if required.
648 @param src storage for pixels to copy to SkSurface
649 @param dstX x-axis position relative to SkSurface to begin copy; may be negative
650 @param dstY y-axis position relative to SkSurface to begin copy; may be negative
664 /** Issues pending SkSurface commands to the GPU-backed API and resolves any SkSurface MSAA.
672 /** Issues pending SkSurface commands to the GPU-backed API and resolves any SkSurface MSAA.
719 Return true if SkSurface supports characterization. raster surface returns false.
728 deferredDisplayList is not compatible with SkSurface.
738 SkSurface(int width, int height, const SkSurfaceProps* surfaceProps);
739 SkSurface(const SkImageInfo& imageInfo, const SkSurfaceProps* surfaceProps);