blast: use frame instead of size and position

BufferStateLayers will have a source crop rect and destination
frame rect. The crop is the portion of the buffer that should be
displayed. The frame is where that portion of the buffer should
be displayed. The portion of the cropped buffer is scaled to fit
the frame.

Shader provided by romainguy@google.com.

Test: Transaction_test
Bug: 80477568

Change-Id: Ied3f3af2211132f79098aeb986292ee705a62219
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 4f63415..35ce6e3 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -59,6 +59,7 @@
     output.writeUint32(transform);
     output.writeBool(transformToDisplayInverse);
     output.write(crop);
+    output.write(frame);
     if (buffer) {
         output.writeBool(true);
         output.write(*buffer);
@@ -135,6 +136,7 @@
     transform = input.readUint32();
     transformToDisplayInverse = input.readBool();
     input.read(crop);
+    input.read(frame);
     buffer = new GraphicBuffer();
     if (input.readBool()) {
         input.read(*buffer);
@@ -322,6 +324,10 @@
         what |= eCropChanged;
         crop = other.crop;
     }
+    if (other.what & eFrameChanged) {
+        what |= eFrameChanged;
+        frame = other.frame;
+    }
     if (other.what & eBufferChanged) {
         what |= eBufferChanged;
         buffer = other.buffer;