Flutter Engine
The Flutter Engine
|
#include <Device.h>
Public Types | |
enum class | InitContents { kClear , kUninit } |
using | RescaleGamma = SkImage::RescaleGamma |
using | RescaleMode = SkImage::RescaleMode |
using | ReadPixelsCallback = SkImage::ReadPixelsCallback |
using | ReadPixelsContext = SkImage::ReadPixelsContext |
Static Public Member Functions | |
static sk_sp< Device > | Make (GrRecordingContext *, GrColorType, sk_sp< GrSurfaceProxy >, sk_sp< SkColorSpace >, GrSurfaceOrigin, const SkSurfaceProps &, InitContents) |
static sk_sp< Device > | Make (GrRecordingContext *, skgpu::Budgeted, const SkImageInfo &, SkBackingFit, int sampleCount, skgpu::Mipmapped, GrProtected, GrSurfaceOrigin, const SkSurfaceProps &, InitContents) |
Private Member Functions | |
void | onDrawGlyphRunList (SkCanvas *, const sktext::GlyphRunList &, const SkPaint &paint) override |
bool | onReadPixels (const SkPixmap &, int, int) override |
bool | onWritePixels (const SkPixmap &, int, int) override |
bool | onAccessPixels (SkPixmap *) override |
sk_sp< skif::Backend > | createImageFilteringBackend (const SkSurfaceProps &surfaceProps, SkColorType colorType) const override |
void | onClipShader (sk_sp< SkShader > shader) override |
Friends | |
class | ::SkSurface_Ganesh |
class | skgpu::TiledTextureUtils |
Additional Inherited Members | |
Protected Member Functions inherited from SkDevice | |
void | setDeviceCoordinateSystem (const SkM44 &deviceToGlobal, const SkM44 &globalToDevice, const SkM44 &localToDevice, int bufferOriginX, int bufferOriginY) |
void | setOrigin (const SkM44 &globalCTM, int x, int y) |
bool | checkLocalToDeviceDirty () |
|
strong |
|
overridedefault |
|
overridevirtual |
Implements SkDevice.
Definition at line 411 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 1465 of file Device.cpp.
|
inlineoverridevirtual |
void skgpu::ganesh::Device::asyncRescaleAndReadPixels | ( | const SkImageInfo & | info, |
const SkIRect & | srcRect, | ||
RescaleGamma | rescaleGamma, | ||
RescaleMode | rescaleMode, | ||
ReadPixelsCallback | callback, | ||
ReadPixelsContext | context | ||
) |
Definition at line 1373 of file Device.cpp.
void skgpu::ganesh::Device::asyncRescaleAndReadPixelsYUV420 | ( | SkYUVColorSpace | yuvColorSpace, |
bool | readAlpha, | ||
sk_sp< SkColorSpace > | dstColorSpace, | ||
const SkIRect & | srcRect, | ||
SkISize | dstSize, | ||
RescaleGamma | rescaleGamma, | ||
RescaleMode | rescaleMode, | ||
ReadPixelsCallback | callback, | ||
ReadPixelsContext | context | ||
) |
Definition at line 1389 of file Device.cpp.
void skgpu::ganesh::Device::clearAll | ( | ) |
Definition at line 373 of file Device.cpp.
Implements SkDevice.
Definition at line 383 of file Device.cpp.
|
inlineoverridevirtual |
Implements SkDevice.
Definition at line 266 of file Device.h.
Implements SkDevice.
Definition at line 394 of file Device.cpp.
|
inlineoverridevirtual |
Implements SkDevice.
Definition at line 270 of file Device.h.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 1495 of file Device.cpp.
|
overridevirtual |
Create a new device based on CreateInfo. If the paint is not null, then it represents a preview of how the new device will be composed with its creator device (this).
The subclass may be handed this device in drawDevice(), so it must always return a device that it knows how to draw, and that it knows how to identify if it is not of the same subclass (since drawDevice is passed a SkDevice*). If the subclass cannot fulfill that contract (e.g. PDF cannot support some settings on the paint) it should return NULL, and the caller may then decide to explicitly create a bitmapdevice, knowing that later it could not call drawDevice with it (but it could call drawSprite or drawBitmap).
Reimplemented from SkDevice.
Definition at line 1418 of file Device.cpp.
|
overrideprivatevirtual |
Reimplemented from SkDevice.
Definition at line 835 of file Device.cpp.
|
inlineoverridevirtual |
void skgpu::ganesh::Device::discard | ( | ) |
Definition at line 1300 of file Device.cpp.
|
overridevirtual |
By the time this is called we know that abs(sweepAngle) is in the range [0, 360).
Reimplemented from SkDevice.
Definition at line 775 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 1000 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 1198 of file Device.cpp.
|
overridevirtual |
The SkDevice passed will be an SkDevice which was returned by a call to onCreateDevice on this device with kNeverTile_TileExpectation.
The default implementation calls snapSpecial() and drawSpecial() with the relative transform from the input device to this device. The provided SkPaint cannot have a mask filter or image filter, and any shader is ignored.
Reimplemented from SkDevice.
Definition at line 967 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 1261 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 672 of file Device.cpp.
void skgpu::ganesh::Device::drawEdgeAAImage | ( | const SkImage * | image, |
const SkRect & | src, | ||
const SkRect & | dst, | ||
const SkPoint | dstClip[4], | ||
SkCanvas::QuadAAFlags | canvasAAFlags, | ||
const SkMatrix & | localToDevice, | ||
const SkSamplingOptions & | sampling, | ||
const SkPaint & | paint, | ||
SkCanvas::SrcRectConstraint | constraint, | ||
const SkMatrix & | srcToDst, | ||
SkTileMode | tm | ||
) |
Definition at line 215 of file Device_drawTexture.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 475 of file Device_drawTexture.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 597 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 1094 of file Device.cpp.
|
overridevirtual |
|
overridevirtual |
Implements SkDevice.
Definition at line 1145 of file Device.cpp.
Implements SkDevice.
Definition at line 750 of file Device.cpp.
|
overridevirtual |
Implements SkDevice.
Definition at line 443 of file Device.cpp.
|
overridevirtual |
If pathIsMutable, then the implementation is allowed to cast path to a non-const pointer and modify it in place (as an optimization). Canvas may do this to implement helpers such as drawOval, by placing a temp path on the stack to hold the representation of the oval.
Implements SkDevice.
Definition at line 803 of file Device.cpp.
|
overridevirtual |
Implements SkDevice.
Definition at line 460 of file Device.cpp.
Implements SkDevice.
Definition at line 567 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 725 of file Device.cpp.
Implements SkDevice.
Definition at line 633 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 1179 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 1504 of file Device.cpp.
|
overridevirtual |
Draw the special image's subset to this device, subject to the given matrix transform instead of the device's current local to device matrix.
If 'constraint' is kFast, the rendered geometry of the image still reflects the extent of the SkSpecialImage's subset, but it's assumed that the pixel data beyond the subset is valid (e.g. SkSpecialImage::makeSubset() was called to crop a larger image).
Reimplemented from SkDevice.
Definition at line 371 of file Device_drawTexture.cpp.
|
overridevirtual |
If skipColorXform is true, then the implementation should assume that the provided vertex colors are already in the destination color space.
Implements SkDevice.
Definition at line 1110 of file Device.cpp.
|
overridevirtual |
Implements SkDevice.
Definition at line 431 of file Device.cpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements SkDevice.
|
static |
This factory uses the color space, origin, surface properties, and initialization method along with the provided proxy to create the gpu device.
Definition at line 212 of file Device.cpp.
|
static |
This factory uses the budgeted, imageInfo, fit, sampleCount, mipmapped, and isProtected parameters to create a proxy to back the gpu device. The color space (from the image info), origin, surface properties, and initialization method are then used (with the created proxy) to create the device.
Definition at line 281 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 841 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 866 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 1448 of file Device.cpp.
|
overrideprivatevirtual |
Reimplemented from SkDevice.
Definition at line 353 of file Device.cpp.
Implements SkDevice.
Definition at line 336 of file Device.h.
|
overrideprivatevirtual |
Implements SkDevice.
Definition at line 1235 of file Device.cpp.
|
overrideprivatevirtual |
Reimplemented from SkDevice.
Definition at line 329 of file Device.cpp.
|
overrideprivatevirtual |
Reimplemented from SkDevice.
Definition at line 341 of file Device.cpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
GrSurfaceProxyView skgpu::ganesh::Device::readSurfaceView | ( | ) |
Definition at line 1283 of file Device.cpp.
|
inlineoverridevirtual |
bool skgpu::ganesh::Device::replaceBackingProxy | ( | SkSurface::ContentChangeMode | mode | ) |
Definition at line 1338 of file Device.cpp.
bool skgpu::ganesh::Device::replaceBackingProxy | ( | SkSurface::ContentChangeMode | mode, |
sk_sp< GrRenderTargetProxy > | newRTP, | ||
GrColorType | grColorType, | ||
sk_sp< SkColorSpace > | colorSpace, | ||
GrSurfaceOrigin | origin, | ||
const SkSurfaceProps & | props | ||
) |
Definition at line 1308 of file Device.cpp.
|
inlineoverridevirtual |
Implements SkDevice.
Definition at line 276 of file Device.h.
void skgpu::ganesh::Device::resolveMSAA | ( | ) |
Definition at line 1304 of file Device.cpp.
|
inlineoverridevirtual |
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 892 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 935 of file Device.cpp.
|
overridevirtual |
Reimplemented from SkDevice.
Definition at line 1491 of file Device.cpp.
SurfaceDrawContext * skgpu::ganesh::Device::surfaceDrawContext | ( | ) |
Definition at line 358 of file Device.cpp.
const SurfaceDrawContext * skgpu::ganesh::Device::surfaceDrawContext | ( | ) | const |
Definition at line 363 of file Device.cpp.
SurfaceFillContext * skgpu::ganesh::Device::surfaceFillContext | ( | ) |
Definition at line 368 of file Device.cpp.
GrRenderTargetProxy * skgpu::ganesh::Device::targetProxy | ( | ) |
Definition at line 1287 of file Device.cpp.
bool skgpu::ganesh::Device::wait | ( | int | numSemaphores, |
const GrBackendSemaphore * | waitSemaphores, | ||
bool | deleteSemaphoresAfterWait | ||
) |
Definition at line 1291 of file Device.cpp.
|
friend |
|
friend |