Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / angle / tests / perf_tests / TexSubImage.h
1 //
2 // Copyright (c) 2014 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
7 #include "SimpleBenchmark.h"
8
9 struct TexSubImageParams : public BenchmarkParams
10 {
11     virtual std::string suffix() const;
12
13     // Static parameters
14     int imageWidth;
15     int imageHeight;
16     int subImageWidth;
17     int subImageHeight;
18     unsigned int iterations;
19 };
20
21 class TexSubImageBenchmark : public SimpleBenchmark
22 {
23   public:
24     TexSubImageBenchmark(const TexSubImageParams &params);
25
26     virtual bool initializeBenchmark();
27     virtual void destroyBenchmark();
28     virtual void beginDrawBenchmark();
29     virtual void drawBenchmark();
30
31   private:
32     GLuint createTexture();
33
34     TexSubImageParams mParams;
35
36     // Handle to a program object
37     GLuint mProgram;
38
39     // Attribute locations
40     GLint mPositionLoc;
41     GLint mTexCoordLoc;
42
43     // Sampler location
44     GLint mSamplerLoc;
45
46     // Texture handle
47     GLuint mTexture;
48
49     // Buffer handle
50     GLuint mVertexBuffer;
51     GLuint mIndexBuffer;
52
53     GLubyte *mPixels;
54 };