#include <mock_texture.h>
|
| MockTexture (int64_t textureId, const sk_sp< DlImage > &texture=nullptr) |
|
void | Paint (PaintContext &context, const SkRect &bounds, bool freeze, const DlImageSampling sampling) override |
|
void | OnGrContextCreated () override |
|
void | OnGrContextDestroyed () override |
|
void | MarkNewFrameAvailable () override |
|
void | OnTextureUnregistered () override |
|
bool | gr_context_created () |
|
bool | gr_context_destroyed () |
|
bool | unregistered () |
|
| MockTexture (int64_t textureId, std::shared_ptr< fml::AutoResetWaitableEvent > latch) |
|
| ~MockTexture () override=default |
|
void | Paint (PaintContext &context, const SkRect &bounds, bool freeze, const DlImageSampling) override |
|
void | OnGrContextCreated () override |
|
void | OnGrContextDestroyed () override |
|
void | MarkNewFrameAvailable () override |
|
void | OnTextureUnregistered () override |
|
bool | unregistered () |
|
int | frames_available () |
|
| Texture (int64_t id) |
|
virtual | ~Texture () |
|
virtual void | Paint (PaintContext &context, const SkRect &bounds, bool freeze, const DlImageSampling sampling)=0 |
|
virtual void | MarkNewFrameAvailable ()=0 |
|
virtual void | OnTextureUnregistered ()=0 |
|
int64_t | Id () |
|
| ContextListener () |
|
| ~ContextListener () |
|
virtual void | OnGrContextCreated ()=0 |
|
virtual void | OnGrContextDestroyed ()=0 |
|
Definition at line 20 of file mock_texture.h.
◆ MockTexture() [1/2]
flutter::testing::MockTexture::MockTexture |
( |
int64_t |
textureId, |
|
|
const sk_sp< DlImage > & |
texture = nullptr |
|
) |
| |
|
explicit |
◆ MockTexture() [2/2]
◆ ~MockTexture()
flutter::testing::MockTexture::~MockTexture |
( |
| ) |
|
|
overridedefault |
◆ frames_available()
int flutter::testing::MockTexture::frames_available |
( |
| ) |
|
|
inline |
◆ gr_context_created()
bool flutter::testing::MockTexture::gr_context_created |
( |
| ) |
|
|
inline |
◆ gr_context_destroyed()
bool flutter::testing::MockTexture::gr_context_destroyed |
( |
| ) |
|
|
inline |
Definition at line 39 of file mock_texture.h.
39{ return gr_context_destroyed_; }
◆ MakeTestTexture()
Definition at line 12 of file mock_texture.cc.
12 {
22 for (
int y = 0;
y <
w;
y += checker_size) {
23 for (
int x = 0;
x <
h;
x += checker_size) {
24 SkPaint& cellp = ((
x +
y) & 1) == 0 ? p0 : p1;
26 cellp);
27 }
28 }
30}
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorGREEN
void drawRect(const SkRect &rect, const SkPaint &paint)
void setStyle(Style style)
void setColor(SkColor color)
@ kFill_Style
set to fill geometry
static sk_sp< DlImage > Make(const SkImage *image)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
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 to the cache directory This is different from the persistent_cache_path in embedder h
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
◆ MarkNewFrameAvailable() [1/2]
void flutter::testing::MockTexture::MarkNewFrameAvailable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ MarkNewFrameAvailable() [2/2]
void flutter::testing::MockTexture::MarkNewFrameAvailable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ OnGrContextCreated() [1/2]
void flutter::testing::MockTexture::OnGrContextCreated |
( |
| ) |
|
|
inlineoverridevirtual |
◆ OnGrContextCreated() [2/2]
void flutter::testing::MockTexture::OnGrContextCreated |
( |
| ) |
|
|
inlineoverridevirtual |
◆ OnGrContextDestroyed() [1/2]
void flutter::testing::MockTexture::OnGrContextDestroyed |
( |
| ) |
|
|
inlineoverridevirtual |
◆ OnGrContextDestroyed() [2/2]
void flutter::testing::MockTexture::OnGrContextDestroyed |
( |
| ) |
|
|
inlineoverridevirtual |
◆ OnTextureUnregistered() [1/2]
void flutter::testing::MockTexture::OnTextureUnregistered |
( |
| ) |
|
|
inlineoverridevirtual |
◆ OnTextureUnregistered() [2/2]
void flutter::testing::MockTexture::OnTextureUnregistered |
( |
| ) |
|
|
inlineoverridevirtual |
◆ Paint() [1/2]
Implements flutter::Texture.
Definition at line 35 of file mock_texture.cc.
38 {
39
40
43 if (freeze) {
45 src =
src.makeInset(1.0f, 1.0f);
46 }
48}
#define FML_DCHECK(condition)
Optional< SkRect > bounds
SkSamplingOptions sampling
static SkRect Make(const SkISize &size)
◆ Paint() [2/2]
void flutter::testing::MockTexture::Paint |
( |
PaintContext & |
context, |
|
|
const SkRect & |
bounds, |
|
|
bool |
freeze, |
|
|
const |
DlImageSampling |
|
) |
| |
|
inlineoverridevirtual |
◆ unregistered() [1/2]
bool flutter::testing::MockTexture::unregistered |
( |
| ) |
|
|
inline |
◆ unregistered() [2/2]
bool flutter::testing::MockTexture::unregistered |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following files: