6#include "flutter/display_list/skia/dl_sk_canvas.h"
7#include "flutter/fml/macros.h"
13#ifndef FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_CANVAS_SPY_H_
14#define FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_CANVAS_SPY_H_
51 std::unique_ptr<SkNWayCanvas> n_way_canvas_;
52 std::unique_ptr<DidDrawCanvas> did_draw_canvas_;
65 bool did_draw_ =
false;
68 void willSave()
override;
74 bool onDoSaveBehind(
const SkRect*)
override;
77 void willRestore()
override;
80 void didConcat44(
const SkM44&)
override;
100 void onDrawPaint(
const SkPaint&)
override;
103 void onDrawBehind(
const SkPaint&)
override;
121 void onDrawArc(
const SkRect&,
133#ifdef SK_SUPPORT_LEGACY_ONDRAWIMAGERECT
135 void onDrawImage(
const SkImage*,
141 void onDrawImageRect(
const SkImage*,
148 void onDrawImageLattice(
const SkImage*,
154 void onDrawAtlas(
const SkImage*,
172 void onDrawImage2(
const SkImage*,
179 void onDrawImageRect2(
const SkImage*,
187 void onDrawImageLattice2(
const SkImage*,
199 void onDrawAtlas2(
const SkImage*,
233 void onDrawAnnotation(
const SkRect&,
const char[],
SkData*)
override;
236 void onDrawEdgeAAQuad(
const SkRect&,
251 void MarkDrawIfNonTransparentPaint(
const SkPaint&
paint);
SkCanvas * GetRawSpyingCanvas()
The underlying Skia canvas that implements the spying (mainly for testing)
CanvasSpy(SkCanvas *target_canvas)
bool DidDrawIntoCanvas()
Returns true if any non transparent content has been drawn into the spying canvas....
DlCanvas * GetSpyingCanvas()
The returned canvas delegate all operations to the target canvas while spying on them.
virtual void onDrawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint) override
DidDrawCanvas(int width, int height)
~DidDrawCanvas() override
virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode, const SkPaint &paint) override
Developer-facing API for rendering anything within the engine.
Backend implementation of |DlCanvas| for |SkCanvas|.
PODArray< SkColor > colors