#include "gpu/command_buffer/service/shared_image/raw_draw_image_backing_factory.h"
#include "base/logging.h"
#include "gpu/command_buffer/common/shared_image_usage.h"
#include "gpu/command_buffer/service/shared_image/raw_draw_image_backing.h"
namespace gpu {
constexpr SharedImageUsageSet kRequiredUsage = …;
RawDrawImageBackingFactory::RawDrawImageBackingFactory()
: … { … }
RawDrawImageBackingFactory::~RawDrawImageBackingFactory() = default;
std::unique_ptr<SharedImageBacking>
RawDrawImageBackingFactory::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) { … }
std::unique_ptr<SharedImageBacking>
RawDrawImageBackingFactory::CreateSharedImage(
const Mailbox& mailbox,
viz::SharedImageFormat format,
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,
base::span<const uint8_t> data) { … }
std::unique_ptr<SharedImageBacking>
RawDrawImageBackingFactory::CreateSharedImage(
const Mailbox& mailbox,
viz::SharedImageFormat format,
const gfx::Size& size,
const gfx::ColorSpace& color_space,
GrSurfaceOrigin surface_origin,
SkAlphaType alpha_type,
SharedImageUsageSet usage,
std::string debug_label,
gfx::GpuMemoryBufferHandle handle) { … }
bool RawDrawImageBackingFactory::CanUseRawDrawImageBacking(
SharedImageUsageSet usage,
GrContextType gr_context_type) const { … }
bool RawDrawImageBackingFactory::IsSupported(
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) { … }
SharedImageBackingType RawDrawImageBackingFactory::GetBackingType() { … }
}