| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "base/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 | 8 |
| 9 #include "main.h" | 9 #include "main.h" |
| 10 #include "testbase.h" | 10 #include "testbase.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 private: | 29 private: |
| 30 GLuint width_; | 30 GLuint width_; |
| 31 GLuint height_; | 31 GLuint height_; |
| 32 GLuint program_; | 32 GLuint program_; |
| 33 int texsize_; | 33 int texsize_; |
| 34 scoped_array<char> pixels_[kNumberOfTextures]; | 34 scoped_array<char> pixels_[kNumberOfTextures]; |
| 35 UpdateFlavor flavor_; | 35 UpdateFlavor flavor_; |
| 36 DISALLOW_COPY_AND_ASSIGN(TextureUpdateTest); | 36 DISALLOW_COPY_AND_ASSIGN(TextureUpdateTest); |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 #if I915_WORKAROUND | 39 #if defined(I915_WORKAROUND) |
| 40 #define V1 "gl_TexCoord[0]" | 40 #define V1 "gl_TexCoord[0]" |
| 41 #else | 41 #else |
| 42 #define V1 "v1" | 42 #define V1 "v1" |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 static const char* kVertexShader = | 45 static const char* kVertexShader = |
| 46 "attribute vec4 c1;" | 46 "attribute vec4 c1;" |
| 47 "attribute vec4 c2;" | 47 "attribute vec4 c2;" |
| 48 "varying vec4 v1;" | 48 "varying vec4 v1;" |
| 49 "void main() {" | 49 "void main() {" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 glDeleteTextures(1, &texname); | 139 glDeleteTextures(1, &texname); |
| 140 glDeleteProgram(program_); | 140 glDeleteProgram(program_); |
| 141 return true; | 141 return true; |
| 142 } | 142 } |
| 143 | 143 |
| 144 TestBase* GetTextureUpdateTest() { | 144 TestBase* GetTextureUpdateTest() { |
| 145 return new TextureUpdateTest; | 145 return new TextureUpdateTest; |
| 146 } | 146 } |
| 147 | 147 |
| 148 } // namespace glbench | 148 } // namespace glbench |
| OLD | NEW |