Fix crash in Vulkan pipeline at boot time

Fix a crash caused by calling OpenGL APIs with Vulkan pipeline
(likely a regression from ag/2706458).

Test: Ran CtsViewTestCases tests with SkiaGL pipeline.
Change-Id: Ibabeb4229ef88de57c99f2961a10a68ca71b25ab
diff --git a/libs/hwui/Extensions.cpp b/libs/hwui/Extensions.cpp
index 1e71cb0..6b8006c 100644
--- a/libs/hwui/Extensions.cpp
+++ b/libs/hwui/Extensions.cpp
@@ -31,6 +31,12 @@
 namespace uirenderer {
 
 Extensions::Extensions() {
+    if (Properties::getRenderPipelineType() != RenderPipelineType::OpenGL) {
+        //Extensions class is used only by OpenGL pipeline
+        //The code below will crash for SkiaVulkan, because OpenGL is not initialized
+        //TODO: instantiate Extensions class only for OpenGL pipeline
+        return;
+    }
     const char* version = (const char*) glGetString(GL_VERSION);
 
     // Section 6.1.5 of the OpenGL ES specification indicates the GL version