Flutter Engine
SkParagraphFixture Class Reference
Inheritance diagram for SkParagraphFixture:

Public Member Functions

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

Protected Attributes

sk_sp< sktxt::TestFontCollection > font_collection_
 
std::unique_ptr< SkCanvas > canvas_
 
std::unique_ptr< SkBitmap > bitmap_
 

Detailed Description

Definition at line 34 of file skparagraph_benchmarks.cc.

Member Function Documentation

◆ SetUp()

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

Definition at line 36 of file skparagraph_benchmarks.cc.

References bitmap_, canvas_, font_collection_, and txt::GetFontDir().

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

Member Data Documentation

◆ bitmap_

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

Definition at line 48 of file skparagraph_benchmarks.cc.

Referenced by SetUp().

◆ canvas_

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

Definition at line 47 of file skparagraph_benchmarks.cc.

Referenced by BENCHMARK_F(), and SetUp().

◆ font_collection_

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

Definition at line 46 of file skparagraph_benchmarks.cc.

Referenced by BENCHMARK_DEFINE_F(), BENCHMARK_F(), and SetUp().


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