Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
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. More...
 
 Screenshot (sk_sp< SkData > p_data, SkISize p_size, const std::string &p_format, ScreenshotFormat p_pixel_format)
 Creates a screenshot with the specified data and size. More...
 
 Screenshot (const Screenshot &other)
 The copy constructor for a screenshot. More...
 
 ~Screenshot ()
 Destroys the screenshot object and releases underlying data. More...
 

Public Attributes

sk_sp< SkDatadata
 
SkISize frame_size = SkISize::MakeEmpty()
 
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 398 of file rasterizer.h.

Constructor & Destructor Documentation

◆ Screenshot() [1/3]

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

Creates an empty screenshot.

Definition at line 1155 of file rasterizer.cc.

1155{}

◆ Screenshot() [2/3]

flutter::Rasterizer::Screenshot::Screenshot ( sk_sp< SkData p_data,
SkISize  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 1157 of file rasterizer.cc.

1161 : data(std::move(p_data)),
1162 frame_size(p_size),
1163 format(p_format),
1164 pixel_format(p_pixel_format) {}
ScreenshotFormat pixel_format
Definition: rasterizer.h:422

◆ 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 405 of file rasterizer.h.

◆ format

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

Characterization of the format of the data in data.

Definition at line 415 of file rasterizer.h.

◆ frame_size

SkISize flutter::Rasterizer::Screenshot::frame_size = SkISize::MakeEmpty()

The size of the screenshot in texels.

Definition at line 410 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 422 of file rasterizer.h.


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