diff options
| author | Derek Sollenberger <djsollen@google.com> | 2019-01-22 13:56:25 -0500 |
|---|---|---|
| committer | Derek Sollenberger <djsollen@google.com> | 2019-01-23 16:31:52 -0500 |
| commit | 6e35e63740e9becb0976f3dc54ea0cd5ffc26564 (patch) | |
| tree | 28ed578f4c0d437261904bcc27f401981dbd4f6e /libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp | |
| parent | 38c8934b67d7cb2904b25eaa422a7b56160dcfae (diff) | |
Don't assume all FP16 bitmaps are linearly encoded.
The bitmap.create() function that does not take a colorspace does
not enforce that the bitmap is linearly encoded and as such it is
possible for us to end up with FP16 bitmaps that are sRGB encoded.
Given that we want to remove that restriction (see b/120870651)
we update getColorSpace to report the actual colorSpace of the
underlying bitmap. This pulls a thread that causes a chain of
updates to various classes to ensure proper handling of the native
colorspace.
Bug: 120904891
Test: CtsUiRenderingTestCases
Change-Id: I27780aa603138b0e48f9320c2837bc53e22cdf95
Diffstat (limited to 'libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp')
| -rw-r--r-- | libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp index 53495a7d62c0..20fbab3e8587 100644 --- a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp @@ -149,20 +149,8 @@ void SkiaVulkanPipeline::invokeFunctor(const RenderThread& thread, Functor* func sk_sp<Bitmap> SkiaVulkanPipeline::allocateHardwareBitmap(renderthread::RenderThread& renderThread, SkBitmap& skBitmap) { - // TODO: implement this function for Vulkan pipeline - // code below is a hack to avoid crashing because of missing HW Bitmap support - sp<GraphicBuffer> buffer = new GraphicBuffer( - skBitmap.info().width(), skBitmap.info().height(), PIXEL_FORMAT_RGBA_8888, - GraphicBuffer::USAGE_HW_TEXTURE | GraphicBuffer::USAGE_SW_WRITE_NEVER | - GraphicBuffer::USAGE_SW_READ_NEVER, - std::string("SkiaVulkanPipeline::allocateHardwareBitmap pid [") + - std::to_string(getpid()) + "]"); - status_t error = buffer->initCheck(); - if (error < 0) { - ALOGW("SkiaVulkanPipeline::allocateHardwareBitmap() failed in GraphicBuffer.create()"); - return nullptr; - } - return Bitmap::createFrom(buffer, skBitmap.refColorSpace()); + LOG_ALWAYS_FATAL("Unimplemented"); + return nullptr; } } /* namespace skiapipeline */ |
