Flutter Engine
The Flutter Engine
Namespaces | Macros | Functions
dl_transform_benchmarks.cc File Reference
#include <functional>
#include "flutter/benchmarking/benchmarking.h"
#include "flutter/impeller/geometry/matrix.h"
#include "flutter/impeller/geometry/rect.h"
#include "third_party/skia/include/core/SkM44.h"
#include "third_party/skia/include/core/SkMatrix.h"
#include "third_party/skia/include/core/SkPoint3.h"

Go to the source code of this file.

Namespaces

namespace  flutter
 

Macros

#define BENCHMARK_CAPTURE_TYPE(name, type)    BENCHMARK_CAPTURE(name, type, AdapterType::k##type)
 
#define BENCHMARK_CAPTURE_TYPE_ARGS(name, type, ...)    BENCHMARK_CAPTURE(name, type, AdapterType::k##type, __VA_ARGS__)
 
#define BENCHMARK_CAPTURE_ALL(name)
 
#define BENCHMARK_CAPTURE_ALL_ARGS(name, ...)
 
#define BENCHMARK_CAPTURE_TYPE_SETUP(name, type, setup)    BENCHMARK_CAPTURE(name, setup/type, AdapterType::k##type, Setup##setup)
 
#define BENCHMARK_CAPTURE_ALL_SETUP(name, setup)
 
#define BENCHMARK_CAPTURE_TYPE_SETUP2(name, type, setup1, setup2)
 
#define BENCHMARK_CAPTURE_ALL_SETUP2(name, setup1, setup2)
 

Functions

static void flutter::BM_AdapterDispatchOverhead (benchmark::State &state, AdapterType type)
 
static void flutter::BM_SetIdentity (benchmark::State &state, AdapterType type)
 
static void flutter::BM_SetPerspective (benchmark::State &state, AdapterType type)
 
static void flutter::BM_Translate (benchmark::State &state, AdapterType type, float tx, float ty)
 
static void flutter::BM_Scale (benchmark::State &state, AdapterType type, float scale)
 
static void flutter::BM_Rotate (benchmark::State &state, AdapterType type, float radians)
 
static void flutter::BM_Concat (benchmark::State &state, AdapterType type, const SetupFunction &a_setup, const SetupFunction &b_setup)
 
static void flutter::BM_TransformPoint (benchmark::State &state, AdapterType type, const SetupFunction &setup)
 
static void flutter::BM_TransformPoints (benchmark::State &state, AdapterType type, const SetupFunction &setup)
 
static void flutter::BM_TransformRectFast (benchmark::State &state, AdapterType type, const SetupFunction &setup)
 
static void flutter::BM_TransformAndClipRect (benchmark::State &state, AdapterType type, const SetupFunction &setup)
 
static void flutter::BM_InvertUnchecked (benchmark::State &state, AdapterType type, const SetupFunction &setup)
 
static void flutter::BM_InvertAndCheck (benchmark::State &state, AdapterType type, const SetupFunction &setup)
 
 flutter::BENCHMARK_CAPTURE_ALL (BM_AdapterDispatchOverhead)
 
 flutter::BENCHMARK_CAPTURE_ALL (BM_SetIdentity)
 
 flutter::BENCHMARK_CAPTURE_ALL (BM_SetPerspective)
 
 flutter::BENCHMARK_CAPTURE_ALL_ARGS (BM_Translate, 10.0f, 15.0f)
 
 flutter::BENCHMARK_CAPTURE_ALL_ARGS (BM_Scale, 2.0f)
 
 flutter::BENCHMARK_CAPTURE_ALL_ARGS (BM_Rotate, kPiOver4)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP2 (BM_Concat, Scale, Translate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP2 (BM_Concat, ScaleTranslate, ScaleTranslate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP2 (BM_Concat, ScaleTranslate, Rotate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP2 (BM_Concat, ScaleTranslate, Perspective)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP2 (BM_Concat, Perspective, ScaleTranslate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_InvertUnchecked, Identity)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_InvertUnchecked, Translate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_InvertUnchecked, Scale)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_InvertUnchecked, ScaleTranslate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_InvertUnchecked, Rotate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_InvertUnchecked, Perspective)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_InvertAndCheck, Identity)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_InvertAndCheck, Translate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_InvertAndCheck, Scale)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_InvertAndCheck, ScaleTranslate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_InvertAndCheck, Rotate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_InvertAndCheck, Perspective)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformPoint, Identity)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformPoint, Translate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformPoint, Scale)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformPoint, ScaleTranslate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformPoint, Rotate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformPoint, Perspective)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformPoints, Identity)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformPoints, Translate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformPoints, Scale)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformPoints, ScaleTranslate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformPoints, Rotate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformPoints, Perspective)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformRectFast, Identity)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformRectFast, Translate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformRectFast, Scale)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformRectFast, ScaleTranslate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformRectFast, Rotate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformRectFast, PerspectiveClipNone)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformRectFast, PerspectiveClipOne)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformRectFast, PerspectiveClipTwo)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformRectFast, PerspectiveClipThree)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformRectFast, PerspectiveClipFour)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformAndClipRect, Identity)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformAndClipRect, Translate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformAndClipRect, Scale)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformAndClipRect, ScaleTranslate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformAndClipRect, Rotate)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformAndClipRect, PerspectiveClipNone)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformAndClipRect, PerspectiveClipOne)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformAndClipRect, PerspectiveClipTwo)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformAndClipRect, PerspectiveClipThree)
 
 flutter::BENCHMARK_CAPTURE_ALL_SETUP (BM_TransformAndClipRect, PerspectiveClipFour)
 

