Flutter Impeller
geometry_benchmarks.cc File Reference
#include "flutter/benchmarking/benchmarking.h"
#include "flutter/impeller/entity/solid_fill.vert.h"
#include "flutter/impeller/entity/texture_fill.vert.h"
#include "impeller/entity/geometry/stroke_path_geometry.h"
#include "impeller/geometry/path.h"
#include "impeller/geometry/path_builder.h"
#include "impeller/tessellator/tessellator.h"

Go to the source code of this file.

Classes

class  impeller::ImpellerBenchmarkAccessor
 

Namespaces

 impeller
 

Macros

#define MAKE_STROKE_BENCHMARK_CAPTURE(path, cap, join, closed, uvname, uvtype)
 
#define MAKE_STROKE_BENCHMARK_CAPTURE_CAPS_JOINS(path, uvname, uvtype)
 
#define MAKE_STROKE_BENCHMARK_CAPTURE_UVS(path)
 

Enumerations

enum  impeller::UVMode {
  impeller::UVMode::kNoUV,
  impeller::UVMode::kUVRect,
  impeller::UVMode::kUVRectTx
}
 

Functions

template<class... Args>
static void impeller::BM_Polyline (benchmark::State &state, Args &&... args)
 
template<class... Args>
static void impeller::BM_StrokePolyline (benchmark::State &state, Args &&... args)
 
template<class... Args>
static void impeller::BM_Convex (benchmark::State &state, Args &&... args)
 
 impeller::BENCHMARK_CAPTURE (BM_Polyline, cubic_polyline, CreateCubic(true), false)
 
 impeller::BENCHMARK_CAPTURE (BM_Polyline, cubic_polyline_tess, CreateCubic(true), true)
 
 impeller::BENCHMARK_CAPTURE (BM_Polyline, unclosed_cubic_polyline, CreateCubic(false), false)
 
 impeller::BENCHMARK_CAPTURE (BM_Polyline, unclosed_cubic_polyline_tess, CreateCubic(false), true)
 
 impeller::MAKE_STROKE_BENCHMARK_CAPTURE_UVS (Cubic)
 
 impeller::BENCHMARK_CAPTURE (BM_Polyline, quad_polyline, CreateQuadratic(true), false)
 
 impeller::BENCHMARK_CAPTURE (BM_Polyline, quad_polyline_tess, CreateQuadratic(true), true)
 
 impeller::BENCHMARK_CAPTURE (BM_Polyline, unclosed_quad_polyline, CreateQuadratic(false), false)
 
 impeller::BENCHMARK_CAPTURE (BM_Polyline, unclosed_quad_polyline_tess, CreateQuadratic(false), true)
 
 impeller::MAKE_STROKE_BENCHMARK_CAPTURE_UVS (Quadratic)
 
 impeller::BENCHMARK_CAPTURE (BM_Convex, rrect_convex, CreateRRect(), true)
 
 impeller::MAKE_STROKE_BENCHMARK_CAPTURE (RRect, Butt, Bevel,,, UVMode::kNoUV)
 
 impeller::MAKE_STROKE_BENCHMARK_CAPTURE (RRect, Butt, Bevel,, _uv, UVMode::kUVRectTx)
 
 impeller::MAKE_STROKE_BENCHMARK_CAPTURE (RRect, Butt, Bevel,, _uvNoTx, UVMode::kUVRect)
 

Variables

static Tessellator impeller::tess
 

Macro Definition Documentation

◆ MAKE_STROKE_BENCHMARK_CAPTURE

#define MAKE_STROKE_BENCHMARK_CAPTURE (   path,
  cap,
  join,
  closed,
  uvname,
  uvtype 
)
Value:
BENCHMARK_CAPTURE(BM_StrokePolyline, stroke_##path##_##cap##_##join##uvname, \
Create##path(closed), Cap::k##cap, Join::k##join, uvtype)

Definition at line 168 of file geometry_benchmarks.cc.

◆ MAKE_STROKE_BENCHMARK_CAPTURE_CAPS_JOINS

#define MAKE_STROKE_BENCHMARK_CAPTURE_CAPS_JOINS (   path,
  uvname,
  uvtype 
)
Value:
MAKE_STROKE_BENCHMARK_CAPTURE(path, Butt, Bevel, false, uvname, uvtype); \
MAKE_STROKE_BENCHMARK_CAPTURE(path, Butt, Miter, false, uvname, uvtype); \
MAKE_STROKE_BENCHMARK_CAPTURE(path, Butt, Round, false, uvname, uvtype); \
MAKE_STROKE_BENCHMARK_CAPTURE(path, Square, Bevel, false, uvname, uvtype); \
MAKE_STROKE_BENCHMARK_CAPTURE(path, Round, Bevel, false, uvname, uvtype)

Definition at line 172 of file geometry_benchmarks.cc.

◆ MAKE_STROKE_BENCHMARK_CAPTURE_UVS

#define MAKE_STROKE_BENCHMARK_CAPTURE_UVS (   path)
Value:
MAKE_STROKE_BENCHMARK_CAPTURE_CAPS_JOINS(path, , UVMode::kNoUV); \
MAKE_STROKE_BENCHMARK_CAPTURE_CAPS_JOINS(path, _uv, UVMode::kUVRectTx); \
MAKE_STROKE_BENCHMARK_CAPTURE_CAPS_JOINS(path, _uvNoTx, UVMode::kUVRect)

Definition at line 179 of file geometry_benchmarks.cc.

impeller::BM_StrokePolyline
static void BM_StrokePolyline(benchmark::State &state, Args &&... args)
Definition: geometry_benchmarks.cc:107
MAKE_STROKE_BENCHMARK_CAPTURE
#define MAKE_STROKE_BENCHMARK_CAPTURE(path, cap, join, closed, uvname, uvtype)
Definition: geometry_benchmarks.cc:168
impeller::BENCHMARK_CAPTURE
BENCHMARK_CAPTURE(BM_Convex, rrect_convex, CreateRRect(), true)
MAKE_STROKE_BENCHMARK_CAPTURE_CAPS_JOINS
#define MAKE_STROKE_BENCHMARK_CAPTURE_CAPS_JOINS(path, uvname, uvtype)
Definition: geometry_benchmarks.cc:172