summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Robert Carr <racarr@google.com> 2017-01-10 16:42:54 -0800
committer Robert Carr <racarr@google.com> 2017-02-27 10:20:10 -0800
commit0d48072f6047140119ff194c1194ce402fca2c0b (patch)
tree3db72861fcac7b9a1622d3f7d75d54bcba2e22b3 /libs/gui/LayerState.cpp
parente7f1979d8180ff9ab10422da2020e77fafe8d7d6 (diff)
Add deferTransaction variant taking GraphicBufferProducer.
For SurfaceView using child layers, the client framework will not have access to the Handle* for the parent surface, but still needs a way to defer transactions to it's frames. Test: Tested with corresponding SurfaceView modifications and existing tests. Change-Id: I6f01c360e85a95ff0ab08db406741221152e5d5c
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r--libs/gui/LayerState.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index bb552aa67c..2461cba152 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -39,10 +39,11 @@ status_t layer_state_t::write(Parcel& output) const
output.writeInplace(sizeof(layer_state_t::matrix22_t))) = matrix;
output.write(crop);
output.write(finalCrop);
- output.writeStrongBinder(handle);
+ output.writeStrongBinder(barrierHandle);
output.writeStrongBinder(reparentHandle);
output.writeUint64(frameNumber);
output.writeInt32(overrideScalingMode);
+ output.writeStrongBinder(IInterface::asBinder(barrierGbp));
output.write(transparentRegion);
return NO_ERROR;
}
@@ -68,10 +69,12 @@ status_t layer_state_t::read(const Parcel& input)
}
input.read(crop);
input.read(finalCrop);
- handle = input.readStrongBinder();
+ barrierHandle = input.readStrongBinder();
reparentHandle = input.readStrongBinder();
frameNumber = input.readUint64();
overrideScalingMode = input.readInt32();
+ barrierGbp =
+ interface_cast<IGraphicBufferProducer>(input.readStrongBinder());
input.read(transparentRegion);
return NO_ERROR;
}