Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::testing::DlMetalPixelData Class Reference
Inheritance diagram for flutter::testing::DlMetalPixelData:
flutter::testing::DlPixelData SkRefCnt SkRefCntBase

Public Member Functions

 DlMetalPixelData (std::unique_ptr< impeller::testing::Screenshot > screenshot)
 
 ~DlMetalPixelData () override=default
 
const uint32_t * addr32 (int x, int y) const override
 
size_t width () const override
 
size_t height () const override
 
void write (const std::string &path) const override
 
- Public Member Functions inherited from flutter::testing::DlPixelData
virtual ~DlPixelData ()=default
 
virtual const uint32_t * addr32 (int x, int y) const =0
 
virtual size_t width () const =0
 
virtual size_t height () const =0
 
virtual void write (const std::string &path) const =0
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Detailed Description

Definition at line 60 of file dl_test_surface_metal.cc.

Constructor & Destructor Documentation

◆ DlMetalPixelData()

flutter::testing::DlMetalPixelData::DlMetalPixelData ( std::unique_ptr< impeller::testing::Screenshot screenshot)
inlineexplicit

Definition at line 62 of file dl_test_surface_metal.cc.

64 : screenshot_(std::move(screenshot)),
65 addr_(reinterpret_cast<const uint32_t*>(screenshot_->GetBytes())),
66 ints_per_row_(screenshot_->GetBytesPerRow() / 4) {
67 FML_DCHECK(screenshot_->GetBytesPerRow() == ints_per_row_ * 4);
68 }
#define FML_DCHECK(condition)
Definition: logging.h:103

◆ ~DlMetalPixelData()

flutter::testing::DlMetalPixelData::~DlMetalPixelData ( )
overridedefault

Member Function Documentation

◆ addr32()

const uint32_t * flutter::testing::DlMetalPixelData::addr32 ( int  x,
int  y 
) const
inlineoverridevirtual

Implements flutter::testing::DlPixelData.

Definition at line 71 of file dl_test_surface_metal.cc.

71 {
72 return addr_ + (y * ints_per_row_) + x;
73 }
double y
double x

◆ height()

size_t flutter::testing::DlMetalPixelData::height ( ) const
inlineoverridevirtual

Implements flutter::testing::DlPixelData.

Definition at line 75 of file dl_test_surface_metal.cc.

75{ return screenshot_->GetHeight(); }

◆ width()

size_t flutter::testing::DlMetalPixelData::width ( ) const
inlineoverridevirtual

Implements flutter::testing::DlPixelData.

Definition at line 74 of file dl_test_surface_metal.cc.

74{ return screenshot_->GetWidth(); }

◆ write()

void flutter::testing::DlMetalPixelData::write ( const std::string &  path) const
inlineoverridevirtual

Implements flutter::testing::DlPixelData.

Definition at line 76 of file dl_test_surface_metal.cc.

76 {
77 screenshot_->WriteToPNG(path);
78 }
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57

The documentation for this class was generated from the following file: