summaryrefslogtreecommitdiff
path: root/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-17 21:05:24 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-17 21:05:24 +0000
commit88c2867016d1ded7f27fc34ec4d0ed6f9782e8dd (patch)
tree8f61f28994029a4d1c22abebb56ca5bfd1b781ed /libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp
parent06ca133bd9f0e275e6ec652d6b00ef471b9a80c8 (diff)
parentd98c705d72ecad9992ed742179bb7766830fe77f (diff)
Snap for 8589293 from d98c705d72ecad9992ed742179bb7766830fe77f to sc-v2-platform-release
Change-Id: I7480354c425fd8808badfd0bc760bdeb05232ad0
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());