diff options
author | Yimin Li <ymli@google.com> | 2022-04-26 11:30:52 -0700 |
---|---|---|
committer | Yimin Li <ymli@google.com> | 2022-04-26 11:30:52 -0700 |
commit | d98c705d72ecad9992ed742179bb7766830fe77f (patch) | |
tree | 8f61f28994029a4d1c22abebb56ca5bfd1b781ed /libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp | |
parent | df2432ce367e2612283a590b3b99e67100b2fefb (diff) | |
parent | 730f2e8ea1589d133876f08529c43d0727a67c3c (diff) |
Merge commit '730f2e8ea1589d133876f08529c43d0727a67c3c' of sso://googleplex-android/platform/frameworks/base into HEAD
Change-Id: Id517c457139546c0da7121db1f458a534a2b798d
Diffstat (limited to 'libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp')
-rw-r--r-- | libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp index 0e4a1f945b85..99fd463b0660 100644 --- a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp @@ -74,7 +74,15 @@ bool SkiaVulkanPipeline::draw(const Frame& frame, const SkRect& screenDirty, con if (backBuffer.get() == nullptr) { return false; } - LightingInfo::updateLighting(lightGeometry, lightInfo); + + // update the coordinates of the global light position based on surface rotation + SkPoint lightCenter = mVkSurface->getCurrentPreTransform().mapXY(lightGeometry.center.x, + lightGeometry.center.y); + LightGeometry localGeometry = lightGeometry; + localGeometry.center.x = lightCenter.fX; + localGeometry.center.y = lightCenter.fY; + + LightingInfo::updateLighting(localGeometry, lightInfo); renderFrame(*layerUpdateQueue, dirty, renderNodes, opaque, contentDrawBounds, backBuffer, mVkSurface->getCurrentPreTransform()); |