#include "third_party/blink/renderer/platform/graphics/canvas_resource_host.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/platform/graphics/canvas_resource_provider.h"
#include "third_party/blink/renderer/platform/graphics/gpu/shared_context_rate_limiter.h"
#include "third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.h"
namespace blink {
namespace {
constexpr unsigned kMaxCanvasAnimationBacklog = …;
bool CanUseGPU() { … }
}
CanvasResourceHost::CanvasResourceHost(gfx::Size size) : … { … }
CanvasResourceHost::~CanvasResourceHost() { … }
std::unique_ptr<CanvasResourceProvider>
CanvasResourceHost::ReplaceResourceProvider(
std::unique_ptr<CanvasResourceProvider> new_resource_provider) { … }
void CanvasResourceHost::DiscardResourceProvider() { … }
void CanvasResourceHost::SetFilterQuality(
cc::PaintFlags::FilterQuality filter_quality) { … }
void CanvasResourceHost::SetPreferred2DRasterMode(RasterModeHint hint) { … }
bool CanvasResourceHost::ShouldTryToUseGpuRaster() const { … }
bool CanvasResourceHost::IsComposited() const { … }
void CanvasResourceHost::SetIsDisplayed(bool displayed) { … }
SharedContextRateLimiter* CanvasResourceHost::RateLimiter() const { … }
void CanvasResourceHost::CreateRateLimiter() { … }
RasterMode CanvasResourceHost::GetRasterMode() const { … }
void CanvasResourceHost::ResetLayer() { … }
void CanvasResourceHost::ClearLayerTexture() { … }
void CanvasResourceHost::SetNeedsPushProperties() { … }
void CanvasResourceHost::SetHdrMetadata(const gfx::HDRMetadata& hdr_metadata) { … }
cc::TextureLayer* CanvasResourceHost::GetOrCreateCcLayerIfNeeded() { … }
namespace {
void ReleaseCanvasResource(CanvasResource::ReleaseCallback callback,
scoped_refptr<CanvasResource> canvas_resource,
const gpu::SyncToken& sync_token,
bool is_lost) { … }
}
bool CanvasResourceHost::PrepareTransferableResource(
cc::SharedBitmapIdRegistrar* bitmap_registrar,
viz::TransferableResource* out_resource,
viz::ReleaseCallback* out_release_callback) { … }
void CanvasResourceHost::DoPaintInvalidation(const gfx::Rect& dirty_rect) { … }
void CanvasResourceHost::SetOpacityMode(OpacityMode opacity_mode) { … }
void CanvasResourceHost::FlushRecording(FlushReason reason) { … }
bool CanvasResourceHost::IsResourceValid() { … }
}