Loading libs/hwui/Extensions.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ Extensions::Extensions() { mHas1BitStencil = extensions.has("GL_OES_stencil1"); mHas4BitStencil = extensions.has("GL_OES_stencil4"); mHasUnpackSubImage = extensions.has("GL_EXT_unpack_subimage"); mHasRenderableFloatTexture = extensions.has("GL_OES_texture_half_float"); mHasSRGB = mVersionMajor >= 3 || extensions.has("GL_EXT_sRGB"); mHasSRGBWriteControl = extensions.has("GL_EXT_sRGB_write_control"); Loading libs/hwui/Extensions.h +4 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ public: inline bool hasPixelBufferObjects() const { return mVersionMajor >= 3; } inline bool hasOcclusionQueries() const { return mVersionMajor >= 3; } inline bool hasFloatTextures() const { return mVersionMajor >= 3; } inline bool hasRenderableFloatTextures() const { return (mVersionMajor >= 3 && mVersionMinor >= 2) || mHasRenderableFloatTexture; } inline bool hasSRGB() const { return mHasSRGB; } inline bool hasSRGBWriteControl() const { return hasSRGB() && mHasSRGBWriteControl; } inline bool hasLinearBlending() const { return hasSRGB() && mHasLinearBlending; } Loading @@ -56,6 +59,7 @@ private: bool mHasSRGB; bool mHasSRGBWriteControl; bool mHasLinearBlending; bool mHasRenderableFloatTexture; int mVersionMajor; int mVersionMinor; Loading libs/hwui/OpenGLReadback.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -128,7 +128,8 @@ inline CopyResult copyTextureInto(Caches& caches, RenderState& renderState, return CopyResult::DestinationInvalid; } if (bitmap->colorType() == kRGBA_F16_SkColorType && !caches.extensions().hasFloatTextures()) { if (bitmap->colorType() == kRGBA_F16_SkColorType && !caches.extensions().hasRenderableFloatTextures()) { ALOGW("Can't copy surface into bitmap, RGBA_F16 config is not supported"); return CopyResult::DestinationInvalid; } Loading libs/hwui/pipeline/skia/SkiaOpenGLReadback.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ CopyResult SkiaOpenGLReadback::copyImageInto(EGLImageKHR eglImage, const Matrix4 * for reading back float buffers (skbug.com/6945). */ if (pixelConfig == kRGBA_half_GrPixelConfig && !DeviceInfo::get()->extensions().hasFloatTextures()) { !DeviceInfo::get()->extensions().hasRenderableFloatTextures()) { ALOGW("Can't copy surface into bitmap, RGBA_F16 config is not supported"); return CopyResult::DestinationInvalid; } Loading Loading
libs/hwui/Extensions.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ Extensions::Extensions() { mHas1BitStencil = extensions.has("GL_OES_stencil1"); mHas4BitStencil = extensions.has("GL_OES_stencil4"); mHasUnpackSubImage = extensions.has("GL_EXT_unpack_subimage"); mHasRenderableFloatTexture = extensions.has("GL_OES_texture_half_float"); mHasSRGB = mVersionMajor >= 3 || extensions.has("GL_EXT_sRGB"); mHasSRGBWriteControl = extensions.has("GL_EXT_sRGB_write_control"); Loading
libs/hwui/Extensions.h +4 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ public: inline bool hasPixelBufferObjects() const { return mVersionMajor >= 3; } inline bool hasOcclusionQueries() const { return mVersionMajor >= 3; } inline bool hasFloatTextures() const { return mVersionMajor >= 3; } inline bool hasRenderableFloatTextures() const { return (mVersionMajor >= 3 && mVersionMinor >= 2) || mHasRenderableFloatTexture; } inline bool hasSRGB() const { return mHasSRGB; } inline bool hasSRGBWriteControl() const { return hasSRGB() && mHasSRGBWriteControl; } inline bool hasLinearBlending() const { return hasSRGB() && mHasLinearBlending; } Loading @@ -56,6 +59,7 @@ private: bool mHasSRGB; bool mHasSRGBWriteControl; bool mHasLinearBlending; bool mHasRenderableFloatTexture; int mVersionMajor; int mVersionMinor; Loading
libs/hwui/OpenGLReadback.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -128,7 +128,8 @@ inline CopyResult copyTextureInto(Caches& caches, RenderState& renderState, return CopyResult::DestinationInvalid; } if (bitmap->colorType() == kRGBA_F16_SkColorType && !caches.extensions().hasFloatTextures()) { if (bitmap->colorType() == kRGBA_F16_SkColorType && !caches.extensions().hasRenderableFloatTextures()) { ALOGW("Can't copy surface into bitmap, RGBA_F16 config is not supported"); return CopyResult::DestinationInvalid; } Loading
libs/hwui/pipeline/skia/SkiaOpenGLReadback.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ CopyResult SkiaOpenGLReadback::copyImageInto(EGLImageKHR eglImage, const Matrix4 * for reading back float buffers (skbug.com/6945). */ if (pixelConfig == kRGBA_half_GrPixelConfig && !DeviceInfo::get()->extensions().hasFloatTextures()) { !DeviceInfo::get()->extensions().hasRenderableFloatTextures()) { ALOGW("Can't copy surface into bitmap, RGBA_F16 config is not supported"); return CopyResult::DestinationInvalid; } Loading