Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Side by Side Diff: gpu/command_buffer/tests/compressed_texture_test.cc

Issue 682743002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium 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 <GLES2/gl2.h> 5 #include <GLES2/gl2.h>
6 #include <GLES2/gl2ext.h> 6 #include <GLES2/gl2ext.h>
7 #include <GLES2/gl2extchromium.h> 7 #include <GLES2/gl2extchromium.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "gpu/command_buffer/tests/gl_manager.h" 10 #include "gpu/command_buffer/tests/gl_manager.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 uint8 g6 = (rgb565 & kGreenMask) >> 5; 141 uint8 g6 = (rgb565 & kGreenMask) >> 5;
142 uint8 b5 = (rgb565 & kBlueMask); 142 uint8 b5 = (rgb565 & kBlueMask);
143 // Replicate upper bits to lower empty bits. 143 // Replicate upper bits to lower empty bits.
144 rgb888[0] = (r5 << 3) | (r5 >> 2); 144 rgb888[0] = (r5 << 3) | (r5 >> 2);
145 rgb888[1] = (g6 << 2) | (g6 >> 4); 145 rgb888[1] = (g6 << 2) | (g6 >> 4);
146 rgb888[2] = (b5 << 3) | (b5 >> 2); 146 rgb888[2] = (b5 << 3) | (b5 >> 2);
147 } 147 }
148 148
149 class CompressedTextureTest : public ::testing::TestWithParam<GLenum> { 149 class CompressedTextureTest : public ::testing::TestWithParam<GLenum> {
150 protected: 150 protected:
151 virtual void SetUp() { 151 void SetUp() override {
152 GLManager::Options options; 152 GLManager::Options options;
153 options.size = gfx::Size(kTextureWidth, kTextureHeight); 153 options.size = gfx::Size(kTextureWidth, kTextureHeight);
154 gl_.Initialize(options); 154 gl_.Initialize(options);
155 } 155 }
156 156
157 virtual void TearDown() { 157 void TearDown() override { gl_.Destroy(); }
158 gl_.Destroy();
159 }
160 158
161 GLuint LoadProgram() { 159 GLuint LoadProgram() {
162 const char* v_shader_src = SHADER( 160 const char* v_shader_src = SHADER(
163 attribute vec2 a_position; 161 attribute vec2 a_position;
164 varying vec2 v_texcoord; 162 varying vec2 v_texcoord;
165 void main() { 163 void main() {
166 gl_Position = vec4(a_position, 0.0, 1.0); 164 gl_Position = vec4(a_position, 0.0, 1.0);
167 v_texcoord = (a_position + 1.0) * 0.5; 165 v_texcoord = (a_position + 1.0) * 0.5;
168 } 166 }
169 ); 167 );
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 244 GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
247 GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, 245 GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,
248 GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, 246 GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,
249 GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 247 GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
250 }; 248 };
251 INSTANTIATE_TEST_CASE_P(Format, 249 INSTANTIATE_TEST_CASE_P(Format,
252 CompressedTextureTest, 250 CompressedTextureTest,
253 ::testing::ValuesIn(kFormats)); 251 ::testing::ValuesIn(kFormats));
254 252
255 } // namespace gpu 253 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698