Flutter Engine
The Flutter Engine
Classes | Macros | Enumerations
BulkRectBench.cpp File Reference
#include "bench/Benchmark.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkImage.h"
#include "include/core/SkPaint.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/ganesh/SkImageGanesh.h"
#include "src/base/SkRandom.h"
#include "src/core/SkCanvasPriv.h"
#include "src/gpu/ganesh/GrCanvas.h"
#include "src/gpu/ganesh/GrOpsTypes.h"
#include "src/gpu/ganesh/SkGr.h"
#include "src/gpu/ganesh/SurfaceDrawContext.h"

Go to the source code of this file.

Classes

class  BulkRectBench< kRectCount, kLayout, kImageMode, kDrawMode >
 

Macros

#define ADD_BENCH(n, layout, imageMode, drawMode)    DEF_BENCH( return (new BulkRectBench<n, layout, imageMode, drawMode>()); )
 
#define ADD_BENCH_FAMILY(n, layout)
 

Enumerations

enum class  ImageMode { kShared , kUnique , kNone }
 
enum class  DrawMode { kBatch , kRef , kQuad }
 
enum class  RectangleLayout { kRandom , kGrid }
 

Macro Definition Documentation

◆ ADD_BENCH

#define ADD_BENCH (   n,
  layout,
  imageMode,
  drawMode 
)     DEF_BENCH( return (new BulkRectBench<n, layout, imageMode, drawMode>()); )

Definition at line 273 of file BulkRectBench.cpp.

◆ ADD_BENCH_FAMILY

#define ADD_BENCH_FAMILY (   n,
  layout 
)
Value:
ADD_BENCH(n, layout, ImageMode::kShared, DrawMode::kRef) \
ADD_BENCH(n, layout, ImageMode::kUnique, DrawMode::kBatch) \
ADD_BENCH(n, layout, ImageMode::kUnique, DrawMode::kRef) \
ADD_BENCH(n, layout, ImageMode::kNone, DrawMode::kBatch) \
ADD_BENCH(n, layout, ImageMode::kNone, DrawMode::kRef) \
ADD_BENCH(n, layout, ImageMode::kNone, DrawMode::kQuad)
#define ADD_BENCH(n, layout, imageMode, drawMode)

Definition at line 276 of file BulkRectBench.cpp.

Enumeration Type Documentation

◆ DrawMode

enum class DrawMode
strong
Enumerator
kBatch 
kRef 
kQuad 

Definition at line 29 of file BulkRectBench.cpp.

29 {
30 kBatch, // Bulk API submission, one call to draw every rectangle
31 kRef, // One standard SkCanvas draw call per rectangle
32 kQuad // One experimental draw call per rectangle, only for solid color draws
33};
const SkPoint kQuad[4]

◆ ImageMode

enum class ImageMode
strong
Enumerator
kShared 
kUnique 
kNone 

Definition at line 23 of file BulkRectBench.cpp.

23 {
24 kShared, // 1. One shared image referenced by every rectangle
25 kUnique, // 2. Unique image for every rectangle
26 kNone // 3. No image, solid color shading per rectangle
27};
@ kNone
Definition: layer.h:53

◆ RectangleLayout

enum class RectangleLayout
strong
Enumerator
kRandom 
kGrid 

Definition at line 35 of file BulkRectBench.cpp.

35 {
36 kRandom, // Random overlapping rectangles
37 kGrid // Small, non-overlapping rectangles in a grid covering the output surface
38};