Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Functions | Variables
TessellateBench.cpp File Reference
#include "bench/Benchmark.h"
#include "include/gpu/GrDirectContext.h"
#include "src/core/SkPathPriv.h"
#include "src/core/SkRectPriv.h"
#include "src/gpu/ganesh/GrDirectContextPriv.h"
#include "src/gpu/ganesh/GrPipeline.h"
#include "src/gpu/ganesh/mock/GrMockOpTarget.h"
#include "src/gpu/ganesh/tessellate/PathTessellator.h"
#include "src/gpu/ganesh/tessellate/StrokeTessellator.h"
#include "src/gpu/tessellate/AffineMatrix.h"
#include "src/gpu/tessellate/MiddleOutPolygonTriangulator.h"
#include "src/gpu/tessellate/WangsFormula.h"
#include "tools/ToolUtils.h"
#include <vector>

Go to the source code of this file.

Classes

class  skgpu::ganesh::PathTessellateBenchmark
 
class  skgpu::ganesh::TessPrepareBench
 

Namespaces

namespace  skgpu
 
namespace  skgpu::ganesh
 

Macros

#define DEF_PATH_TESS_BENCH(NAME, PATH, MATRIX)
 

Typedefs

using skgpu::ganesh::PathStrokeList = StrokeTessellator::PathStrokeList
 
using skgpu::ganesh::MakePathStrokesFn = std::vector< PathStrokeList >(*)()
 
using skgpu::ganesh::PatchAttribs = tess::PatchAttribs
 

Functions

static sk_sp< GrDirectContextskgpu::ganesh::make_mock_context ()
 
static SkPath skgpu::ganesh::make_cubic_path (int maxPow2)
 
static SkPath skgpu::ganesh::make_conic_path ()
 
static SkPath skgpu::ganesh::make_quad_path (int maxPow2)
 
static SkPath skgpu::ganesh::make_line_path (int maxPow2)
 
 skgpu::ganesh::DEF_PATH_TESS_BENCH (GrPathCurveTessellator, make_cubic_path(8), SkMatrix::I())
 
 skgpu::ganesh::DEF_PATH_TESS_BENCH (GrPathWedgeTessellator, make_cubic_path(8), SkMatrix::I())
 
static void skgpu::ganesh::benchmark_wangs_formula_cubic_log2 (const SkMatrix &matrix, const SkPath &path)
 
 skgpu::ganesh::DEF_PATH_TESS_BENCH (wangs_formula_cubic_log2, make_cubic_path(18), SkMatrix::I())
 
 skgpu::ganesh::DEF_PATH_TESS_BENCH (wangs_formula_cubic_log2_scale, make_cubic_path(18), SkMatrix::Scale(1.1f, 0.9f))
 
 skgpu::ganesh::DEF_PATH_TESS_BENCH (wangs_formula_cubic_log2_affine, make_cubic_path(18), SkMatrix::MakeAll(.9f, 0.9f, 0, 1.1f, 1.1f, 0, 0, 0, 1))
 
static void skgpu::ganesh::benchmark_wangs_formula_conic (const SkMatrix &matrix, const SkPath &path)
 
static void skgpu::ganesh::benchmark_wangs_formula_conic_log2 (const SkMatrix &matrix, const SkPath &path)
 
 skgpu::ganesh::DEF_PATH_TESS_BENCH (wangs_formula_conic, make_conic_path(), SkMatrix::I())
 
 skgpu::ganesh::DEF_PATH_TESS_BENCH (wangs_formula_conic_log2, make_conic_path(), SkMatrix::I())
 
 skgpu::ganesh::DEF_PATH_TESS_BENCH (middle_out_triangulation, ToolUtils::make_star(SkRect::MakeWH(500, 500), kNumCubicsInChalkboard), SkMatrix::I())
 
static std::vector< PathStrokeListskgpu::ganesh::make_simple_cubic_path ()
 
static std::vector< PathStrokeListskgpu::ganesh::make_motionmark_paths ()
 
 skgpu::ganesh::DEF_BENCH (return new TessPrepareBench(make_simple_cubic_path, PatchAttribs::kNone, 1, "GrStrokeFixedCountTessellator");) DEF_BENCH(return new TessPrepareBench(make_simple_cubic_path
 

Variables

static constexpr int skgpu::ganesh::kNumCubicsInChalkboard = 47182
 
static const SkMatrix skgpu::ganesh::gAlmostIdentity
 
 skgpu::ganesh::GrStrokeFixedCountTessellator_one_chop
 

Macro Definition Documentation

◆ DEF_PATH_TESS_BENCH

#define DEF_PATH_TESS_BENCH (   NAME,
  PATH,
  MATRIX 
)
Value:
class PathTessellateBenchmark_##NAME : public PathTessellateBenchmark { \
public: \
PathTessellateBenchmark_##NAME() : PathTessellateBenchmark(#NAME, (PATH), (MATRIX)) {} \
void runBench() override; \
}; \
DEF_BENCH( return new PathTessellateBenchmark_##NAME(); ); \
void PathTessellateBenchmark_##NAME::runBench()

Definition at line 123 of file TessellateBench.cpp.

124 : public PathTessellateBenchmark { \
125 public: \
126 PathTessellateBenchmark_##NAME() : PathTessellateBenchmark(#NAME, (PATH), (MATRIX)) {} \
127 void runBench() override; \
128 }; \
129 DEF_BENCH( return new PathTessellateBenchmark_##NAME(); ); \
130 void PathTessellateBenchmark_##NAME::runBench()