class Image
Defined at line 50 of file ../../src/ui/lib/escher/vk/image.h
An Image is a Resource that encapsulates a vk::Image.
Public Members
static const ResourceTypeInfo kTypeInfo
Public Methods
ImagePtr WrapVkImage (ResourceManager * image_owner, ImageInfo info, vk::Image image, vk::ImageLayout initial_layout)
Constructor. Wraps an existing image without claiming ownership. Useful
when the image is owned/maintained by another system (e.g.,
vk::SwapchainKHR).
Defined at line 13 of file ../../src/ui/lib/escher/vk/image.cc
vk::DeviceSize GetDeviceMemoryCommitment ()
Return the number of bytes of committed memory. Unlike the similarly-named Vulkan function,
the image's memory need not be created as lazily-allocated; if not, this will simply return
size(). If the memory is lazily-allocated, this will return the result of
vkGetDeviceMemoryCommitment().
This method is virtual because this class doesn't have direct access to the VkDeviceMemory that
is required to call vkGetDeviceMemoryCommitment(); each subclass implements this slightly
differently.
Defined at line 32 of file ../../src/ui/lib/escher/vk/image.cc
const ResourceTypeInfo & type_info ()
Defined at line 53 of file ../../src/ui/lib/escher/vk/image.h
const ImageInfo & info ()
Defined at line 61 of file ../../src/ui/lib/escher/vk/image.h
vk::Image vk ()
Defined at line 62 of file ../../src/ui/lib/escher/vk/image.h
vk::Format format ()
Defined at line 63 of file ../../src/ui/lib/escher/vk/image.h
vk::Format vk_format ()
TODO(https://fxbug.dev/42151114): decide whether to deprecate format().
Defined at line 65 of file ../../src/ui/lib/escher/vk/image.h
uint32_t width ()
Defined at line 66 of file ../../src/ui/lib/escher/vk/image.h
uint32_t height ()
Defined at line 67 of file ../../src/ui/lib/escher/vk/image.h
ColorSpace color_space ()
Defined at line 68 of file ../../src/ui/lib/escher/vk/image.h
bool has_depth ()
Defined at line 69 of file ../../src/ui/lib/escher/vk/image.h
bool has_stencil ()
Defined at line 70 of file ../../src/ui/lib/escher/vk/image.h
bool is_transient ()
Defined at line 71 of file ../../src/ui/lib/escher/vk/image.h
vk::DeviceSize size ()
Defined at line 72 of file ../../src/ui/lib/escher/vk/image.h
uint8_t * host_ptr ()
Defined at line 73 of file ../../src/ui/lib/escher/vk/image.h
vk::ImageLayout layout ()
TODO(https://fxbug.dev/42151125): how does this interact with swapchain_layout_?
Should it be locked so that the layout can't be changed during a render-pass
where it is used as an attachment?
Defined at line 79 of file ../../src/ui/lib/escher/vk/image.h
bool is_layout_initialized ()
Defined at line 81 of file ../../src/ui/lib/escher/vk/image.h
void set_swapchain_layout (vk::ImageLayout layout)
Specify the layout that should be transitioned to when this image is used
as a framebuffer attachment.
Defined at line 87 of file ../../src/ui/lib/escher/vk/image.h
vk::ImageLayout swapchain_layout ()
Defined at line 88 of file ../../src/ui/lib/escher/vk/image.h
bool is_swapchain_image ()
Defined at line 89 of file ../../src/ui/lib/escher/vk/image.h
bool use_protected_memory ()
Defined at line 90 of file ../../src/ui/lib/escher/vk/image.h
Protected Methods
void Image (ResourceManager * image_owner, ImageInfo info, vk::Image image, vk::DeviceSize size_, uint8_t * host_ptr_, vk::ImageLayout initial_layout)
Constructor. In some cases it is necessary to wrap an un-owned vk::Image,
which should not be destroyed when this Image is destroyed (e.g. when
working with images associated with a vk::SwapchainKHR); this is done by
passing nullptr as the |mem| argument.
Defined at line 21 of file ../../src/ui/lib/escher/vk/image.cc
Friends
class CommandBuffer
class CommandBuffer