Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 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.

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 }
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 48 of file skparagraph_benchmarks.cc.

◆ canvas_

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

Definition at line 47 of file skparagraph_benchmarks.cc.

◆ font_collection_

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

Definition at line 46 of file skparagraph_benchmarks.cc.


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