Name Description Size
BackendSemaphore.h 1601
BackendTexture.h 1914
Context.h Creates a helper object that can be moved to a different thread and used for precompilation. 17441
ContextOptions.h Disables correctness workarounds that are enabled for particular GPUs, OSes, or drivers. This does not affect code path choices that are made for perfomance reasons nor does it override other ContextOption settings. 6323
dawn
GraphiteTypes.h The fFinishedProc is called when the Recording has been submitted and finished on the GPU, or when there is a failure that caused it not to be submitted. The callback will always be called and the caller can use the callback to know it is safe to free any resources associated with the Recording that they may be holding onto. If the Recording is successfully submitted to the GPU the callback will be called with CallbackResult::kSuccess once the GPU has finished. All other cases where some failure occurred it will be called with CallbackResult::kFailed. Alternatively, the client can provide fFinishedProcWithStats. This provides additional information about execution of the recording on the GPU. Only the stats requested using fStatsFlags will be valid and only if CallbackResult is kSuccess. If both fFinishedProc and fFinishedProcWithStats are provided the latter is preferred and the former won't be called. The fTargetSurface, if provided, is used as a target for any draws recorded onto a deferred canvas returned from Recorder::makeDeferredCanvas. This target surface must be provided iff the Recording contains any such draws. It must be Graphite-backed and its backing texture's TextureInfo must match the info provided to the Recorder when making the deferred canvas. fTargetTranslation is an additional translation applied to draws targeting fTargetSurface. fTargetClip is an additional clip applied to draws targeting fTargetSurface. It is defined in the local replay space, that is, with fTargetTranslation applied. An empty clip will not be applied. The client may pass in two arrays of initialized BackendSemaphores to be included in the command stream. At some time before issuing commands in the Recording, the fWaitSemaphores will be waited on by the gpu. We only guarantee these wait semaphores block transfer and fragment shader work. Similarly, at some time after issuing the Recording's commands, the fSignalSemaphores will be signaled by the gpu. Depending on the platform, the timing of the wait and signal operations will either be immediately before or after the given Recording's command stream, respectively, or before and after the entire CommandBuffer's command stream. The semaphores are not sent to the GPU until the next Context::submit call is made. The client will own and be responsible for deleting the underlying semaphore objects after the submission completes, however the BackendSemaphore objects themselves can be deleted as soon as this function returns. 8079
Image.h Creates an SkImage from a GPU texture associated with the recorder. The client is still responsible for managing the backend texture's lifetime. SkImage is returned if the format of backendTexture is recognized and supported. Recognized formats vary by GPU back-end. @param recorder The recorder @param backendTexture texture residing on GPU @param colorSpace This describes the color space of this image's contents, as seen after sampling. In general, if the format of the backend texture is SRGB, some linear colorSpace should be supplied (e.g., SkColorSpace::MakeSRGBLinear()). If the format of the backend texture is linear, then the colorSpace should include a description of the transfer function as well (e.g., SkColorSpace::MakeSRGB()). @param origin Whether the Texture logically treats the origin as TopLeft or BottomLeft @param generateMipmapsFromBase If kYes then the pixel contents of the textures upper mipmap levels are generated by successive downsampling of the base level. If the texture is not mipmapped or isn't renderable then image creation will fail. If kNo and the texture is mipmapped then the contents of upper levels are assumed to already be valid. @return created SkImage, or nullptr 20476
ImageProvider.h This class provides a centralized location for clients to perform any caching of images they desire. Whenever Graphite encounters an SkImage which is not Graphite-backed it will call ImageProvider::findOrCreate. The client's derived version of this class should return a Graphite-backed version of the provided SkImage that meets the specified requirements. Skia requires that 'findOrCreate' return a Graphite-backed image that preserves the dimensions and alpha type of the original image. The bit depth of the individual channels can change (e.g., 4444 -> 8888 is allowed) as well as the channels - as long as the returned image has a superset of the original image's channels (e.g., 565 -> 8888 opaque is allowed). Wrt mipmapping, the returned image can have different mipmap settings than requested. If mipmapping was requested but not returned, the sampling level will be reduced to linear. If the requirements are not met by the returned image (modulo the flexibility wrt mipmapping) Graphite will drop the draw. All returned images must be backed by textures that have a TopLeft origin. If Skia is used to create the texture (e.g. using makeTextureImage) then this is always guaranteed. If the client returns a texture they created themselves and wrapped in Skia, they must ensure that texture has a TopLeft origin. Note: by default, Graphite will not perform any caching of images Threading concerns: If the same ImageProvider is given to multiple Recorders it is up to the client to handle any required thread synchronization. This is not limited to just restricting access to whatever map a derived class may have but extends to ensuring that an image created on one Recorder has had its creation work submitted before it is used by any work submitted by another Recording. Please note, this requirement (re the submission of creation work and image usage on different threads) is common to all graphite SkImages and isn't unique to SkImages returned by the ImageProvider. TODO(b/240996632): add documentation re shutdown order. TODO(b/240997067): add unit tests 3181
LogPriority.h Note: this file may be included in clients' SkUserConfig.h files, so including any other headers in this file should be avoided. 979
mtl
precompile
PrecompileContext.h Purge Pipelines that haven't been used in the past 'msNotUsed' milliseconds regardless of whether the pipeline cache is under budget. @param msNotUsed Pipelines not used in these last milliseconds will be cleaned up. 2305
Recorder.h Gets the maximum supported texture size. 13575
Recording.h 2936
Surface.h The 'AsImage' and 'AsImageCopy' API/entry points are currently only available for Graphite. In this API, SkSurface no longer supports copy-on-write behavior. Instead, when creating an image for a surface, the client must explicitly indicate if a copy should be made. In both of the below calls the resource backing the surface will never change. The 'AsImage' entry point has some major ramifications for the mutability of the returned SkImage. Since the originating surface and the returned image share the same backing, care must be taken by the client to ensure that the contents of the image reflect the desired contents when it is consumed by the gpu. Note: if the backing GPU buffer isn't textureable this method will return null. Graphite will not attempt to make a copy. Note: For 'AsImage', the mipmapping of the image will match that of the source surface. The 'AsImageCopy' entry point allows subsetting and the addition of mipmaps (since a copy is already being made). In Graphite, the legacy API call (i.e., makeImageSnapshot) will just always make a copy. 4109
TextureInfo.h TextureInfo is a backend-agnostic wrapper around the properties of a texture, sans dimensions. It is designed this way to be compilable w/o bringing in a specific backend's build files, and without requiring heap allocations of virtual types. 4670
vk
YUVABackendTextures.h A description of a set of BackendTextures that hold the planar data described by a SkYUVAInfo. 5555