class GrAuditTrail; class GrContextThreadSafeProxy; class GrDirectContext; class GrDrawingManager; class GrOnFlushCallbackObject; class GrProgramDesc; class GrProgramInfo; class GrProxyProvider; class GrRecordingContextPriv; class GrThreadSafeCache; class SkArenaAlloc; class SkCapabilities; class SkJSONWriter;
namespace sktext::gpu { class SubRunAllocator; class TextBlobRedrawCoordinator;
}
class GrRecordingContext : public GrImageContext { public:
~GrRecordingContext() override;
/** * Reports whether the GrDirectContext associated with this GrRecordingContext is abandoned. * When called on a GrDirectContext it may actively check whether the underlying 3D API * device/context has been disconnected before reporting the status. If so, calling this * method will transition the GrDirectContext to the abandoned state.
*/ bool abandoned() override { return GrImageContext::abandoned(); }
/* * Can a SkSurface be created with the given color type. To check whether MSAA is supported * use maxSurfaceSampleCountForColorType().
*/
SK_API bool colorTypeSupportedAsSurface(SkColorType colorType) const { if (kR16G16_unorm_SkColorType == colorType ||
kA16_unorm_SkColorType == colorType ||
kA16_float_SkColorType == colorType ||
kR16G16_float_SkColorType == colorType ||
kR16G16B16A16_unorm_SkColorType == colorType ||
kGray_8_SkColorType == colorType) { returnfalse;
}
/** * Gets the maximum supported texture size.
*/
SK_API int maxTextureSize() const;
/** * Gets the maximum supported render target size.
*/
SK_API int maxRenderTargetSize() const;
/** * Can a SkImage be created with the given color type.
*/
SK_API bool colorTypeSupportedAsImage(SkColorType) const;
/** * Does this context support protected content?
*/
SK_API bool supportsProtectedContent() const;
/** * Gets the maximum supported sample count for a color type. 1 is returned if only non-MSAA * rendering is supported for the color type. 0 is returned if rendering to this color type * is not supported at all.
*/
SK_API int maxSurfaceSampleCountForColorType(SkColorType colorType) const { return GrImageContext::maxSurfaceSampleCountForColorType(colorType);
}
// Provides access to functions that aren't part of the public API.
GrRecordingContextPriv priv(); const GrRecordingContextPriv priv() const; // NOLINT(readability-const-return-type)
// The collection of specialized memory arenas for different types of data recorded by a // GrRecordingContext. Arenas does not maintain ownership of the pools it groups together. class Arenas { public:
Arenas(SkArenaAlloc*, sktext::gpu::SubRunAllocator*);
// For storing pipelines and other complex data as-needed by ops
SkArenaAlloc* recordTimeAllocator() { return fRecordTimeAllocator; }
// There is no going back from this method. It should only be called to control the timing // during abandon or destruction of the context. void destroyDrawingManager();
Arenas arenas() { return fArenas.get(); } // This entry point should only be used for DDL creation where we want the ops' lifetime to // match that of the DDL.
OwnedArenas&& detachArenas();
private: // TODO: store the GrProgramDescs in the 'fRecordTimeData' arena
std::unique_ptr<const GrProgramDesc> fDesc; // The program infos should be stored in 'fRecordTimeData' so do not need to be ref // counted or deleted in the destructor. const GrProgramInfo* fInfo = nullptr;
};
// This entry point gives the recording context a chance to cache the provided // programInfo. The DDL context takes this opportunity to store programInfos as a sidecar // to the DDL. virtualvoid recordProgramInfo(const GrProgramInfo*) {} // This asks the recording context to return any programInfos it may have collected // via the 'recordProgramInfo' call. It is up to the caller to ensure that the lifetime // of the programInfos matches the intended use. For example, in DDL-record mode it // is known that all the programInfos will have been allocated in an arena with the // same lifetime at the DDL itself. virtualvoid detachProgramData(skia_private::TArray<ProgramData>*) {}
/** * Registers an object for flush-related callbacks. (See GrOnFlushCallbackObject.) * * NOTE: the drawing manager tracks this object as a raw pointer; it is up to the caller to * ensure its lifetime is tied to that of the context.
*/ void addOnFlushCallbackObject(GrOnFlushCallbackObject*);
#ifdefined(GPU_TEST_UTILS) int fSuppressWarningMessages = 0; #endif
};
/** * Safely cast a possibly-null base context to direct context.
*/ staticinline GrDirectContext* GrAsDirectContext(GrContext_Base* base) { return base ? base->asDirectContext() : nullptr;
}
#endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.29 Sekunden
(vorverarbeitet)
¤
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.