Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Variables
examples.h File Reference
#include "tools/Registry.h"
#include "skia.h"
#include <cinttypes>
#include <cmath>
#include <string>

Go to the source code of this file.

Classes

struct  fiddle::Example
 

Namespaces

namespace  fiddle
 

Macros

#define REGISTER_FIDDLE(NAME, WIDTH, HEIGHT, TEXT, IMG_INDEX, DURATION, SRGB, F16, OFSCR, OFSCR_WIDTH, OFSCR_HEIGHT, OFSCR_SAMPLECOUNT, OFSCR_TEXTURABLE, OFSCR_MIPMAP)
 
#define REG_FIDDLE_SRGB(NAME, W, H, T, I, DURATION, F16)
 
#define REG_FIDDLE_ANIMATED(NAME, W, H, T, I, DURATION)
 
#define REG_FIDDLE(NAME, W, H, TEXT, I)    REG_FIDDLE_ANIMATED(NAME, W, H, TEXT, I, 0)
 

Variables

GrBackendTexture backEndTexture
 
GrBackendRenderTarget backEndRenderTarget
 
GrBackendTexture backEndTextureRenderTarget
 
SkBitmap source
 
sk_sp< SkImageimage
 
double duration
 
double frame
 
sk_sp< SkFontMgrfontMgr
 

Macro Definition Documentation

◆ REG_FIDDLE

#define REG_FIDDLE (   NAME,
  W,
  H,
  TEXT,
  I 
)     REG_FIDDLE_ANIMATED(NAME, W, H, TEXT, I, 0)

Definition at line 60 of file examples.h.

◆ REG_FIDDLE_ANIMATED

#define REG_FIDDLE_ANIMATED (   NAME,
  W,
  H,
  T,
  I,
  DURATION 
)
Value:
REGISTER_FIDDLE(NAME, W, H, T, I, DURATION, false, false, \
false, 64, 64, 0, false, false)
#define W
Definition: aaa.cpp:17
#define REGISTER_FIDDLE(NAME, WIDTH, HEIGHT, TEXT, IMG_INDEX, DURATION, SRGB, F16, OFSCR, OFSCR_WIDTH, OFSCR_HEIGHT, OFSCR_SAMPLECOUNT, OFSCR_TEXTURABLE, OFSCR_MIPMAP)
Definition: examples.h:42
#define T
Definition: precompiler.cc:65
Definition: SkMD5.cpp:130
Definition: SkMD5.cpp:134

Definition at line 56 of file examples.h.

◆ REG_FIDDLE_SRGB

#define REG_FIDDLE_SRGB (   NAME,
  W,
  H,
  T,
  I,
  DURATION,
  F16 
)
Value:
REGISTER_FIDDLE(NAME, W, H, T, I, DURATION, true, F16, \
false, 64, 64, 0, false, false)

Definition at line 52 of file examples.h.

◆ REGISTER_FIDDLE

#define REGISTER_FIDDLE (   NAME,
  WIDTH,
  HEIGHT,
  TEXT,
  IMG_INDEX,
  DURATION,
  SRGB,
  F16,
  OFSCR,
  OFSCR_WIDTH,
  OFSCR_HEIGHT,
  OFSCR_SAMPLECOUNT,
  OFSCR_TEXTURABLE,
  OFSCR_MIPMAP 
)
Value:
namespace example_##NAME { void draw(SkCanvas*); } \
sk_tools::Registry<fiddle::Example> reg_##NAME( \
fiddle::Example{&example_##NAME::draw, #NAME, DURATION, IMG_INDEX, \
WIDTH, HEIGHT, OFSCR_WIDTH, OFSCR_HEIGHT, OFSCR_SAMPLECOUNT, \
TEXT, SRGB, F16, OFSCR, OFSCR_TEXTURABLE, OFSCR_MIPMAP}); \
namespace example_##NAME
#define HEIGHT
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27

Definition at line 42 of file examples.h.

Variable Documentation

◆ backEndRenderTarget

GrBackendRenderTarget backEndRenderTarget
extern

Definition at line 26 of file examples.cpp.

◆ backEndTexture

GrBackendTexture backEndTexture
extern

Definition at line 25 of file examples.cpp.

◆ backEndTextureRenderTarget

GrBackendTexture backEndTextureRenderTarget
extern

Definition at line 27 of file examples.cpp.

◆ duration

double duration
extern

Definition at line 30 of file examples.cpp.

◆ fontMgr

sk_sp<SkFontMgr> fontMgr
extern

Definition at line 32 of file examples.cpp.

◆ frame

double frame
extern

Definition at line 31 of file examples.cpp.

◆ image

sk_sp<SkImage> image
extern

Definition at line 29 of file examples.cpp.

◆ source

SkBitmap source
extern

Definition at line 28 of file examples.cpp.