78 std::vector<uint8_t>
png;
139 uint32_t* out_height,
TextRasterPolicy
Glyph preblend a surface is created with.
Definition text_raster_policy.hpp:33
@ legacy
Definition text_raster_policy.hpp:34
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
std::vector< uint8_t > render_to_png_gpu(View &root, uint32_t width, uint32_t height, float scale=2.0f, canvas::TextRasterPolicy text_raster=canvas::TextRasterPolicy::legacy)
std::vector< uint8_t > render_to_png(View &root, uint32_t width, uint32_t height, float scale=2.0f, ScreenshotBackend backend=ScreenshotBackend::default_backend, canvas::TextRasterPolicy text_raster=canvas::TextRasterPolicy::legacy)
bool has_screenshot_backend()
ScreenshotBackend
Definition screenshot.hpp:12
@ gpu
Offscreen GPU (Dawn + Skia via pulp::render::HeadlessSurface).
Definition screenshot.hpp:16
@ skia
CPU Skia raster (SkSurfaces::Raster).
Definition screenshot.hpp:15
@ auto_select
Smart dispatch (see capture_view): native-overlay → refuse; requires_gpu_host → gpu; else → raster.
Definition screenshot.hpp:18
@ coregraphics
Apple CoreGraphics raster.
Definition screenshot.hpp:14
@ default_backend
Platform default raster (CoreGraphics on Apple).
Definition screenshot.hpp:13
bool has_screenshot_provider()
std::vector< uint8_t > render_to_rgba(View &root, uint32_t width, uint32_t height, float scale, uint32_t *out_width, uint32_t *out_height, canvas::TextRasterPolicy text_raster=canvas::TextRasterPolicy::legacy)
bool has_screenshot_decoder()
True when this build can decode PNG pixels for the mandatory capture content floor.
bool raw_rgba_render_available()
void set_screenshot_provider(ScreenshotProvider provider)
CaptureRequirements inspect_capture_requirements(View &root)
Inspect the tree once for requirements shared by capture routing and capability admission.
bool render_to_file(View &root, uint32_t width, uint32_t height, const std::string &output_path, float scale=2.0f, ScreenshotBackend backend=ScreenshotBackend::default_backend, canvas::TextRasterPolicy text_raster=canvas::TextRasterPolicy::legacy)
CaptureResult capture_view(View &root, uint32_t width, uint32_t height, float scale=2.0f, ScreenshotBackend backend=ScreenshotBackend::auto_select)
std::function< std::vector< uint8_t >( View &root, uint32_t width, uint32_t height, float scale, ScreenshotBackend backend)> ScreenshotProvider
Definition screenshot.hpp:164
@ scale
Definition css_animation.hpp:126
@ height
Definition css_animation.hpp:128
@ width
Definition css_animation.hpp:127
void clear_screenshot_provider()
bool passes_capture_content_floor(const std::vector< uint8_t > &png)
Apply the same deliberately lenient "did anything paint?" floor used by capture_view().
Definition screenshot.hpp:67
bool requires_gpu
True when any node needs a GPU host.
Definition screenshot.hpp:69
View * native_overlay
First OS-composited overlay owner, if any.
Definition screenshot.hpp:68
Definition screenshot.hpp:77
ScreenshotBackend used
Definition screenshot.hpp:80
std::vector< uint8_t > png
Definition screenshot.hpp:78
std::string reason
Empty when ok; otherwise why the capture isn't trustworthy.
Definition screenshot.hpp:81
bool ok
Definition screenshot.hpp:79