#include "components/viz/service/display_embedder/buffer_queue.h"
#include <utility>
#include "base/metrics/histogram_macros.h"
#include "components/viz/service/display/skia_output_surface.h"
#include "gpu/command_buffer/common/shared_image_usage.h"
namespace viz {
BufferQueue::BufferQueue(SkiaOutputSurface* skia_output_surface,
gpu::SurfaceHandle surface_handle,
size_t number_of_buffers,
bool is_protected)
: … { … }
BufferQueue::~BufferQueue() { … }
gpu::Mailbox BufferQueue::GetCurrentBuffer() { … }
void BufferQueue::UpdateBufferDamage(const gfx::Rect& damage) { … }
gfx::Rect BufferQueue::CurrentBufferDamage() const { … }
void BufferQueue::SwapBuffers(const gfx::Rect& damage) { … }
void BufferQueue::SwapBuffersComplete() { … }
void BufferQueue::SwapBuffersSkipped(const gfx::Rect& damage) { … }
bool BufferQueue::Reshape(const gfx::Size& size,
const gfx::ColorSpace& color_space,
RenderPassAlphaType alpha_type,
SharedImageFormat format) { … }
void BufferQueue::RecreateBuffers() { … }
void BufferQueue::FreeAllBuffers() { … }
void BufferQueue::FreeBuffer(std::unique_ptr<AllocatedBuffer> buffer) { … }
bool BufferQueue::SetBufferPurgeable(AllocatedBuffer& buffer, bool purgeable) { … }
void BufferQueue::AllocateBuffers(size_t n) { … }
std::unique_ptr<BufferQueue::AllocatedBuffer> BufferQueue::GetNextBuffer() { … }
gpu::Mailbox BufferQueue::GetLastSwappedBuffer() { … }
void BufferQueue::EnsureMinNumberOfBuffers(size_t n) { … }
void BufferQueue::DestroyBuffers() { … }
void BufferQueue::SetBuffersPurgeable() { … }
void BufferQueue::RecreateBuffersIfDestroyed() { … }
BufferQueue::AllocatedBuffer::AllocatedBuffer(const gpu::Mailbox& mailbox,
const gfx::Rect& rect)
: … { … }
BufferQueue::AllocatedBuffer::~AllocatedBuffer() = default;
}