blast: Append "_legacy" to old buffer state values
As we move from BufferQueueLayer to BufferStateLayer, some
layer state fields are used by both layer types and some
are used exclusively by one type of layer. Append "_legacy"
to all fields that are NOT used by BufferStateLayer.
Bug: 80477568
Test: Transaction_test.cpp
Change-Id: Id8bf27f5b68c00592136e4336442a5d388f35779
diff --git a/services/surfaceflinger/BufferLayer.cpp b/services/surfaceflinger/BufferLayer.cpp
index 7246c8e..6484245 100644
--- a/services/surfaceflinger/BufferLayer.cpp
+++ b/services/surfaceflinger/BufferLayer.cpp
@@ -518,7 +518,7 @@
// FIXME: postedRegion should be dirty & bounds
// transform the dirty region to window-manager space
- return getTransform().transform(Region(Rect(s.active.w, s.active.h)));
+ return getTransform().transform(Region(Rect(s.active_legacy.w, s.active_legacy.h)));
}
// transaction
@@ -641,9 +641,9 @@
Transform t = getTransform();
Rect win = bounds;
- if (!s.finalCrop.isEmpty()) {
+ if (!s.finalCrop_legacy.isEmpty()) {
win = t.transform(win);
- if (!win.intersect(s.finalCrop, &win)) {
+ if (!win.intersect(s.finalCrop_legacy, &win)) {
win.clear();
}
win = t.inverse().transform(win);
@@ -652,10 +652,10 @@
}
}
- float left = float(win.left) / float(s.active.w);
- float top = float(win.top) / float(s.active.h);
- float right = float(win.right) / float(s.active.w);
- float bottom = float(win.bottom) / float(s.active.h);
+ float left = float(win.left) / float(s.active_legacy.w);
+ float top = float(win.top) / float(s.active_legacy.h);
+ float right = float(win.right) / float(s.active_legacy.w);
+ float bottom = float(win.bottom) / float(s.active_legacy.h);
// TODO: we probably want to generate the texture coords with the mesh
// here we assume that we only have 4 vertices