#include "gpu/command_buffer/service/shared_image/shared_image_backing_factory.h"
#include "gpu/command_buffer/common/shared_image_usage.h"
#include "gpu/command_buffer/service/shared_image/shared_image_backing.h"
namespace gpu {
SharedImageBackingFactory::SharedImageBackingFactory(
SharedImageUsageSet valid_usages)
: … { … }
SharedImageBackingFactory::~SharedImageBackingFactory() = default;
base::WeakPtr<SharedImageBackingFactory>
SharedImageBackingFactory::GetWeakPtr() { … }
std::unique_ptr<SharedImageBacking>
SharedImageBackingFactory::CreateSharedImage(const Mailbox& mailbox,
viz::SharedImageFormat format,
SurfaceHandle surface_handle,
const gfx::Size& size,
const gfx::ColorSpace& color_space,
GrSurfaceOrigin surface_origin,
SkAlphaType alpha_type,
SharedImageUsageSet usage,
std::string debug_label,
bool is_thread_safe,
gfx::BufferUsage buffer_usage) { … }
bool SharedImageBackingFactory::CanCreateSharedImage(
SharedImageUsageSet usage,
viz::SharedImageFormat format,
const gfx::Size& size,
bool thread_safe,
gfx::GpuMemoryBufferType gmb_type,
GrContextType gr_context_type,
base::span<const uint8_t> pixel_data) { … }
void SharedImageBackingFactory::InvalidateWeakPtrsForTesting() { … }
}