Flutter Engine
The Flutter Engine
|
#include <canvas_spy.h>
Public Member Functions | |
CanvasSpy (SkCanvas *target_canvas) | |
bool | DidDrawIntoCanvas () |
Returns true if any non transparent content has been drawn into the spying canvas. Note that this class does tries to detect empty canvases but in some cases may return true even for empty canvases (e.g when a transparent image is drawn into the canvas). More... | |
DlCanvas * | GetSpyingCanvas () |
The returned canvas delegate all operations to the target canvas while spying on them. More... | |
SkCanvas * | GetRawSpyingCanvas () |
The underlying Skia canvas that implements the spying (mainly for testing) More... | |
Facilitates spying on drawing commands to an SkCanvas.
This is used to determine whether anything was drawn into a canvas so it is possible to implement optimizations that are specific to empty canvases.
Definition at line 26 of file canvas_spy.h.
|
explicit |
Definition at line 9 of file canvas_spy.cc.
bool flutter::CanvasSpy::DidDrawIntoCanvas | ( | ) |
Returns true if any non transparent content has been drawn into the spying canvas. Note that this class does tries to detect empty canvases but in some cases may return true even for empty canvases (e.g when a transparent image is drawn into the canvas).
Definition at line 38 of file canvas_spy.cc.
SkCanvas * flutter::CanvasSpy::GetRawSpyingCanvas | ( | ) |
The underlying Skia canvas that implements the spying (mainly for testing)
Definition at line 24 of file canvas_spy.cc.
DlCanvas * flutter::CanvasSpy::GetSpyingCanvas | ( | ) |
The returned canvas delegate all operations to the target canvas while spying on them.
Definition at line 20 of file canvas_spy.cc.