Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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.
 
 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.
 
 Screenshot (const Screenshot &other)
 The copy constructor for a screenshot.
 
 ~Screenshot ()
 Destroys the screenshot object and releases underlying data.
 

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 1108 of file rasterizer.cc.

1108{}

◆ 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 1110 of file rasterizer.cc.

1114 : data(std::move(p_data)),
1115 frame_size(p_size),
1116 format(p_format),
1117 pixel_format(p_pixel_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 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: