From f1f3c38908f7951745b5c16427e3f50dce6cb662 Mon Sep 17 00:00:00 2001 From: Stan Iliev Date: Thu, 9 Nov 2017 12:17:35 -0500 Subject: Use Skia API to detect if FP16 render buffer is supported Use Skia GrCaps to detect if we can render into a FP16 buffer. Exclude Extension class initialization from SkiaGL pipeline. Bug: 68383159 Test: Passed testWindowProducerCopyToRGBA16F on gce_x86_phone emu Change-Id: I3355bad891ed5403fbd94d18bb8ba110a3b77325 --- libs/hwui/Extensions.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'libs/hwui/Extensions.cpp') diff --git a/libs/hwui/Extensions.cpp b/libs/hwui/Extensions.cpp index b7f1fb21d8d7..530e82e65a28 100644 --- a/libs/hwui/Extensions.cpp +++ b/libs/hwui/Extensions.cpp @@ -31,11 +31,7 @@ namespace android { namespace uirenderer { Extensions::Extensions() { - if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaVulkan) { - // Extensions class is used only by OpenGL and SkiaGL pipelines - // The code below will crash for SkiaVulkan, because OpenGL is not initialized - // TODO: instantiate Extensions class only for OpenGL pipeline - // TODO: remove the only usage of Extensions by SkiaGL in SkiaOpenGLReadback::copyImageInto + if (Properties::isSkiaEnabled()) { return; } const char* version = (const char*)glGetString(GL_VERSION); -- cgit v1.2.3-59-g8ed1b