Fix testWindowProducerCopyToRGBA16F test on x86 emulator
Fix readback to return correct error code on X86 emulator, when
half float pixel format is not supported.
Test: Ran and passed all CtsViewTestCases tests on x86 emulator
Bug: 68383159
Change-Id: Id66484b73488e2c8d29fbecbd45a97af285a0710
diff --git a/libs/hwui/Extensions.cpp b/libs/hwui/Extensions.cpp
index 6b8006c..115dcb6 100644
--- a/libs/hwui/Extensions.cpp
+++ b/libs/hwui/Extensions.cpp
@@ -31,10 +31,11 @@
namespace uirenderer {
Extensions::Extensions() {
- if (Properties::getRenderPipelineType() != RenderPipelineType::OpenGL) {
- //Extensions class is used only by OpenGL pipeline
+ 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
return;
}
const char* version = (const char*) glGetString(GL_VERSION);