#include <mock_layer.h>
Definition at line 26 of file mock_layer.h.
◆ MockLayer()
Definition at line 17 of file mock_layer.cc.
18 : fake_paint_path_(
path), fake_paint_(std::move(paint)) {}
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
◆ as_mock_layer()
| const MockLayer * flutter::testing::MockLayer::as_mock_layer |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ Diff()
| void flutter::testing::MockLayer::Diff |
( |
DiffContext * |
context, |
|
|
const Layer * |
old_layer |
|
) |
| |
|
overridevirtual |
◆ fake_has_platform_view()
| bool flutter::testing::MockLayer::fake_has_platform_view |
( |
| ) |
|
|
inline |
Definition at line 60 of file mock_layer.h.
60{ return mock_flags_ & kFakeHasPlatformView; }
Referenced by Preroll().
◆ fake_has_texture_layer()
| bool flutter::testing::MockLayer::fake_has_texture_layer |
( |
| ) |
|
|
inline |
Definition at line 68 of file mock_layer.h.
68{ return mock_flags_ & kFakeHasTextureLayer; }
Referenced by Preroll().
◆ fake_opacity_compatible()
| bool flutter::testing::MockLayer::fake_opacity_compatible |
( |
| ) |
|
|
inline |
Definition at line 64 of file mock_layer.h.
64 {
65 return mock_flags_ & kFakeOpacityCompatible;
66 }
Referenced by Preroll().
◆ fake_reads_surface()
| bool flutter::testing::MockLayer::fake_reads_surface |
( |
| ) |
|
|
inline |
◆ IsReplacing()
| bool flutter::testing::MockLayer::IsReplacing |
( |
DiffContext * |
context, |
|
|
const Layer * |
layer |
|
) |
| const |
|
overridevirtual |
Reimplemented from flutter::Layer.
Definition at line 20 of file mock_layer.cc.
20 {
21
22
23
24 auto mock_layer = layer->as_mock_layer();
25 return mock_layer && mock_layer->fake_paint_ == fake_paint_ &&
26 mock_layer->fake_paint_path_ == fake_paint_path_;
27}
References flutter::Layer::as_mock_layer().
◆ Make()
◆ MakeOpacityCompatible()
| static std::shared_ptr< MockLayer > flutter::testing::MockLayer::MakeOpacityCompatible |
( |
const DlPath & |
path | ) |
|
|
inlinestatic |
Definition at line 35 of file mock_layer.h.
35 {
36 auto mock_layer = std::make_shared<MockLayer>(
path,
DlPaint());
37 mock_layer->set_fake_opacity_compatible(true);
38 return mock_layer;
39 }
References flutter::path.
Referenced by flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::TEST_F().
◆ Paint()
| void flutter::testing::MockLayer::Paint |
( |
PaintContext & |
context | ) |
const |
|
overridevirtual |
◆ parent_cull_rect()
| const DlRect & flutter::testing::MockLayer::parent_cull_rect |
( |
| ) |
|
|
inline |
Definition at line 46 of file mock_layer.h.
46{ return parent_cull_rect_; }
◆ parent_has_platform_view()
| bool flutter::testing::MockLayer::parent_has_platform_view |
( |
| ) |
|
|
inline |
Definition at line 52 of file mock_layer.h.
52 {
53 return mock_flags_ & kParentHasPlatformView;
54 }
◆ parent_has_texture_layer()
| bool flutter::testing::MockLayer::parent_has_texture_layer |
( |
| ) |
|
|
inline |
Definition at line 56 of file mock_layer.h.
56 {
57 return mock_flags_ & kParentHasTextureLayer;
58 }
◆ parent_matrix()
| const DlMatrix & flutter::testing::MockLayer::parent_matrix |
( |
| ) |
|
|
inline |
Definition at line 45 of file mock_layer.h.
45{ return parent_matrix_; }
◆ parent_mutators()
| const MutatorsStack & flutter::testing::MockLayer::parent_mutators |
( |
| ) |
|
|
inline |
Definition at line 44 of file mock_layer.h.
44{ return parent_mutators_; }
◆ Preroll()
◆ set_expected_paint_matrix()
| void flutter::testing::MockLayer::set_expected_paint_matrix |
( |
const DlMatrix & |
matrix | ) |
|
|
inline |
Definition at line 106 of file mock_layer.h.
106 {
107 expected_paint_matrix_ = matrix;
108 }
◆ set_fake_has_platform_view()
| MockLayer & flutter::testing::MockLayer::set_fake_has_platform_view |
( |
bool |
flag | ) |
|
|
inline |
Definition at line 82 of file mock_layer.h.
82 {
83 flag ? (mock_flags_ |= kFakeHasPlatformView)
84 : (mock_flags_ &= ~(kFakeHasPlatformView));
85 return *this;
86 }
◆ set_fake_has_texture_layer()
| MockLayer & flutter::testing::MockLayer::set_fake_has_texture_layer |
( |
bool |
flag | ) |
|
|
inline |
Definition at line 100 of file mock_layer.h.
100 {
101 flag ? (mock_flags_ |= kFakeHasTextureLayer)
102 : (mock_flags_ &= ~(kFakeHasTextureLayer));
103 return *this;
104 }
◆ set_fake_opacity_compatible()
| MockLayer & flutter::testing::MockLayer::set_fake_opacity_compatible |
( |
bool |
flag | ) |
|
|
inline |
Definition at line 94 of file mock_layer.h.
94 {
95 flag ? (mock_flags_ |= kFakeOpacityCompatible)
96 : (mock_flags_ &= ~(kFakeOpacityCompatible));
97 return *this;
98 }
◆ set_fake_reads_surface()
| MockLayer & flutter::testing::MockLayer::set_fake_reads_surface |
( |
bool |
flag | ) |
|
|
inline |
Definition at line 88 of file mock_layer.h.
88 {
89 flag ? (mock_flags_ |= kFakeReadsSurface)
90 : (mock_flags_ &= ~(kFakeReadsSurface));
91 return *this;
92 }
◆ set_parent_has_platform_view()
| MockLayer & flutter::testing::MockLayer::set_parent_has_platform_view |
( |
bool |
flag | ) |
|
|
inline |
Definition at line 70 of file mock_layer.h.
70 {
71 flag ? (mock_flags_ |= kParentHasPlatformView)
72 : (mock_flags_ &= ~(kParentHasPlatformView));
73 return *this;
74 }
Referenced by Preroll().
◆ set_parent_has_texture_layer()
| MockLayer & flutter::testing::MockLayer::set_parent_has_texture_layer |
( |
bool |
flag | ) |
|
|
inline |
Definition at line 76 of file mock_layer.h.
76 {
77 flag ? (mock_flags_ |= kParentHasTextureLayer)
78 : (mock_flags_ &= ~(kParentHasTextureLayer));
79 return *this;
80 }
Referenced by Preroll().
The documentation for this class was generated from the following files: