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

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

Issue 2031007: Do not ask user to press Fail button if pixmap to texture test fails because GLX is older than 1.3. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: 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
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 "base/logging.h" 7 #include "base/logging.h"
8 8
9 #include "main.h" 9 #include "main.h"
10 #include "xlib_window.h" 10 #include "xlib_window.h"
(...skipping 25 matching lines...) Expand all
36 pixmap_(0), 36 pixmap_(0),
37 init_succeeded(false) {} 37 init_succeeded(false) {}
38 38
39 39
40 bool PixmapToTextureTest::InitNative() { 40 bool PixmapToTextureTest::InitNative() {
41 int major = 0; 41 int major = 0;
42 int minor = 0; 42 int minor = 0;
43 if (!glXQueryVersion(g_xlib_display, &major, &minor)) 43 if (!glXQueryVersion(g_xlib_display, &major, &minor))
44 return false; 44 return false;
45 45
46 if (major < 1 || (major == 1 && minor < 3)) 46 if (major < 1 || (major == 1 && minor < 3)) {
47 printf("# GLX 1.3 required for pixmap to texture extension.\n");
47 return false; 48 return false;
49 }
48 50
49 if (!glXBindTexImageEXT) 51 if (!glXBindTexImageEXT)
50 return false; 52 return false;
51 53
52 pixmap_ = AllocatePixmap(); 54 pixmap_ = AllocatePixmap();
53 55
54 int rgba, rgb; 56 int rgba, rgb;
55 glXGetFBConfigAttrib(g_xlib_display, g_glx_fbconfig, 57 glXGetFBConfigAttrib(g_xlib_display, g_glx_fbconfig,
56 GLX_BIND_TO_TEXTURE_RGBA_EXT, &rgba); 58 GLX_BIND_TO_TEXTURE_RGBA_EXT, &rgba);
57 glXGetFBConfigAttrib(g_xlib_display, g_glx_fbconfig, 59 glXGetFBConfigAttrib(g_xlib_display, g_glx_fbconfig,
(...skipping 30 matching lines...) Expand all
88 return true; 90 return true;
89 } 91 }
90 92
91 93
92 void PixmapToTextureTest::Stop() { 94 void PixmapToTextureTest::Stop() {
93 glXReleaseTexImageEXT(g_xlib_display, glxpixmap_, GLX_FRONT_LEFT_EXT); 95 glXReleaseTexImageEXT(g_xlib_display, glxpixmap_, GLX_FRONT_LEFT_EXT);
94 glFinish(); 96 glFinish();
95 glXDestroyPixmap(g_xlib_display, glxpixmap_); 97 glXDestroyPixmap(g_xlib_display, glxpixmap_);
96 XFreePixmap(g_xlib_display, pixmap_); 98 XFreePixmap(g_xlib_display, pixmap_);
97 } 99 }
OLDNEW
« no previous file with comments | « client/deps/glbench/src/teartest.cc ('k') | client/site_tests/graphics_TearTest/graphics_TearTest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698