chromium/third_party/blink/renderer/platform/graphics/canvas_resource_host.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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() {}

}  // namespace

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 {

// Adapter for wrapping a CanvasResourceReleaseCallback into a
// viz::ReleaseCallback
void ReleaseCanvasResource(CanvasResource::ReleaseCallback callback,
                           scoped_refptr<CanvasResource> canvas_resource,
                           const gpu::SyncToken& sync_token,
                           bool is_lost) {}

}  // unnamed namespace

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() {}

}  // namespace blink