Macro Definition Documentation

◆ BENCHMARK_CAPTURE_ALL

#define BENCHMARK_CAPTURE_ALL (   name)
Value:
BENCHMARK_CAPTURE_TYPE(name, SkM44); \
BENCHMARK_CAPTURE_TYPE(name, ImpellerMatrix)
Definition: SkM44.h:150
#define BENCHMARK_CAPTURE_TYPE(name, type)
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

Definition at line 755 of file dl_transform_benchmarks.cc.

◆ BENCHMARK_CAPTURE_ALL_ARGS

#define BENCHMARK_CAPTURE_ALL_ARGS (   name,
  ... 
)
Value:
BENCHMARK_CAPTURE_TYPE_ARGS(name, SkM44, __VA_ARGS__); \
BENCHMARK_CAPTURE_TYPE_ARGS(name, ImpellerMatrix, __VA_ARGS__)
#define BENCHMARK_CAPTURE_TYPE_ARGS(name, type,...)

Definition at line 760 of file dl_transform_benchmarks.cc.

◆ BENCHMARK_CAPTURE_ALL_SETUP

#define BENCHMARK_CAPTURE_ALL_SETUP (   name,
  setup 
)
Value:
BENCHMARK_CAPTURE_TYPE_SETUP(name, SkM44, setup); \
BENCHMARK_CAPTURE_TYPE_SETUP(name, ImpellerMatrix, setup)
#define BENCHMARK_CAPTURE_TYPE_SETUP(name, type, setup)
Definition: setup.py:1

Definition at line 778 of file dl_transform_benchmarks.cc.

◆ BENCHMARK_CAPTURE_ALL_SETUP2

#define BENCHMARK_CAPTURE_ALL_SETUP2 (   name,
  setup1,
  setup2 
)
Value:
BENCHMARK_CAPTURE_TYPE_SETUP2(name, SkM44, setup1, setup2); \
BENCHMARK_CAPTURE_TYPE_SETUP2(name, ImpellerMatrix, setup1, setup2)
#define BENCHMARK_CAPTURE_TYPE_SETUP2(name, type, setup1, setup2)

Definition at line 789 of file dl_transform_benchmarks.cc.

◆ BENCHMARK_CAPTURE_TYPE

#define BENCHMARK_CAPTURE_TYPE (   name,
  type 
)     BENCHMARK_CAPTURE(name, type, AdapterType::k##type)

Definition at line 749 of file dl_transform_benchmarks.cc.

◆ BENCHMARK_CAPTURE_TYPE_ARGS

#define BENCHMARK_CAPTURE_TYPE_ARGS (   name,
  type,
  ... 
)     BENCHMARK_CAPTURE(name, type, AdapterType::k##type, __VA_ARGS__)

Definition at line 752 of file dl_transform_benchmarks.cc.

◆ BENCHMARK_CAPTURE_TYPE_SETUP

#define BENCHMARK_CAPTURE_TYPE_SETUP (   name,
  type,
  setup 
)     BENCHMARK_CAPTURE(name, setup/type, AdapterType::k##type, Setup##setup)

Definition at line 774 of file dl_transform_benchmarks.cc.

◆ BENCHMARK_CAPTURE_TYPE_SETUP2

#define BENCHMARK_CAPTURE_TYPE_SETUP2 (   name,
  type,
  setup1,
  setup2 
)
Value:
BENCHMARK_CAPTURE(name, setup1*setup2/type, AdapterType::k##type, \
Setup##setup1, Setup##setup2)
GLenum type
BENCHMARK_CAPTURE(BM_DisplayListBuilderDefault, kDefault, DisplayListBuilderBenchmarkType::kDefault) -> Unit(benchmark::kMicrosecond)

Definition at line 784 of file dl_transform_benchmarks.cc.

Variable Documentation

◆ impeller_matrix

impeller::Matrix impeller_matrix

Definition at line 95 of file dl_transform_benchmarks.cc.

◆ impeller_point

impeller::Point impeller_point

Definition at line 80 of file dl_transform_benchmarks.cc.

◆ impeller_rect

impeller::Rect impeller_rect

Definition at line 87 of file dl_transform_benchmarks.cc.

◆ sk_m44

SkM44 sk_m44

Definition at line 94 of file dl_transform_benchmarks.cc.

◆ sk_matrix

SkMatrix sk_matrix

Definition at line 93 of file dl_transform_benchmarks.cc.

◆ sk_point

SkPoint sk_point

Definition at line 79 of file dl_transform_benchmarks.cc.

◆ sk_rect

SkRect sk_rect

Definition at line 86 of file dl_transform_benchmarks.cc.