• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2017 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // DrawCallPerfParams.cpp:
7 //   Parametrization for performance tests for ANGLE draw call overhead.
8 //
9 
10 #include "DrawCallPerfParams.h"
11 
12 #include <sstream>
13 
DrawCallPerfParams()14 DrawCallPerfParams::DrawCallPerfParams()
15 {
16     majorVersion = 2;
17     minorVersion = 0;
18     windowWidth  = 64;
19     windowHeight = 64;
20 
21 // Lower the iteration count in debug.
22 #if !defined(NDEBUG)
23     iterationsPerStep = 100;
24 #else
25     iterationsPerStep = 20000;
26 #endif
27     runTimeSeconds = 10.0;
28     numTris        = 1;
29     offscreen      = false;
30 }
31 
32 DrawCallPerfParams::~DrawCallPerfParams() = default;
33 
story() const34 std::string DrawCallPerfParams::story() const
35 {
36     std::stringstream strstr;
37 
38     strstr << RenderTestParams::story();
39 
40     if (offscreen)
41     {
42         strstr << "_offscreen";
43     }
44 
45     return strstr.str();
46 }
47