chromium/third_party/blink/renderer/modules/csspaint/paint_rendering_context_2d.cc

// Copyright 2016 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/modules/csspaint/paint_rendering_context_2d.h"

#include <memory>

#include "base/task/single_thread_task_runner.h"
#include "third_party/blink/renderer/core/geometry/dom_matrix.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_canvas.h"

namespace blink {

PaintRenderingContext2D::PaintRenderingContext2D(
    const gfx::Size& container_size,
    const PaintRenderingContext2DSettings* context_settings,
    float zoom,
    scoped_refptr<base::SingleThreadTaskRunner> task_runner,
    PaintWorkletGlobalScope* global_scope)
    :{}

void PaintRenderingContext2D::InitializeForRecording(
    cc::PaintCanvas* canvas) const {}

void PaintRenderingContext2D::RecordingCleared() {}

int PaintRenderingContext2D::Width() const {}

int PaintRenderingContext2D::Height() const {}

Color PaintRenderingContext2D::GetCurrentColor() const {}

// We need to account for the |effective_zoom_| for shadow effects only, and not
// for line width. This is because the line width is affected by skia's current
// transform matrix (CTM) while shadows are not. The skia's CTM combines both
// the canvas context transform and the CSS layout transform. That means, the
// |effective_zoom_| is implictly applied to line width through CTM.
double PaintRenderingContext2D::shadowBlur() const {}

void PaintRenderingContext2D::setShadowBlur(double blur) {}

double PaintRenderingContext2D::shadowOffsetX() const {}

void PaintRenderingContext2D::setShadowOffsetX(double x) {}

double PaintRenderingContext2D::shadowOffsetY() const {}

void PaintRenderingContext2D::setShadowOffsetY(double y) {}

const cc::PaintCanvas* PaintRenderingContext2D::GetPaintCanvas() const {}

void PaintRenderingContext2D::WillDraw(const SkIRect&,
                                       CanvasPerformanceMonitor::DrawType) {}

sk_sp<PaintFilter> PaintRenderingContext2D::StateGetFilter() {}

PredefinedColorSpace PaintRenderingContext2D::GetDefaultImageDataColorSpace()
    const {}


DOMMatrix* PaintRenderingContext2D::getTransform() {}

// On a platform where zoom_for_dsf is not enabled, the recording canvas has its
// logic to account for the device scale factor. Therefore, when the transform
// of the canvas happen, we must account for the effective_zoom_ such that the
// recording canvas would have the correct behavior.
//
// The BaseRenderingContext2D::setTransform calls resetTransform, so integrating
// the effective_zoom_ in here instead of setTransform, to avoid integrating it
// twice if we have resetTransform and setTransform API calls.
void PaintRenderingContext2D::resetTransform() {}

void PaintRenderingContext2D::reset() {}

PaintRecord PaintRenderingContext2D::GetRecord() {}

}  // namespace blink