Flutter Engine
The Flutter Engine
Classes | Enumerations | Functions
CompositingImagesBench.cpp File Reference
#include <memory>
#include "bench/Benchmark.h"
#include "bench/GpuTools.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkImage.h"
#include "include/core/SkSurface.h"
#include "include/private/base/SkTemplates.h"
#include "src/base/SkRandom.h"

Go to the source code of this file.

Classes

class  CompositingImages
 

Enumerations

enum class  ClampingMode { kAlwaysFast , kAlwaysStrict , kChromeTiling_RowMajor , kChromeTiling_Optimal }
 
enum class  TransformMode { kNone , kSubpixel , kRotated , kPerspective }
 

Functions

 DEF_BENCH (return new CompositingImages({256, 256}, {256, 256}, {8, 8}, ClampingMode::kAlwaysFast, TransformMode::kNone, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {512, 512}, {4, 4}, ClampingMode::kAlwaysFast, TransformMode::kNone, 1))
 
 DEF_BENCH (return new CompositingImages({1024, 512}, {1024, 512}, {2, 4}, ClampingMode::kAlwaysFast, TransformMode::kNone, 1))
 
 DEF_BENCH (return new CompositingImages({256, 256}, {256, 256}, {8, 8}, ClampingMode::kAlwaysFast, TransformMode::kNone, 4))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {512, 512}, {4, 4}, ClampingMode::kAlwaysFast, TransformMode::kNone, 4))
 
 DEF_BENCH (return new CompositingImages({1024, 512}, {1024, 512}, {2, 4}, ClampingMode::kAlwaysFast, TransformMode::kNone, 4))
 
 DEF_BENCH (return new CompositingImages({256, 256}, {256, 256}, {8, 8}, ClampingMode::kAlwaysFast, TransformMode::kNone, 16))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {512, 512}, {4, 4}, ClampingMode::kAlwaysFast, TransformMode::kNone, 16))
 
 DEF_BENCH (return new CompositingImages({1024, 512}, {1024, 512}, {2, 4}, ClampingMode::kAlwaysFast, TransformMode::kNone, 16))
 
 DEF_BENCH (return new CompositingImages({256, 256}, {256, 256}, {8, 8}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {512, 512}, {4, 4}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 1))
 
 DEF_BENCH (return new CompositingImages({1024, 512}, {1024, 512}, {2, 4}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 1))
 
 DEF_BENCH (return new CompositingImages({256, 256}, {256, 256}, {8, 8}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 4))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {512, 512}, {4, 4}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 4))
 
 DEF_BENCH (return new CompositingImages({1024, 512}, {1024, 512}, {2, 4}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 4))
 
 DEF_BENCH (return new CompositingImages({256, 256}, {256, 256}, {8, 8}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 16))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {512, 512}, {4, 4}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 16))
 
 DEF_BENCH (return new CompositingImages({1024, 512}, {1024, 512}, {2, 4}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 16))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysFast, TransformMode::kNone, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysStrict, TransformMode::kNone, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_RowMajor, TransformMode::kNone, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_Optimal, TransformMode::kNone, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysStrict, TransformMode::kSubpixel, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_RowMajor, TransformMode::kSubpixel, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_Optimal, TransformMode::kSubpixel, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysFast, TransformMode::kRotated, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysStrict, TransformMode::kRotated, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_RowMajor, TransformMode::kRotated, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_Optimal, TransformMode::kRotated, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysFast, TransformMode::kPerspective, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysStrict, TransformMode::kPerspective, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_RowMajor, TransformMode::kPerspective, 1))
 
 DEF_BENCH (return new CompositingImages({512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_Optimal, TransformMode::kPerspective, 1))
 

Enumeration Type Documentation

◆ ClampingMode

enum class ClampingMode
strong
Enumerator
kAlwaysFast 
kAlwaysStrict 
kChromeTiling_RowMajor 
kChromeTiling_Optimal 

Definition at line 21 of file CompositingImagesBench.cpp.

21 {
22 // Submit image set entries with the fast constraint
24 // Submit image set entries with the strict constraint
26 // Submit non-right/bottom tiles as fast, the bottom-right corner as strict, and bottom or right
27 // edge tiles as strict with geometry modification to match content area. These will be
28 // submitted from left-to-right, top-to-bottom so will necessarily be split into many batches.
30 // As above, but group all fast tiles first, then bottom and right edge tiles in a second batch.
32};
@ kChromeTiling_RowMajor

◆ TransformMode

enum class TransformMode
strong
Enumerator
kNone 
kSubpixel 
kRotated 
kPerspective 

Definition at line 34 of file CompositingImagesBench.cpp.

34 {
35 // Tiles will be axis aligned on integer pixels
36 kNone,
37 // Subpixel, tiles will be axis aligned but adjusted to subpixel coordinates
39 // Rotated, tiles will be rotated globally; they won't overlap but their device space bounds may
41 // Perspective, tiles will have global perspective
43};
@ kSubpixel
Definition: FontTest.cpp:57
@ kNone
Definition: layer.h:53

Function Documentation

◆ DEF_BENCH() [1/34]

DEF_BENCH ( return new   CompositingImages{1024, 512}, {1024, 512}, {2, 4}, ClampingMode::kAlwaysFast, TransformMode::kNone, 1)

◆ DEF_BENCH() [2/34]

DEF_BENCH ( return new   CompositingImages{1024, 512}, {1024, 512}, {2, 4}, ClampingMode::kAlwaysFast, TransformMode::kNone, 16)

◆ DEF_BENCH() [3/34]

DEF_BENCH ( return new   CompositingImages{1024, 512}, {1024, 512}, {2, 4}, ClampingMode::kAlwaysFast, TransformMode::kNone, 4)

◆ DEF_BENCH() [4/34]

DEF_BENCH ( return new   CompositingImages{1024, 512}, {1024, 512}, {2, 4}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 1)

◆ DEF_BENCH() [5/34]

DEF_BENCH ( return new   CompositingImages{1024, 512}, {1024, 512}, {2, 4}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 16)

◆ DEF_BENCH() [6/34]

DEF_BENCH ( return new   CompositingImages{1024, 512}, {1024, 512}, {2, 4}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 4)

◆ DEF_BENCH() [7/34]

DEF_BENCH ( return new   CompositingImages{256, 256}, {256, 256}, {8, 8}, ClampingMode::kAlwaysFast, TransformMode::kNone, 1)

◆ DEF_BENCH() [8/34]

DEF_BENCH ( return new   CompositingImages{256, 256}, {256, 256}, {8, 8}, ClampingMode::kAlwaysFast, TransformMode::kNone, 16)

◆ DEF_BENCH() [9/34]

DEF_BENCH ( return new   CompositingImages{256, 256}, {256, 256}, {8, 8}, ClampingMode::kAlwaysFast, TransformMode::kNone, 4)

◆ DEF_BENCH() [10/34]

DEF_BENCH ( return new   CompositingImages{256, 256}, {256, 256}, {8, 8}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 1)

◆ DEF_BENCH() [11/34]

DEF_BENCH ( return new   CompositingImages{256, 256}, {256, 256}, {8, 8}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 16)

◆ DEF_BENCH() [12/34]

DEF_BENCH ( return new   CompositingImages{256, 256}, {256, 256}, {8, 8}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 4)

◆ DEF_BENCH() [13/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysFast, TransformMode::kNone, 1)

◆ DEF_BENCH() [14/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysFast, TransformMode::kPerspective, 1)

◆ DEF_BENCH() [15/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysFast, TransformMode::kRotated, 1)

◆ DEF_BENCH() [16/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 1)

◆ DEF_BENCH() [17/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysStrict, TransformMode::kNone, 1)

◆ DEF_BENCH() [18/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysStrict, TransformMode::kPerspective, 1)

◆ DEF_BENCH() [19/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysStrict, TransformMode::kRotated, 1)

◆ DEF_BENCH() [20/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kAlwaysStrict, TransformMode::kSubpixel, 1)

◆ DEF_BENCH() [21/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_Optimal, TransformMode::kNone, 1)

◆ DEF_BENCH() [22/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_Optimal, TransformMode::kPerspective, 1)

◆ DEF_BENCH() [23/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_Optimal, TransformMode::kRotated, 1)

◆ DEF_BENCH() [24/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_Optimal, TransformMode::kSubpixel, 1)

◆ DEF_BENCH() [25/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_RowMajor, TransformMode::kNone, 1)

◆ DEF_BENCH() [26/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_RowMajor, TransformMode::kPerspective, 1)

◆ DEF_BENCH() [27/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_RowMajor, TransformMode::kRotated, 1)

◆ DEF_BENCH() [28/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {380, 380}, {5, 5}, ClampingMode::kChromeTiling_RowMajor, TransformMode::kSubpixel, 1)

◆ DEF_BENCH() [29/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {512, 512}, {4, 4}, ClampingMode::kAlwaysFast, TransformMode::kNone, 1)

◆ DEF_BENCH() [30/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {512, 512}, {4, 4}, ClampingMode::kAlwaysFast, TransformMode::kNone, 16)

◆ DEF_BENCH() [31/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {512, 512}, {4, 4}, ClampingMode::kAlwaysFast, TransformMode::kNone, 4)

◆ DEF_BENCH() [32/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {512, 512}, {4, 4}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 1)

◆ DEF_BENCH() [33/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {512, 512}, {4, 4}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 16)

◆ DEF_BENCH() [34/34]

DEF_BENCH ( return new   CompositingImages{512, 512}, {512, 512}, {4, 4}, ClampingMode::kAlwaysFast, TransformMode::kSubpixel, 4)