Hash :
0ab41fa5
Author :
Date :
2018-03-14T11:03:30
Add an EGL extension to disable GL extensions by default. BUG=angleproject:2404 Change-Id: I2667ddc92d5c9ef6e0ef115f2fdf0c3d3643d945 Reviewed-on: https://chromium-review.googlesource.com/962702 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
//
// Copyright 2018 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.
//
// RequestExtensionTest:
// Tests that extensions can be requested and are disabled by default when using
// EGL_ANGLE_request_extension
//
#include "test_utils/ANGLETest.h"
namespace angle
{
class RequestExtensionTest : public ANGLETest
{
protected:
RequestExtensionTest() { setExtensionsEnabled(false); }
};
// Test that a known requestable extension is disabled by default and make sure it can be requested
// if possible
TEST_P(RequestExtensionTest, ExtensionsDisabledByDefault)
{
EXPECT_TRUE(eglDisplayExtensionEnabled(getEGLWindow()->getDisplay(),
"EGL_ANGLE_create_context_extensions_enabled"));
EXPECT_FALSE(extensionEnabled("GL_OES_rgb8_rgba8"));
if (extensionRequestable("GL_OES_rgb8_rgba8"))
{
glRequestExtensionANGLE("GL_OES_rgb8_rgba8");
EXPECT_TRUE(extensionEnabled("GL_OES_rgb8_rgba8"));
}
}
// Use this to select which configurations (e.g. which renderer, which GLES major version) these
// tests should be run against.
ANGLE_INSTANTIATE_TEST(RequestExtensionTest,
ES2_D3D11(),
ES2_OPENGL(),
ES2_OPENGLES(),
ES2_VULKAN());
} // namespace angle