Flutter Engine
 
Loading...
Searching...
No Matches
flutter::Rasterizer::Screenshot Struct Reference

A POD type used to return the screenshot data along with the size of the frame. More...

#include <rasterizer.h>

Public Member Functions

 Screenshot ()
 Creates an empty screenshot.
 
 Screenshot (sk_sp< SkData > p_data, DlISize p_size, const std::string &p_format, ScreenshotFormat p_pixel_format)
 Creates a screenshot with the specified data and size.
 
 Screenshot (const Screenshot &other)
 The copy constructor for a screenshot.
 
 ~Screenshot ()
 Destroys the screenshot object and releases underlying data.
 

Public Attributes

sk_sp< SkData > data
 
DlISize frame_size
 
std::string format
 
ScreenshotFormat pixel_format = ScreenshotFormat::kUnknown
 

Detailed Description

A POD type used to return the screenshot data along with the size of the frame.

Definition at line 399 of file rasterizer.h.

Constructor & Destructor Documentation

◆ Screenshot() [1/3]

flutter::Rasterizer::Screenshot::Screenshot ( )

Creates an empty screenshot.

Definition at line 1158 of file rasterizer.cc.

1158{}

◆ Screenshot() [2/3]

flutter::Rasterizer::Screenshot::Screenshot ( sk_sp< SkData >  p_data,
DlISize  p_size,
const std::string &  p_format,
ScreenshotFormat  p_pixel_format 
)

Creates a screenshot with the specified data and size.

Parameters
[in]p_dataThe screenshot data
[in]p_sizeThe screenshot size.
[in]p_formatThe screenshot format.
[in]p_pixel_formatThe screenshot format.

Definition at line 1160 of file rasterizer.cc.

1164 : data(std::move(p_data)),
1165 frame_size(p_size),
1166 format(p_format),
1167 pixel_format(p_pixel_format) {}

References format.

◆ Screenshot() [3/3]

flutter::Rasterizer::Screenshot::Screenshot ( const Screenshot other)
default

The copy constructor for a screenshot.

Parameters
[in]otherThe screenshot to copy from.

◆ ~Screenshot()

flutter::Rasterizer::Screenshot::~Screenshot ( )
default

Destroys the screenshot object and releases underlying data.

Member Data Documentation

◆ data

sk_sp<SkData> flutter::Rasterizer::Screenshot::data

The data used to describe the screenshot. The data format depends on the type of screenshot taken and any further encoding done to the same.

See also
ScreenshotType

Definition at line 406 of file rasterizer.h.

◆ format

std::string flutter::Rasterizer::Screenshot::format

Characterization of the format of the data in data.

Definition at line 416 of file rasterizer.h.

◆ frame_size

DlISize flutter::Rasterizer::Screenshot::frame_size

The size of the screenshot in texels.

Definition at line 411 of file rasterizer.h.

◆ pixel_format

ScreenshotFormat flutter::Rasterizer::Screenshot::pixel_format = ScreenshotFormat::kUnknown

The pixel format of the data in data.

If the impeller backend is not used, this value is always kUnknown and the data is in RGBA8888 format.

Definition at line 423 of file rasterizer.h.


The documentation for this struct was generated from the following files: