class SkColorInfo; class SkSurface; class SkCapture; enum SkYUVColorSpace : int; class SkColorSpace; class SkTraceMemoryDump; struct SkIRect; struct SkImageInfo;
namespace skcpu { class ContextImpl; class Recorder;
} // namespace skcpu
class BackendTexture; class Buffer; class ClientMappedBufferManager; class ContextPriv; struct ContextOptions; class PersistentPipelineStorage; class PrecompileContext; class QueueManager; class ResourceProvider; class SharedContext; class TextureProxy; class TextureProxyView;
/** Creates a helper object that can be moved to a different thread and used *forprecompilation.
*/
std::unique_ptr<PrecompileContext> makePrecompileContext();
// Provides access to functions that aren't part of the public API.
ContextPriv priv(); const ContextPriv priv() const; // NOLINT(readability-const-return-type)
class ContextID { public: static Context::ContextID Next();
using ConversionFn = void(void* dst, constvoid* mappedBuffer); // If null then the transfer could not be performed. Otherwise this buffer will contain // the pixel data when the transfer is complete.
sk_sp<Buffer> fTransferBuffer; // Size of the read.
SkISize fSize; // RowBytes for transfer buffer data
size_t fRowBytes; // If this is null then the transfer buffer will contain the data in the requested // color type. Otherwise, when the transfer is done this must be called to convert // from the transfer buffer's color type to the requested color type.
std::function<ConversionFn> fPixelConverter;
};
// Must be called in Make() to handle one-time GPU setup operations that can possibly fail and // require Context::Make() to return a nullptr. bool finishInitialization();
// Recorder is optional and will be used if drawing operations are required. If no Recorder is // provided but drawing operations are needed, a new Recorder will be created automatically. void asyncReadPixels(std::unique_ptr<Recorder>, const AsyncParams<SkImage>&); void asyncReadPixelsYUV420(std::unique_ptr<Recorder>, const AsyncParams<SkImage>&,
SkYUVColorSpace);
// Like asyncReadPixels() except it performs no fallbacks, and requires that the texture be // readable. However, the texture does not need to be sampleable. void asyncReadTexture(std::unique_ptr<Recorder>, const AsyncParams<TextureProxyView>&, const SkColorInfo& srcColorInfo);
// Inserts a texture to buffer transfer task, used by asyncReadPixels methods. If the // Recorder is non-null, tasks will be added to the Recorder's list; otherwise the transfer // tasks will be added to the queue manager directly.
PixelTransferResult transferPixels(Recorder*, const TextureProxyView& srcView, const SkColorInfo& srcColorInfo, const SkColorInfo& dstColorInfo, const SkIRect& srcRect);
// If the recorder is non-null, it will be snapped and inserted with the assumption that the // copy tasks (and possibly preparatory draw tasks) have already been added to the Recording. void finalizeAsyncReadPixels(std::unique_ptr<Recorder>,
SkSpan<PixelTransferResult>,
SkImage::ReadPixelsCallback callback,
SkImage::ReadPixelsContext callbackContext);
// In debug builds we guard against improper thread handling. This guard is passed to the // ResourceCache for the Context. mutable SingleOwner fSingleOwner;
// In test builds a Recorder may track the Context that was used to create it. bool fStoreContextRefInRecorder = false; // If this tracking is on, to allow the client to safely delete this Context or its Recorders // in any order we must also track the Recorders created here.
SkMutex fTestingLock;
std::vector<Recorder*> fTrackedRecorders SK_GUARDED_BY(fTestingLock); #endif
// Needed for MessageBox handling const ContextID fContextID;
};
} // namespace skgpu::graphite
#endif// skgpu_graphite_Context_DEFINED
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-09-30)
¤
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.