class SkCanvas; class SkSurface; class SkSurfaceProps; struct SkImageInfo;
#include <cstddef>
namespace skcpu {
class SK_API Recorder : public SkRecorder {
public: /** Returns a non-null global context. Can be used as a means of transitioning onto *newAPIswhenaskcpu::Context/Recorderhasnotbeenpipeddownintothecodepaths
*/ static Recorder* TODO();
SkRecorder::Type type() const final { return SkRecorder::Type::kCPU; }
skcpu::Recorder* cpuRecorder() final { return this; }
/** Allocates a bitmap-backed SkSurface. SkCanvas returned by SkSurface draws directly into *thoseallocatedpixels,whicharezeroedbeforeuse.PixelmemorysizeisimageInfo.height() *timesimageInfo.minRowBytes()orrowBytes,ifprovidedandnon-zero. * *PixelmemoryisdeletedwhenSkSurfaceisdeleted. * *Validityconstraintsinclude: *-infodimensionsaregreaterthanzero; *-infocontainsSkColorTypeandSkAlphaTypesupportedbyrastersurface. * *@paramimageInfowidth,height,SkColorType,SkAlphaType,SkColorSpace, *ofrastersurface;widthandheightmustbegreaterthanzero *@paramrowBytesintervalfromoneSkSurfacerowtothenext. *@parampropsLCDstripingorientationandsettingfordeviceindependentfonts; *maybenullptr *@returnSkSurfaceifparametersarevalidandmemorywasallocated,elsenullptr.
*/
sk_sp<SkSurface> makeBitmapSurface(const SkImageInfo& imageInfo,
size_t rowBytes, const SkSurfaceProps* surfaceProps);
sk_sp<SkSurface> makeBitmapSurface(const SkImageInfo& imageInfo, const SkSurfaceProps* surfaceProps = nullptr);
private: // TODO (b/412351769): Implement this so we can capture from a CPU Recorder.
SkCanvas* makeCaptureCanvas(SkCanvas*) final { return nullptr; } void createCaptureBreakpoint(SkSurface*) final {}
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.