diff options
author | ullysses.a.eoff <ullysses.a.eoff@intel.com> | 2014-10-08 21:36:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-09 04:36:48 +0000 |
commit | fbba679b43d6df314321543541dfce39789593b4 (patch) | |
tree | 4a4ac6e3464df7945e21d262502438fc1605709f /gpu/khronos_glcts_support | |
parent | 75a8773ddb966da100bcef7301578205c54cb12a (diff) | |
download | chromium_src-fbba679b43d6df314321543541dfce39789593b4.zip chromium_src-fbba679b43d6df314321543541dfce39789593b4.tar.gz chromium_src-fbba679b43d6df314321543541dfce39789593b4.tar.bz2 |
gpu/khronos_glcts_support: override Surface getWidth/Height
The GL-CTS default Surface getWidth/Height implementation calls
eglQuerySurface() to retrieve the surface's size and uses this
information to create it's tcuRenderTarget object. However, we
don't implement the eglQuerySurface() and thus the tcuRenderTarget
gets the wrong surface size. This resulted in several test
failures.
Add our own derived Surface class and override the getWidth/Height
methods to return the correct size.
BUG=chromium:412865
R=kbr@chromium.org, piman@chromium.org
TEST=Build and run the khronos_glcts_test binary
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Review URL: https://codereview.chromium.org/634323002
Cr-Commit-Position: refs/heads/master@{#298766}
Diffstat (limited to 'gpu/khronos_glcts_support')
-rw-r--r-- | gpu/khronos_glcts_support/native/egl_native_windowless.cc | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/gpu/khronos_glcts_support/native/egl_native_windowless.cc b/gpu/khronos_glcts_support/native/egl_native_windowless.cc index ac0e908..1a575a5 100644 --- a/gpu/khronos_glcts_support/native/egl_native_windowless.cc +++ b/gpu/khronos_glcts_support/native/egl_native_windowless.cc @@ -14,6 +14,29 @@ namespace egl { namespace native { namespace windowless { +class Surface : public tcu::egl::WindowSurface { + public: + Surface(tcu::egl::Display& display, + EGLConfig config, + const EGLint* attribList, + int width, + int height) + : tcu::egl::WindowSurface(display, + config, + (EGLNativeWindowType)NULL, + attribList), + width_(width), + height_(height) {} + + int getWidth() const { return width_; } + + int getHeight() const { return height_; } + + private: + const int width_; + const int height_; +}; + class Window : public tcu::NativeWindow { public: Window(tcu::egl::Display& display, @@ -23,19 +46,19 @@ class Window : public tcu::NativeWindow { int height) : tcu::NativeWindow::NativeWindow(), eglDisplay_(display), - eglSurface_(display, config, (EGLNativeWindowType)NULL, attribList) {} + surface_(display, config, attribList, width, height) {} virtual ~Window() {} tcu::egl::Display& getEglDisplay() { return eglDisplay_; } - tcu::egl::WindowSurface& getEglSurface() { return eglSurface_; } + tcu::egl::WindowSurface& getEglSurface() { return surface_; } void processEvents() { return; } private: tcu::egl::Display& eglDisplay_; - tcu::egl::WindowSurface eglSurface_; + Surface surface_; }; class Platform : public tcu::EglPlatform { |