summaryrefslogtreecommitdiff
path: root/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp
diff options
context:
space:
mode:
authorMatt Lee <matthewhlee@google.com>2022-06-10 14:38:28 -0700
committerMatt Lee <matthewhlee@google.com>2022-06-12 14:37:46 -0700
commit64c414abd49acc8d488837ab90b51d822c23e66d (patch)
tree4b0179f90f7e4ac9781fc0369db8695b0988f94d /libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp
parentd9f8ccd22e60b66ebdd23b67d0181eb3e049facb (diff)
parent88c2867016d1ded7f27fc34ec4d0ed6f9782e8dd (diff)
Merge s-mpr-2022-06
Change-Id: I3cbe7c92451e925d58baf7980a9d8556abebc56c
Diffstat (limited to 'libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp')
-rw-r--r--libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp10
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());