1/* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package perfetto.protos; 20 21// Custom configuration for the "android.surfaceflinger.layers" data source. 22message SurfaceFlingerLayersConfig { 23 enum Mode { 24 MODE_UNSPECIFIED = 0; 25 26 // Trace layers snapshots. A snapshot is taken every time a layers change 27 // occurs. 28 MODE_ACTIVE = 1; 29 30 // Generate layers snapshots from the transactions kept in the 31 // SurfaceFlinger's internal ring buffer. 32 // The layers snapshots generation occurs when this data source is flushed. 33 MODE_GENERATED = 2; 34 35 // Trace a single layers snapshot. 36 MODE_DUMP = 3; 37 38 // Default mode (applied by SurfaceFlinger if no mode is specified). 39 // Same as MODE_GENERATED, but triggers the layers snapshots generation only when a bugreport 40 // is taken. 41 MODE_GENERATED_BUGREPORT_ONLY = 4; 42 } 43 optional Mode mode = 1; 44 45 enum TraceFlag { 46 TRACE_FLAG_UNSPECIFIED = 0; 47 TRACE_FLAG_INPUT = 0x02; 48 TRACE_FLAG_COMPOSITION = 0x04; 49 TRACE_FLAG_EXTRA = 0x08; 50 TRACE_FLAG_HWC = 0x10; 51 TRACE_FLAG_BUFFERS = 0x20; 52 TRACE_FLAG_VIRTUAL_DISPLAYS = 0x40; 53 54 // INPUT | COMPOSITION | EXTRA 55 TRACE_FLAG_ALL = 0x0e; 56 } 57 repeated TraceFlag trace_flags = 2; 58} 59