Flutter Engine
The Flutter Engine
Public Member Functions | Protected Attributes | List of all members
SkParagraphFixture Class Reference
Inheritance diagram for SkParagraphFixture:

Public Member Functions

void SetUp (const ::benchmark::State &state)
 

Protected Attributes

sk_sp< sktxt::TestFontCollectionfont_collection_
 
std::unique_ptr< SkCanvascanvas_
 
std::unique_ptr< SkBitmapbitmap_
 

Detailed Description

Definition at line 35 of file skparagraph_benchmarks.cc.

Member Function Documentation

◆ SetUp()

void SkParagraphFixture::SetUp ( const ::benchmark::State &  state)
inline

Definition at line 37 of file skparagraph_benchmarks.cc.

37 {
38 font_collection_ = sk_make_sp<sktxt::TestFontCollection>(txt::GetFontDir());
39
40 bitmap_ = std::make_unique<SkBitmap>();
41 bitmap_->allocN32Pixels(1000, 1000);
42 canvas_ = std::make_unique<SkCanvas>(*bitmap_);
43 canvas_->clear(SK_ColorWHITE);
44 }
constexpr SkColor SK_ColorWHITE
Definition: SkColor.h:122
std::unique_ptr< SkCanvas > canvas_
sk_sp< sktxt::TestFontCollection > font_collection_
std::unique_ptr< SkBitmap > bitmap_
const std::string & GetFontDir()

Member Data Documentation

◆ bitmap_

std::unique_ptr<SkBitmap> SkParagraphFixture::bitmap_
protected

Definition at line 49 of file skparagraph_benchmarks.cc.

◆ canvas_

std::unique_ptr<SkCanvas> SkParagraphFixture::canvas_
protected

Definition at line 48 of file skparagraph_benchmarks.cc.

◆ font_collection_

sk_sp<sktxt::TestFontCollection> SkParagraphFixture::font_collection_
protected

Definition at line 47 of file skparagraph_benchmarks.cc.


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