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

Side by Side Diff: client/deps/glbench/src/testbase.cc

Issue 2122020: Fixes for GLES systems. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: ...and removed bogus #-I from Makefile Created 10 years, 7 months 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
« no previous file with comments | « client/deps/glbench/src/testbase.h ('k') | client/deps/glbench/src/textureupdatetest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "testbase.h" 7 #include "testbase.h"
8 8
9 namespace glbench { 9 namespace glbench {
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void DrawArraysTestFunc::FillRateTestNormalSubWindow(const char* name, 100 void DrawArraysTestFunc::FillRateTestNormalSubWindow(const char* name,
101 float width, float height) 101 float width, float height)
102 { 102 {
103 const int buffer_len = 64; 103 const int buffer_len = 64;
104 char buffer[buffer_len]; 104 char buffer[buffer_len];
105 snprintf(buffer, buffer_len, "mpixels_sec_%s", name); 105 snprintf(buffer, buffer_len, "mpixels_sec_%s", name);
106 RunTest(this, buffer, width * height, true); 106 RunTest(this, buffer, width * height, true);
107 } 107 }
108 108
109 109
110 #ifndef USE_EGL 110 #if defined(USE_OPENGL)
111 void DrawArraysTestFunc::FillRateTestBlendDepth(const char *name) { 111 void DrawArraysTestFunc::FillRateTestBlendDepth(const char *name) {
112 const int buffer_len = 64; 112 const int buffer_len = 64;
113 char buffer[buffer_len]; 113 char buffer[buffer_len];
114 114
115 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 115 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
116 glEnable(GL_BLEND); 116 glEnable(GL_BLEND);
117 snprintf(buffer, buffer_len, "mpixels_sec_%s_blended", name); 117 snprintf(buffer, buffer_len, "mpixels_sec_%s_blended", name);
118 RunTest(this, buffer, g_width * g_height, true); 118 RunTest(this, buffer, g_width * g_height, true);
119 glDisable(GL_BLEND); 119 glDisable(GL_BLEND);
120 120
(...skipping 12 matching lines...) Expand all
133 bool DrawElementsTestFunc::TestFunc(int iter) { 133 bool DrawElementsTestFunc::TestFunc(int iter) {
134 glDrawElements(GL_TRIANGLES, count_, GL_UNSIGNED_INT, 0); 134 glDrawElements(GL_TRIANGLES, count_, GL_UNSIGNED_INT, 0);
135 glFlush(); 135 glFlush();
136 for (int i = 0 ; i < iter-1; ++i) { 136 for (int i = 0 ; i < iter-1; ++i) {
137 glDrawElements(GL_TRIANGLES, count_, GL_UNSIGNED_INT, 0); 137 glDrawElements(GL_TRIANGLES, count_, GL_UNSIGNED_INT, 0);
138 } 138 }
139 return true; 139 return true;
140 } 140 }
141 141
142 } // namespace glbench 142 } // namespace glbench
OLDNEW
« no previous file with comments | « client/deps/glbench/src/testbase.h ('k') | client/deps/glbench/src/textureupdatetest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698