Control Debug layers in ANGLE_platform_angle.

Debug layers seem to be a universal thing among functional back-ends.
D3D, OpenGL and Vulkan all need some kind of controls for debugging,
so it seems to make sense to make this control part of the base
extension.

Default the extension to EGL_DONT_CARE, which allows the back-end to
have a lot of flexibility in terms of implementation.

Also enable the extension in the D3D11 and OpenGL back-ends, and set
the extension to enabled for angle_end2end_tests.

Remove EGLVulkanEXTTest since it no longer tests anything not tested
in the base ANGLETest class.

BUG=angleproject:2086

Change-Id: I52d8170effd1846b9afbe6e4052c699fe5cb0de8
Reviewed-on: https://chromium-review.googlesource.com/578369
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
diff --git a/src/libANGLE/renderer/renderer_utils.cpp b/src/libANGLE/renderer/renderer_utils.cpp
index 863953b..8109a56 100644
--- a/src/libANGLE/renderer/renderer_utils.cpp
+++ b/src/libANGLE/renderer/renderer_utils.cpp
@@ -12,6 +12,7 @@
 #include "image_util/copyimage.h"
 #include "image_util/imageformats.h"
 
+#include "libANGLE/AttributeMap.h"
 #include "libANGLE/formatutils.h"
 #include "libANGLE/renderer/Format.h"
 
@@ -300,4 +301,17 @@
     return nullptr;
 }
 
+bool ShouldUseDebugLayers(const egl::AttributeMap &attribs)
+{
+    EGLAttrib debugSetting =
+        attribs.get(EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED_ANGLE, EGL_DONT_CARE);
+
+// Prefer to enable debug layers if compiling in Debug, and disabled in Release.
+#if !defined(NDEBUG)
+    return (debugSetting != EGL_FALSE);
+#else
+    return (debugSetting == EGL_TRUE);
+#endif  // !defined(NDEBUG)
+}
+
 }  // namespace rx