Commit 3501c165 by Nicolas Capens

Make available EGL surface parameters queryable.

BUG=angle:331 Change-Id: Idb3c3ddc6ddd6bfc21b15b7e8942975ce4cd051f Reviewed-on: https://chromium-review.googlesource.com/200811Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarNicolas Capens <nicolascapens@chromium.org>
parent 893ab087
//
// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
......@@ -362,16 +362,6 @@ bool Surface::postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height)
return swapRect(x, y, width, height);
}
EGLint Surface::getWidth() const
{
return mWidth;
}
EGLint Surface::getHeight() const
{
return mHeight;
}
EGLint Surface::isPostSubBufferSupported() const
{
return mPostSubBufferSupported;
......@@ -396,6 +386,36 @@ void Surface::setSwapInterval(EGLint interval)
mSwapIntervalDirty = true;
}
EGLint Surface::getConfigID() const
{
return mConfig->mConfigID;
}
EGLint Surface::getWidth() const
{
return mWidth;
}
EGLint Surface::getHeight() const
{
return mHeight;
}
EGLint Surface::getPixelAspectRatio() const
{
return mPixelAspectRatio;
}
EGLenum Surface::getRenderBuffer() const
{
return mRenderBuffer;
}
EGLenum Surface::getSwapBehavior() const
{
return mSwapBehavior;
}
EGLenum Surface::getTextureFormat() const
{
return mTextureFormat;
......
//
// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
......@@ -47,9 +47,6 @@ class Surface
bool swap();
bool postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height);
virtual EGLint getWidth() const;
virtual EGLint getHeight() const;
virtual EGLint isPostSubBufferSupported() const;
virtual rx::SwapChain *getSwapChain() const;
......@@ -57,6 +54,12 @@ class Surface
void setSwapInterval(EGLint interval);
bool checkForOutOfDateSwapChain(); // Returns true if swapchain changed due to resize or interval update
virtual EGLint getConfigID() const;
virtual EGLint getWidth() const;
virtual EGLint getHeight() const;
virtual EGLint getPixelAspectRatio() const;
virtual EGLenum getRenderBuffer() const;
virtual EGLenum getSwapBehavior() const;
virtual EGLenum getTextureFormat() const;
virtual EGLenum getTextureTarget() const;
virtual EGLenum getFormat() const;
......
//
// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
......@@ -427,7 +427,7 @@ EGLBoolean __stdcall eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint
UNIMPLEMENTED(); // FIXME
break;
case EGL_CONFIG_ID:
UNIMPLEMENTED(); // FIXME
*value = eglSurface->getConfigID();
break;
case EGL_HEIGHT:
*value = eglSurface->getHeight();
......@@ -448,19 +448,19 @@ EGLBoolean __stdcall eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLint
UNIMPLEMENTED(); // FIXME
break;
case EGL_PIXEL_ASPECT_RATIO:
UNIMPLEMENTED(); // FIXME
*value = eglSurface->getPixelAspectRatio();
break;
case EGL_RENDER_BUFFER:
UNIMPLEMENTED(); // FIXME
*value = eglSurface->getRenderBuffer();
break;
case EGL_SWAP_BEHAVIOR:
UNIMPLEMENTED(); // FIXME
*value = eglSurface->getSwapBehavior();
break;
case EGL_TEXTURE_FORMAT:
UNIMPLEMENTED(); // FIXME
*value = eglSurface->getTextureFormat();
break;
case EGL_TEXTURE_TARGET:
UNIMPLEMENTED(); // FIXME
*value = eglSurface->getTextureTarget();
break;
case EGL_VERTICAL_RESOLUTION:
UNIMPLEMENTED(); // FIXME
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment