Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60a2eb0b authored by Colin Cross's avatar Colin Cross Committed by Android (Google) Code Review
Browse files

Merge "Replace surfaceflinger protobufs with protobuf-lite"

parents ecbfb9c9 63549381
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -18,10 +18,7 @@ include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(call all-proto-files-under, src)

LOCAL_SHARED_LIBRARIES := \
    libprotobuf-cpp-full

LOCAL_PROTOC_OPTIMIZE_TYPE := full
LOCAL_PROTOC_OPTIMIZE_TYPE := lite

LOCAL_MODULE := libtrace_proto
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+1 −0
Original line number Diff line number Diff line
syntax = "proto2";
option optimize_for = LITE_RUNTIME;

message Trace {
    repeated Increment increment = 1;
+3 −2
Original line number Diff line number Diff line
@@ -40,7 +40,8 @@ LOCAL_SHARED_LIBRARIES := \
    libgui \
    libui \
    libutils \
    libprotobuf-cpp-full \
    libprotobuf-cpp-lite \
    libbase \

LOCAL_STATIC_LIBRARIES := \
    libtrace_proto \
@@ -57,7 +58,7 @@ LOCAL_SRC_FILES := \
    Main.cpp \

LOCAL_SHARED_LIBRARIES := \
    libprotobuf-cpp-full \
    libprotobuf-cpp-lite \
    libsurfacereplayer \
    libutils \

+9 −3
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@

#include <android/native_window.h>

#include <android-base/file.h>

#include <binder/IMemory.h>

#include <gui/BufferQueue.h>
@@ -61,11 +63,15 @@ Replayer::Replayer(const std::string& filename, bool replayManually, int numThre
        mStopTimeStamp(stopHere) {
    srand(RAND_COLOR_SEED);

    std::fstream input(filename, std::ios::in | std::ios::binary);
    std::string input;
    if (!android::base::ReadFileToString(filename, &input, true)) {
        std::cerr << "Trace did not load. Does " << filename << " exist?" << std::endl;
        abort();
    }

    mLoaded = mTrace.ParseFromIstream(&input);
    mLoaded = mTrace.ParseFromString(input);
    if (!mLoaded) {
        std::cerr << "Trace did not load. Does " << filename << " exist?" << std::endl;
        std::cerr << "Trace did not load." << std::endl;
        abort();
    }

+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ LOCAL_SHARED_LIBRARIES := \
    libgui \
    libpowermanager \
    libvulkan \
    libprotobuf-cpp-full \
    libprotobuf-cpp-lite \
    libhidl \
    libhwbinder \
    libbase \
Loading