75 explicit operator bool()
const {
return ok; }
104 skgpu::graphite::Context* graphite_context =
nullptr);
131 std::unique_ptr<Impl> impl_;
145 int width,
int height,
const std::string&
path,
147 skgpu::graphite::Context* graphite_context =
nullptr);
165 int width,
int height,
167 skgpu::graphite::Context* graphite_context =
nullptr);
Definition canvas.hpp:240
SkpFrameCapture & operator=(const SkpFrameCapture &)=delete
SkpFrameCapture(int width, int height, skgpu::graphite::Context *graphite_context=nullptr)
Begin a capture sized to width x height logical pixels.
canvas::Canvas * canvas()
The canvas to paint the frame into.
SkpFrameCapture(const SkpFrameCapture &)=delete
SkpCaptureResult finish_to_memory(std::string &out_blob)
Finish recording and serialize the .skp into out_blob (raw .skp bytes).
bool available() const
True when Skia is compiled in and the recording canvas exists.
SkpCaptureResult finish_to_file(const std::string &path)
Finish recording and write the .skp to path.
@ Context
Definition transaction.hpp:35
Definition gpu_fwd.hpp:31
SkpCaptureResult capture_skp_to_file(int width, int height, const std::string &path, const std::function< void(canvas::Canvas &)> &paint, skgpu::graphite::Context *graphite_context=nullptr)
One-shot helper: capture a frame by handing a paint callback the capture canvas, then writing the ....
SkpCaptureResult maybe_capture_skp_from_env(int width, int height, const std::function< void(canvas::Canvas &)> &paint, skgpu::graphite::Context *graphite_context=nullptr)
Env-var-triggered one-shot .skp capture.
@ path
PathAtlas — rasterized vector paths.
Definition atlas_inventory.hpp:43
bool skp_capture_supported()
true when this build can produce .skp captures (Skia compiled in).
Definition skia_surface.hpp:16
Outcome of a .skp capture attempt.
Definition skp_capture.hpp:68
std::string reason
Failure explanation when !ok.
Definition skp_capture.hpp:73
bool ok
True when a .skp artifact was produced.
Definition skp_capture.hpp:69
std::string path
Filesystem path of the written .skp, when ok.
Definition skp_capture.hpp:70
std::size_t op_count
Approximate recorded draw-op count.
Definition skp_capture.hpp:72
std::size_t bytes_written
Size of the serialized .skp blob.
Definition skp_capture.hpp:71