summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/EglManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderthread/EglManager.cpp')
-rw-r--r--libs/hwui/renderthread/EglManager.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp
index beaa85e1e2ad..de95bee39763 100644
--- a/libs/hwui/renderthread/EglManager.cpp
+++ b/libs/hwui/renderthread/EglManager.cpp
@@ -30,6 +30,10 @@
#include <gl/GrGLInterface.h>
#include <string>
+#ifdef HWUI_GLES_WRAP_ENABLED
+#include "debug/GlesDriver.h"
+#endif
+
#define GLES_VERSION 2
// Android-specific addition that is used to show when frames began in systrace
@@ -131,7 +135,12 @@ void EglManager::initialize() {
mRenderThread.renderState().onGLContextCreated();
if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaGL) {
+#ifdef HWUI_GLES_WRAP_ENABLED
+ debug::GlesDriver* driver = debug::GlesDriver::get();
+ sk_sp<const GrGLInterface> glInterface(driver->getSkiaInterface());
+#else
sk_sp<const GrGLInterface> glInterface(GrGLCreateNativeInterface());
+#endif
LOG_ALWAYS_FATAL_IF(!glInterface.get());
GrContextOptions options;