Merge "Update the global light position based on the rotation of the surface." into sc-v2-dev am: f0f218dd01
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17539864 Change-Id: Idae2cf9e5b9abf1303b4f7093ef610e0c089fd67 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -74,7 +74,15 @@ bool SkiaVulkanPipeline::draw(const Frame& frame, const SkRect& screenDirty, con
|
|||||||
if (backBuffer.get() == nullptr) {
|
if (backBuffer.get() == nullptr) {
|
||||||
return false;
|
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,
|
renderFrame(*layerUpdateQueue, dirty, renderNodes, opaque, contentDrawBounds, backBuffer,
|
||||||
mVkSurface->getCurrentPreTransform());
|
mVkSurface->getCurrentPreTransform());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user