summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMika Isojärvi <misojarvi@google.com>2016-02-19 11:49:55 -0800
committerMika Isojärvi <misojarvi@google.com>2016-02-19 12:44:14 -0800
commit922a9f4dc244825434a2b3113a28a0d2851555c7 (patch)
tree49d6093d4b539c4b7b8cb27b854665bb7e835b8d
parent921259c6f01b9a70baf7b2d4701258fcdf53dd47 (diff)
downloadVK-GL-CTS-922a9f4dc244825434a2b3113a28a0d2851555c7.tar.gz
VK-GL-CTS-922a9f4dc244825434a2b3113a28a0d2851555c7.tar.bz2
VK-GL-CTS-922a9f4dc244825434a2b3113a28a0d2851555c7.zip
Improve egluNativeDisplay.
- Properly throw NotSupportedError() in all methods that implementation doesn't support. - Add comments to better describe when InternalError is thrown. Change-Id: I614da6793716d3a592089e863a87d2211f5811db
-rw-r--r--framework/egl/egluNativeDisplay.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/framework/egl/egluNativeDisplay.cpp b/framework/egl/egluNativeDisplay.cpp
index 8f7af558c..4a0aa1657 100644
--- a/framework/egl/egluNativeDisplay.cpp
+++ b/framework/egl/egluNativeDisplay.cpp
@@ -55,20 +55,26 @@ NativeDisplay::~NativeDisplay (void)
EGLNativeDisplayType NativeDisplay::getLegacyNative (void)
{
+ // If NativeDisplay claims to support CAPABILITY_GET_DISPLAY_LEGACY then
+ // this method must be implemented.
TCU_CHECK_INTERNAL((m_capabilities & CAPABILITY_GET_DISPLAY_LEGACY) == 0);
- throw tcu::NotSupportedError("eglu::NativeDisplay can't be used with eglGetDisplay()", DE_NULL, __FILE__, __LINE__);
+ TCU_THROW(NotSupportedError, "eglu::NativeDisplay can't be used with eglGetDisplay()");
}
void* NativeDisplay::getPlatformNative (void)
{
+ // If NativeDisplay claims to support CAPABILITY_GET_DISPLAY_PLATFORM then
+ // this method must be implemented.
TCU_CHECK_INTERNAL((m_capabilities & CAPABILITY_GET_DISPLAY_PLATFORM) == 0);
- throw tcu::NotSupportedError("eglu::NativeDisplay can't be used with eglGetPlatformDisplay()", DE_NULL, __FILE__, __LINE__);
+ TCU_THROW(NotSupportedError, "eglu::NativeDisplay can't be used with eglGetPlatformDisplay()");
}
const EGLAttrib* NativeDisplay::getPlatformAttributes (void) const
{
+ // If NativeDisplay claims to support CAPABILITY_GET_DISPLAY_PLATFORM then
+ // this method must be implemented.
TCU_CHECK_INTERNAL((m_capabilities & CAPABILITY_GET_DISPLAY_PLATFORM) == 0);
- return DE_NULL;
+ TCU_THROW(NotSupportedError, "eglu::NativeDisplay can't be used with eglGetPlatformDisplay()");
}
// NativeDisplayFactory