class FramebufferAllocator

Defined at line 18 of file ../../src/ui/lib/escher/vk/impl/framebuffer_allocator.h

FramebufferAllocator wraps HashCache to provide a frame-based cache for

Vulkan framebuffers.

Public Methods

void FramebufferAllocator (ResourceRecycler * recycler, impl::RenderPassCache * render_pass_cache)

Defined at line 17 of file ../../src/ui/lib/escher/vk/impl/framebuffer_allocator.cc

const impl::FramebufferPtr & ObtainFramebuffer (const RenderPassInfo & info, bool allow_render_pass_creation)

Obtain a cached Framebuffer, or lazily create a new one if necessary. Creating a VkFramebuffer

requires a VkRenderPass; if necessary the render pass will also be created lazily, but only if

|allow_render_pass_creation| is true (otherwise a CHECK will fail). This allows the

application to require all render passes to be created at specific times (e.g. startup, or

loading a particular game level) to avoid jank due to lazy creation of render passes (and

pipelines).

NOTE: pipelines cannot be created without a render pass, and render passes are useless without

a pipeline. Therefore, we could allow lazy render pass creation and rely on the inevitable

failed CHECK during pipeline creation. However, it is better to also disallow render pass

creation because then the source of the problem is obvious, not lost among the many other

reasons that might trigger lazy pipeline creation.

Defined at line 21 of file ../../src/ui/lib/escher/vk/impl/framebuffer_allocator.cc

void BeginFrame ()

Defined at line 37 of file ../../src/ui/lib/escher/vk/impl/framebuffer_allocator.h

void Clear ()

Defined at line 41 of file ../../src/ui/lib/escher/vk/impl/framebuffer_allocator.h

size_t size ()

Defined at line 43 of file ../../src/ui/lib/escher/vk/impl/framebuffer_allocator.h