Flutter Engine
The Flutter Engine
|
#include <SkImage_Base.h>
Public Types | |
enum class | Type { kRaster , kRasterPinnable , kLazy , kLazyPicture , kGanesh , kGaneshYUVA , kGraphite , kGraphiteYUVA } |
Public Types inherited from SkImage | |
enum | CachingHint { kAllow_CachingHint , kDisallow_CachingHint } |
enum class | RescaleGamma : bool { kSrc , kLinear } |
enum class | RescaleMode { kNearest , kLinear , kRepeatedLinear , kRepeatedCubic } |
enum | LegacyBitmapMode { kRO_LegacyBitmapMode } |
using | ReadPixelsContext = void * |
using | ReadPixelsCallback = void(ReadPixelsContext, std::unique_ptr< const AsyncReadResult >) |
Protected Member Functions | |
SkImage_Base (const SkImageInfo &info, uint32_t uniqueID) | |
Definition at line 38 of file SkImage_Base.h.
|
strong |
Enumerator | |
---|---|
kRaster | |
kRasterPinnable | |
kLazy | |
kLazyPicture | |
kGanesh | |
kGaneshYUVA | |
kGraphite | |
kGraphiteYUVA |
Definition at line 132 of file SkImage_Base.h.
|
override |
Definition at line 30 of file SkImage_Base.cpp.
|
protected |
Definition at line 27 of file SkImage_Base.cpp.
|
inlinevirtual |
Reimplemented in SkImage_GaneshBase.
Definition at line 112 of file SkImage_Base.h.
|
inlinevirtual |
this->context() try-casted to GrDirectContext. Useful for migrations – avoid otherwise!
Reimplemented in SkImage_GaneshBase.
Definition at line 115 of file SkImage_Base.h.
|
inlinevirtual |
|
pure virtual |
Implemented in SkImage_GaneshBase, SkImage_Lazy, SkImage_Raster, and skgpu::graphite::Image_Base.
|
inline |
Definition at line 155 of file SkImage_Base.h.
|
inline |
Definition at line 160 of file SkImage_Base.h.
|
inlineoverridevirtual |
Returns true if SkImage is backed by an image-generator or other service that creates and caches its pixels or texture on-demand.
example: https://fiddle.skia.org/c/@Image_isLazyGenerated_a example: https://fiddle.skia.org/c/@Image_isLazyGenerated_b
Implements SkImage.
Definition at line 146 of file SkImage_Base.h.
|
inline |
Definition at line 150 of file SkImage_Base.h.
|
inlineoverridevirtual |
Returns true if the contents of SkImage was created on or uploaded to GPU memory, and is available as a GPU texture.
example: https://fiddle.skia.org/c/@Image_isTextureBacked
Implements SkImage.
Definition at line 168 of file SkImage_Base.h.
|
inline |
Definition at line 164 of file SkImage_Base.h.
|
overridevirtual |
Creates SkImage in target SkColorSpace. Returns nullptr if SkImage could not be created.
Returns original SkImage if it is in target SkColorSpace. Otherwise, converts pixels from SkImage SkColorSpace to target SkColorSpace. If SkImage colorSpace() returns nullptr, SkImage SkColorSpace is assumed to be sRGB.
If this image is texture-backed, the context parameter is required and must match the context of the source image.
direct | The GrDirectContext in play, if it exists |
target | SkColorSpace describing color range of returned SkImage |
example: https://fiddle.skia.org/c/@Image_makeColorSpace
Implements SkImage.
Definition at line 127 of file SkImage_Base.cpp.
|
overridevirtual |
Creates SkImage in target SkColorSpace. Returns nullptr if SkImage could not be created.
Returns original SkImage if it is in target SkColorSpace. Otherwise, converts pixels from SkImage SkColorSpace to target SkColorSpace. If SkImage colorSpace() returns nullptr, SkImage SkColorSpace is assumed to be sRGB.
If this image is graphite-backed, the recorder parameter is required.
targetColorSpace | SkColorSpace describing color range of returned SkImage |
recorder | The Recorder in which to create the new image |
RequiredProperties | properties the returned SkImage must possess (e.g. mipmaps) |
Implements SkImage.
Definition at line 132 of file SkImage_Base.cpp.
|
overridevirtual |
Experimental. Creates SkImage in target SkColorType and SkColorSpace. Returns nullptr if SkImage could not be created.
Returns original SkImage if it is in target SkColorType and SkColorSpace.
If this image is texture-backed, the context parameter is required and must match the context of the source image.
direct | The GrDirectContext in play, if it exists |
targetColorType | SkColorType of returned SkImage |
targetColorSpace | SkColorSpace of returned SkImage |
Implements SkImage.
Definition at line 138 of file SkImage_Base.cpp.
|
overridevirtual |
Experimental. Creates SkImage in target SkColorType and SkColorSpace. Returns nullptr if SkImage could not be created.
Returns original SkImage if it is in target SkColorType and SkColorSpace.
If this image is graphite-backed, the recorder parameter is required.
targetColorType | SkColorType of returned SkImage |
targetColorSpace | SkColorSpace of returned SkImage |
recorder | The Recorder in which to create the new image |
RequiredProperties | properties the returned SkImage must possess (e.g. mipmaps) |
Implements SkImage.
Definition at line 158 of file SkImage_Base.cpp.
|
overridevirtual |
Returns subset of this image.
Returns nullptr if any of the following are true:
If the source image was texture-backed, the resulting image will be texture-backed also. Otherwise, the returned image will be raster-backed.
direct | the GrDirectContext of the source image (nullptr is ok if the source image is not texture-backed). |
subset | bounds of returned SkImage |
example: https://fiddle.skia.org/c/@Image_makeSubset
Implements SkImage.
Definition at line 80 of file SkImage_Base.cpp.
|
overridevirtual |
Returns subset of this image.
Returns nullptr if any of the following are true:
If the source image was texture-backed, the resulting image will be texture-backed also. Otherwise, the returned image will be raster-backed.
recorder | the recorder of the source image (nullptr is ok if the source image was texture-backed). |
subset | bounds of returned SkImage |
RequiredProperties | properties the returned SkImage must possess (e.g. mipmaps) |
Implements SkImage.
Definition at line 98 of file SkImage_Base.cpp.
|
inlinevirtual |
Reimplemented in SkImage_Raster.
Definition at line 174 of file SkImage_Base.h.
|
virtual |
Reimplemented in SkImage_Raster.
Definition at line 62 of file SkImage_Base.cpp.
|
virtual |
Default implementation does a rescale/read and then calls the callback.
Reimplemented in SkImage_Ganesh, and skgpu::graphite::Image_Base.
Definition at line 36 of file SkImage_Base.cpp.
|
virtual |
Default implementation does a rescale/read/yuv conversion and then calls the callback.
Reimplemented in SkImage_Ganesh, and skgpu::graphite::Image_Base.
Definition at line 113 of file SkImage_Base.cpp.
|
pure virtual |
Implemented in SkImage_Ganesh, SkImage_GaneshYUVA, skgpu::graphite::Image, skgpu::graphite::Image_YUVA, SkImage_Lazy, and SkImage_Raster.
|
pure virtual |
Implemented in SkImage_Ganesh, SkImage_GaneshYUVA, skgpu::graphite::Image, skgpu::graphite::Image_YUVA, SkImage_Lazy, and SkImage_Raster.
|
pure virtual |
Implemented in SkImage_GaneshYUVA, SkImage_Ganesh, SkImage_GaneshYUVA, skgpu::graphite::Image_Base, SkImage_Lazy, SkImage_Raster, and SkImage_GaneshBase.
|
pure virtual |
Implemented in SkImage_LazyTexture, skgpu::graphite::Image_Base, SkImage_Lazy, SkImage_Raster, and SkImage_GaneshBase.
|
pure virtual |
Implemented in skgpu::graphite::Image_Base, SkImage_Lazy, SkImage_Raster, and SkImage_GaneshBase.
Reimplemented in SkImage_Raster.
Definition at line 185 of file SkImage_Base.h.
|
inlinevirtual |
Reimplemented in SkImage_Raster.
Definition at line 64 of file SkImage_Base.h.
|
inlinevirtual |
Reimplemented in SkImage_Raster.
Definition at line 84 of file SkImage_Base.h.
|
inlinevirtual |
|
pure virtual |
Implemented in SkImage_Lazy, SkImage_Raster, skgpu::graphite::Image_Base, and SkImage_GaneshBase.
Reimplemented in SkImage_Lazy.
Definition at line 128 of file SkImage_Base.h.
|
pure virtual |
Implemented in SkImage_Ganesh, SkImage_GaneshYUVA, SkImage_Lazy, skgpu::graphite::Image, skgpu::graphite::Image_YUVA, and SkImage_Raster.
Definition at line 86 of file SkImage_Base.h.
|
inlineoverridevirtual |
Returns an approximation of the amount of texture memory used by the image. Returns zero if the image is not texture backed or if the texture has an external format.
Implements SkImage.
Definition at line 59 of file SkImage_Base.h.
|
pure virtual |