diff options
| author | 2022-06-16 18:51:54 +0000 | |
|---|---|---|
| committer | 2022-06-16 18:51:54 +0000 | |
| commit | 195b02b57078545f152bfa2d6643cb197f12d07f (patch) | |
| tree | d066971dbc27f82b7c280deb28bc241bac33c9dd /libs/hwui | |
| parent | 5a1f9e675b10b3bf150f64c85068b8a1f1026d57 (diff) | |
| parent | 6811cf790c32b0fe5016a5e2ecb7ec10f2d71a01 (diff) | |
Merge "Merge Android 12 QPR 3"
Diffstat (limited to 'libs/hwui')
| -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()); |