diff options
| author | Bo Liu <boliu@google.com> | 2019-01-23 20:59:00 -0800 |
|---|---|---|
| committer | Bo Liu <boliu@google.com> | 2019-01-24 14:04:58 -0800 |
| commit | b6da7f634f12972dac01a2ebeee2545b4c01dadd (patch) | |
| tree | 8ea6ea3b73f5a90112e2552ac843fb206f7a400f /libs/hwui/pipeline/skia/VkInteropFunctorDrawable.cpp | |
| parent | 07182c8622947e0407c6cd72fea4f6ab629f4b55 (diff) | |
Add color space params to webview gl functor
Bug: 111436479
Test: Compiles
Change-Id: I6713afbb871a5c7027bac1e0f52ce2a841f38e25
Diffstat (limited to 'libs/hwui/pipeline/skia/VkInteropFunctorDrawable.cpp')
| -rw-r--r-- | libs/hwui/pipeline/skia/VkInteropFunctorDrawable.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/hwui/pipeline/skia/VkInteropFunctorDrawable.cpp b/libs/hwui/pipeline/skia/VkInteropFunctorDrawable.cpp index c3563dbfd3cd..706325f00bd2 100644 --- a/libs/hwui/pipeline/skia/VkInteropFunctorDrawable.cpp +++ b/libs/hwui/pipeline/skia/VkInteropFunctorDrawable.cpp @@ -132,6 +132,7 @@ void VkInteropFunctorDrawable::onDraw(SkCanvas* canvas) { info.width = mFBInfo.width(); info.height = mFBInfo.height(); mat4.asColMajorf(&info.transform[0]); + info.color_space_ptr = canvas->imageInfo().colorSpace(); glViewport(0, 0, info.width, info.height); @@ -179,8 +180,8 @@ void VkInteropFunctorDrawable::onDraw(SkCanvas* canvas) { canvas->resetMatrix(); auto functorImage = SkImage::MakeFromAHardwareBuffer( - reinterpret_cast<AHardwareBuffer*>(mFrameBuffer.get()), kPremul_SkAlphaType, nullptr, - kBottomLeft_GrSurfaceOrigin); + reinterpret_cast<AHardwareBuffer*>(mFrameBuffer.get()), kPremul_SkAlphaType, + canvas->imageInfo().refColorSpace(), kBottomLeft_GrSurfaceOrigin); canvas->drawImage(functorImage, 0, 0, &paint); canvas->restore(); } |
