Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::testing::LayerTreeTest Class Reference
Inheritance diagram for flutter::testing::LayerTreeTest:
flutter::testing::CanvasTestBase< BaseT >

Public Member Functions

 LayerTreeTest ()
 
CompositorContext::ScopedFrameframe ()
 
const SkMatrixroot_transform ()
 
std::unique_ptr< LayerTreeBuildLayerTree (const std::shared_ptr< Layer > &root_layer)
 
- Public Member Functions inherited from flutter::testing::CanvasTestBase< BaseT >
 CanvasTestBase ()=default
 
MockCanvasmock_canvas ()
 
sk_sp< SkColorSpacemock_color_space ()
 

Detailed Description

Definition at line 19 of file layer_tree_unittests.cc.

Constructor & Destructor Documentation

◆ LayerTreeTest()

flutter::testing::LayerTreeTest::LayerTreeTest ( )
inline

Definition at line 21 of file layer_tree_unittests.cc.

22 : root_transform_(SkMatrix::Translate(1.0f, 1.0f)),
23 scoped_frame_(compositor_context_.AcquireFrame(nullptr,
24 &mock_canvas(),
25 nullptr,
26 root_transform_,
27 false,
28 true,
29 nullptr,
30 nullptr)) {}
static SkMatrix Translate(SkScalar dx, SkScalar dy)
Definition: SkMatrix.h:91
virtual std::unique_ptr< ScopedFrame > AcquireFrame(GrDirectContext *gr_context, DlCanvas *canvas, ExternalViewEmbedder *view_embedder, const SkMatrix &root_surface_transformation, bool instrumentation_enabled, bool surface_supports_readback, fml::RefPtr< fml::RasterThreadMerger > raster_thread_merger, impeller::AiksContext *aiks_context)

Member Function Documentation

◆ BuildLayerTree()

std::unique_ptr< LayerTree > flutter::testing::LayerTreeTest::BuildLayerTree ( const std::shared_ptr< Layer > &  root_layer)
inline

Definition at line 35 of file layer_tree_unittests.cc.

36 {
37 return std::make_unique<LayerTree>(root_layer, SkISize::Make(64, 64));
38 }
static constexpr SkISize Make(int32_t w, int32_t h)
Definition: SkSize.h:20

◆ frame()

CompositorContext::ScopedFrame & flutter::testing::LayerTreeTest::frame ( )
inline

Definition at line 32 of file layer_tree_unittests.cc.

32{ return *scoped_frame_.get(); }

◆ root_transform()

const SkMatrix & flutter::testing::LayerTreeTest::root_transform ( )
inline

Definition at line 33 of file layer_tree_unittests.cc.

33{ return root_transform_; }

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