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

Commit a05cafa1 authored by Sahil Dhanju's avatar Sahil Dhanju
Browse files

Renamed folder holding trace protobuf and updated

Updated SurfaceInterceptor include path for protobuf

Change-Id: Iad613857ccdb876621f6fc067bcdc5083e9557f3
parent 13beaf9e
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2016 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

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

LOCAL_SHARED_LIBRARIES := \
    libprotobuf-cpp-full

LOCAL_PROTOC_OPTIMIZE_TYPE := full

LOCAL_MODULE := libtrace_proto
LOCAL_MODULE_CLASS := STATIC_LIBRARIES

LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)

include $(BUILD_STATIC_LIBRARY)
+136 −0
Original line number Diff line number Diff line
syntax = "proto2";

message Trace {
    repeated Increment increment = 1;
}

message Increment {
    required int64 time_stamp       = 1;

    oneof increment {
        Transaction  transaction    = 2;
        Create       create         = 3;
        Delete       delete         = 4;
        BufferUpdate buffer_update  = 5;
        VSyncEvent   vsync_event    = 6;
    }
}

message Transaction {
    repeated Change change      = 1;

    required bool   synchronous = 2;
    required bool   animation   = 3;
}

message Change {
    required uint32 id = 1;

    oneof Change {
        PositionChange              position                   = 2;
        SizeChange                  size                       = 3;
        AlphaChange                 alpha                      = 4;
        LayerChange                 layer                      = 5;
        CropChange                  crop                       = 6;
        FinalCropChange             final_crop                 = 7;
        MatrixChange                matrix                     = 8;
        OverrideScalingModeChange   override_scaling_mode      = 9;
        TransparentRegionHintChange transparent_region_hint    = 10;
        LayerStackChange            layer_stack                = 11;
        HiddenFlagChange            hidden_flag                = 12;
        OpaqueFlagChange            opaque_flag                = 13;
        SecureFlagChange            secure_flag                = 14;
        DeferredTransactionChange   deferred_transaction       = 15;
    }
}

message PositionChange {
    required float x = 1;
    required float y = 2;
}

message SizeChange {
    required uint32 w = 1;
    required uint32 h = 2;
}

message AlphaChange {
    required float alpha = 1;
}

message LayerChange {
    required uint32 layer = 1;
}

message CropChange {
    required Rectangle rectangle = 1;
}

message FinalCropChange {
    required Rectangle rectangle = 1;
}

message MatrixChange {
    required float dsdx = 1;
    required float dtdx = 2;
    required float dsdy = 3;
    required float dtdy = 4;
}

message OverrideScalingModeChange {
    required int32 override_scaling_mode = 1;
}

message TransparentRegionHintChange {
    repeated Rectangle region = 1;
}

message LayerStackChange {
    required uint32 layer_stack = 1;
}

message HiddenFlagChange {
    required bool hidden_flag = 1;
}

message OpaqueFlagChange {
    required bool opaque_flag = 1;
}

message SecureFlagChange {
    required bool secure_flag = 1;
}

message DeferredTransactionChange {
    required uint32 layer_id     = 1;
    required uint64 frame_number = 2;
}

message Rectangle {
    required int32 left   = 1;
    required int32 top    = 2;
    required int32 right  = 3;
    required int32 bottom = 4;
}

message Create {
    required uint32 id    = 1;
    required string name  = 2;
    required uint32 w     = 3;
    required uint32 h     = 4;
}

message Delete {
    required uint32 id = 1;
}

message BufferUpdate {
    required uint32 id            = 1;
    required uint32 w             = 2;
    required uint32 h             = 3;
    required uint64 frame_number  = 4;
}

message VSyncEvent {
    required int64 when = 1;
}
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#ifndef ANDROID_SURFACEINTERCEPTOR_H
#define ANDROID_SURFACEINTERCEPTOR_H

#include <frameworks/native/cmds/surfacecapturereplay/proto/src/trace.pb.h>
#include <frameworks/native/cmds/surfacereplayer/proto/src/trace.pb.h>

#include <mutex>