commit | 9f0835e72949f7ed0d7df35960047931a2051a2c | [log] [tgz] |
---|---|---|
author | Vishnu Nair <vishnun@google.com> | Fri Jan 07 09:33:19 2022 -0800 |
committer | Vishnu Nair <vishnun@google.com> | Tue Jan 11 13:27:20 2022 -0800 |
tree | 09e39f98f397114dac14a6bd1eeb412770fcb591 | |
parent | 1df8d38a3029b4f4da1a20a099936b37b510c4d1 [diff] [blame] |
SF: Make BufferData mockable Expose GraphicBuffer properties through the BufferData class so we can inject fake GraphicBuffers in transactions. This is required to recreate layer state from transaction traces without actually allocating buffers. Test: compiles Bug: 200284593 Change-Id: I74036cba1f544cbd045489fa5337d59ae4bdebcb
diff --git a/services/surfaceflinger/tests/unittests/TransactionProtoParserTest.cpp b/services/surfaceflinger/tests/unittests/TransactionProtoParserTest.cpp index 6e00748..271b1c0 100644 --- a/services/surfaceflinger/tests/unittests/TransactionProtoParserTest.cpp +++ b/services/surfaceflinger/tests/unittests/TransactionProtoParserTest.cpp
@@ -39,6 +39,7 @@ layer_state_t layer; layer.layerId = 6; layer.what = std::numeric_limits<uint64_t>::max(); + layer.what &= ~static_cast<uint64_t>(layer_state_t::eBufferChanged); layer.x = 7; layer.matrix.dsdx = 15;