#include "third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge.h"
#include <utility>
#include "base/feature_list.h"
#include "cc/base/features.h"
#include "cc/layers/texture_layer.h"
#include "cc/layers/texture_layer_impl.h"
#include "components/viz/common/features.h"
#include "components/viz/common/resources/transferable_resource.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/command_buffer/client/context_support.h"
#include "gpu/command_buffer/client/raster_interface.h"
#include "gpu/config/gpu_finch_features.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/platform/platform.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"
#include "third_party/blink/renderer/platform/graphics/memory_managed_paint_recorder.h"
#include "third_party/blink/renderer/platform/graphics/unaccelerated_static_bitmap_image.h"
#include "third_party/blink/renderer/platform/instrumentation/histogram.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
namespace blink {
namespace {
gpu::ContextSupport* GetContextSupport() { … }
}
Canvas2DLayerBridge::Canvas2DLayerBridge()
: … { … }
Canvas2DLayerBridge::~Canvas2DLayerBridge() { … }
void Canvas2DLayerBridge::SetCanvasResourceHost(CanvasResourceHost* host) { … }
void Canvas2DLayerBridge::ResetResourceProvider() { … }
void Canvas2DLayerBridge::HibernateOrLogFailure(
base::WeakPtr<Canvas2DLayerBridge> bridge,
base::TimeTicks ) { … }
void Canvas2DLayerBridge::Hibernate() { … }
CanvasResourceProvider* Canvas2DLayerBridge::ResourceProvider() const { … }
CanvasResourceProvider* Canvas2DLayerBridge::GetOrCreateResourceProvider() { … }
void Canvas2DLayerBridge::PageVisibilityChanged() { … }
bool Canvas2DLayerBridge::WritePixels(const SkImageInfo& orig_info,
const void* pixels,
size_t row_bytes,
int x,
int y) { … }
bool Canvas2DLayerBridge::Restore() { … }
void Canvas2DLayerBridge::FinalizeFrame(FlushReason reason) { … }
scoped_refptr<StaticBitmapImage> Canvas2DLayerBridge::NewImageSnapshot(
FlushReason reason) { … }
void Canvas2DLayerBridge::Logger::ReportHibernationEvent(
HibernationEvent event) { … }
}