Flutter Engine
The Flutter Engine
|
Functions | |
SK_API sk_sp< GrDirectContext > | MakeGL (sk_sp< const GrGLInterface >, const GrContextOptions &) |
SK_API sk_sp< GrDirectContext > | MakeGL (sk_sp< const GrGLInterface >) |
SK_API sk_sp< GrDirectContext > | MakeGL (const GrContextOptions &) |
SK_API sk_sp< GrDirectContext > | MakeGL () |
SK_API sk_sp< GrDirectContext > | MakeMetal (const GrMtlBackendContext &, const GrContextOptions &) |
SK_API sk_sp< GrDirectContext > | MakeMetal (const GrMtlBackendContext &) |
SK_API sk_sp< GrDirectContext > | MakeVulkan (const skgpu::VulkanBackendContext &, const GrContextOptions &) |
SK_API sk_sp< GrDirectContext > | MakeVulkan (const skgpu::VulkanBackendContext &) |
sk_sp< GrDirectContext > GrDirectContexts::MakeGL | ( | ) |
Definition at line 48 of file GrGLDirectContext.cpp.
sk_sp< GrDirectContext > GrDirectContexts::MakeGL | ( | const GrContextOptions & | options | ) |
Definition at line 44 of file GrGLDirectContext.cpp.
sk_sp< GrDirectContext > GrDirectContexts::MakeGL | ( | sk_sp< const GrGLInterface > | glInterface | ) |
Definition at line 38 of file GrGLDirectContext.cpp.
sk_sp< GrDirectContext > GrDirectContexts::MakeGL | ( | sk_sp< const GrGLInterface > | glInterface, |
const GrContextOptions & | options | ||
) |
Creates a GrDirectContext for a backend context. GrGLInterface must be non-null.
Definition at line 83 of file GrGLDirectContext.cpp.
sk_sp< GrDirectContext > GrDirectContexts::MakeMetal | ( | const GrMtlBackendContext & | backendContext | ) |
Definition at line 16 of file GrMtlDirectContext.mm.
sk_sp< GrDirectContext > GrDirectContexts::MakeMetal | ( | const GrMtlBackendContext & | backendContext, |
const GrContextOptions & | options | ||
) |
Makes a GrDirectContext which uses Metal as the backend. The GrMtlBackendContext contains a MTLDevice and MTLCommandQueue which should be used by the backend. These objects must have their own ref which will be released when the GrMtlBackendContext is destroyed. Ganesh will take its own ref on the objects which will be released when the GrDirectContext is destroyed.
Definition at line 21 of file GrMtlDirectContext.mm.
sk_sp< GrDirectContext > GrDirectContexts::MakeVulkan | ( | const skgpu::VulkanBackendContext & | backendContext | ) |
Definition at line 19 of file GrVkDirectContext.cpp.
sk_sp< GrDirectContext > GrDirectContexts::MakeVulkan | ( | const skgpu::VulkanBackendContext & | backendContext, |
const GrContextOptions & | options | ||
) |
The Vulkan context (VkQueue, VkDevice, VkInstance) must be kept alive until the returned GrDirectContext is destroyed. This also means that any objects created with this GrDirectContext (e.g. SkSurfaces, SkImages, etc.) must also be released as they may hold refs on the GrDirectContext. Once all these objects and the GrDirectContext are released, then it is safe to delete the vulkan objects.
Definition at line 24 of file GrVkDirectContext.cpp.