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

Unified Diff: gpu/gles2_conform_support/egl/display.cc

Issue 10911086: Add support to test harness EGL for OpenGL ES 1.1 tests on Regal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/gles2_conform_support/egl/display.h ('k') | gpu/gles2_conform_support/egl/egl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/gles2_conform_support/egl/display.cc
diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc
index b00770e79a672f22dc4e8afbdeeefdc6113e7d9f..34e486392e9bb5513d495b2751df748939242733 100644
--- a/gpu/gles2_conform_support/egl/display.cc
+++ b/gpu/gles2_conform_support/egl/display.cc
@@ -43,6 +43,21 @@ bool Display::IsValidConfig(EGLConfig config) {
return (config != NULL) && (config == config_.get());
}
+bool Display::ChooseConfigs(EGLConfig* configs,
+ EGLint config_size,
+ EGLint* num_config) {
+ // TODO(alokp): Find out a way to find all configs. CommandBuffer currently
+ // does not support finding or choosing configs.
+ *num_config = 1;
+ if (configs != NULL) {
+ if (config_ == NULL) {
+ config_.reset(new Config);
+ }
+ configs[0] = config_.get();
+ }
+ return true;
+}
+
bool Display::GetConfigs(EGLConfig* configs,
EGLint config_size,
EGLint* num_config) {
@@ -129,7 +144,22 @@ EGLSurface Display::CreateWindowSurface(EGLConfig config,
gl_context_->MakeCurrent(gl_surface_);
+ EGLint depth_size = 0;
+ EGLint alpha_size = 0;
+ EGLint stencil_size = 0;
+ GetConfigAttrib(config, EGL_DEPTH_SIZE, &depth_size);
+ GetConfigAttrib(config, EGL_ALPHA_SIZE, &alpha_size);
+ GetConfigAttrib(config, EGL_STENCIL_SIZE, &stencil_size);
std::vector<int32> attribs;
+ attribs.push_back(EGL_DEPTH_SIZE);
+ attribs.push_back(depth_size);
+ attribs.push_back(EGL_ALPHA_SIZE);
+ attribs.push_back(alpha_size);
+ attribs.push_back(EGL_STENCIL_SIZE);
+ attribs.push_back(stencil_size);
+ // TODO(gman): Insert attrib_list. Although ES 1.1 says it must be null
+ attribs.push_back(EGL_NONE);
+
if (!decoder_->Initialize(gl_surface_.get(),
gl_context_.get(),
gl_surface_->IsOffscreen(),
« no previous file with comments | « gpu/gles2_conform_support/egl/display.h ('k') | gpu/gles2_conform_support/egl/egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698