Definition at line 62 of file GaneshBenchmarkTarget.cpp.
◆ GaneshBenchmarkTarget()
GaneshBenchmarkTarget::GaneshBenchmarkTarget |
( |
std::unique_ptr< SurfaceManager > |
surfaceManager, |
|
|
Benchmark * |
benchmark |
|
) |
| |
|
inline |
Definition at line 64 of file GaneshBenchmarkTarget.cpp.
BenchmarkTarget(std::unique_ptr< SurfaceManager > surfaceManager, Benchmark *benchmark)
◆ ~GaneshBenchmarkTarget()
GaneshBenchmarkTarget::~GaneshBenchmarkTarget |
( |
| ) |
|
|
inlineoverride |
◆ autoTuneLoops()
std::tuple< int, bool > GaneshBenchmarkTarget::autoTuneLoops |
( |
| ) |
const |
|
inlineoverridevirtual |
Implements BenchmarkTarget.
Definition at line 95 of file GaneshBenchmarkTarget.cpp.
95 {
96 int maxFrameLag = computeMaxFrameLag();
97
98
99 int loops = 1;
100 double elapsed = 0;
101 do {
102 if (1 << 30 == loops) {
103
104 loops = 0;
105 break;
106 }
107 loops *= 2;
108
109
110 for (
int i = 0;
i < maxFrameLag;
i++) {
111 elapsed =
time(loops);
112 }
113 } while (elapsed < FLAGS_gpuMs);
114
115
116 loops = (
int)
ceil(loops * FLAGS_gpuMs / elapsed);
117
118
120
121 return std::make_tuple(loops, true);
122 }
double time(int loops) const
SIN Vec< N, float > ceil(const Vec< N, float > &x)
◆ dumpStats()
Reimplemented from BenchmarkTarget.
Definition at line 135 of file GaneshBenchmarkTarget.cpp.
136 {
137 if (FLAGS_gpuStatsDump) {
138
140 }
143 dmsaaStats.dumpKeyValuePairs(keys,
values);
144 dmsaaStats.dump();
146 }
147 }
GrRecordingContextPriv::DMSAAStats combinedDMSAAStats
SkCanvas * getCanvas() const
virtual void getGpuStats(SkCanvas *, skia_private::TArray< SkString > *keys, skia_private::TArray< double > *values)
virtual bool getDMSAAStats(GrRecordingContext *)
GrRecordingContextPriv priv()
virtual GrRecordingContext * recordingContext() const
◆ getBackend()
◆ onAfterDraw()
void GaneshBenchmarkTarget::onAfterDraw |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ printStats()
void GaneshBenchmarkTarget::printStats |
( |
| ) |
const |
|
inlineoverridevirtual |
Reimplemented from BenchmarkTarget.
Definition at line 149 of file GaneshBenchmarkTarget.cpp.
149 {
150 if (FLAGS_gpuStats) {
151 auto context =
fSurfaceManager->getGaneshContextInfo()->directContext();
152
153 context->priv().printCacheStats();
154 context->priv().printGpuStats();
155 context->priv().printContextStats();
156 }
157 }
◆ setup()
void GaneshBenchmarkTarget::setup |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ warmUp()
void GaneshBenchmarkTarget::warmUp |
( |
int |
loops | ) |
const |
|
inlineoverridevirtual |
The documentation for this class was generated from the following file: