SF: Save proto traces to a specific path
Test: presubmit
Bug: 200284593
Change-Id: I6987329cc32b2ca13e76e957a5ae6b17bbed6e83
diff --git a/services/surfaceflinger/LayerProtoHelper.cpp b/services/surfaceflinger/LayerProtoHelper.cpp
index 015caa6..3bd0643 100644
--- a/services/surfaceflinger/LayerProtoHelper.cpp
+++ b/services/surfaceflinger/LayerProtoHelper.cpp
@@ -156,14 +156,14 @@
void LayerProtoHelper::writeToProto(const renderengine::ExternalTexture& buffer,
std::function<ActiveBufferProto*()> getActiveBufferProto) {
- if (buffer.getBuffer()->getWidth() != 0 || buffer.getBuffer()->getHeight() != 0 ||
- buffer.getBuffer()->getUsage() != 0 || buffer.getBuffer()->getPixelFormat() != 0) {
+ if (buffer.getWidth() != 0 || buffer.getHeight() != 0 || buffer.getUsage() != 0 ||
+ buffer.getPixelFormat() != 0) {
// Use a lambda do avoid writing the object header when the object is empty
ActiveBufferProto* activeBufferProto = getActiveBufferProto();
- activeBufferProto->set_width(buffer.getBuffer()->getWidth());
- activeBufferProto->set_height(buffer.getBuffer()->getHeight());
- activeBufferProto->set_format(buffer.getBuffer()->getPixelFormat());
- activeBufferProto->set_usage(buffer.getBuffer()->getUsage());
+ activeBufferProto->set_width(buffer.getWidth());
+ activeBufferProto->set_height(buffer.getHeight());
+ activeBufferProto->set_stride(buffer.getUsage());
+ activeBufferProto->set_format(buffer.getPixelFormat());
}
}