diff options
| author | 2022-04-04 23:06:28 +0000 | |
|---|---|---|
| committer | 2022-04-04 23:06:28 +0000 | |
| commit | 4ccc1b83f7787207ec09493ea210ed0e8b76acaf (patch) | |
| tree | 2d55abae4bdbe912ba347d402f08cdd3c363d9b5 | |
| parent | 21091362480b3be00a1b7828ffbd48994eb0a1c0 (diff) | |
| parent | f0f218dd01c1bab8d383a119ef20e8f46d72d0b9 (diff) | |
Snap for 8404404 from f0f218dd01c1bab8d383a119ef20e8f46d72d0b9 to sc-qpr3-release
Change-Id: Ic3c1a5cb086cbdabf266f4a03c5e0ca02509ec4f
| -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()); |