• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2024 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
19import public "protos/perfetto/trace/track_event/track_event.proto";
20
21package perfetto.protos;
22
23// Information about sending and receiving messages on threads with
24// Looper and MessageQueue.
25message AndroidMessageQueue {
26  // Thread name sending a message on the MessageQueue.
27  optional string sending_thread_name = 1;
28  // Thread name receiving a message on the MessageQueue.
29  optional string receiving_thread_name = 2;
30  // User-defined message code for messages in the MessageQueue.
31  optional int32 message_code = 3;
32  // Intended delay in millis before a message on the MessageQueue is executed.
33  optional uint64 message_delay_ms = 4;
34}
35
36// Information about an android.graphics.Bitmap.
37message AndroidBitmap {
38  // Allocation size, in bytes.
39  optional int64 size = 1;
40  // Width, in pixels.
41  optional int32 width = 2;
42  // Height, in pixels.
43  optional int32 height = 3;
44  // Density, in DPI.
45  optional int32 density = 4;
46  // Config, in android.graphics.Bitmap.Config ordinal values.
47  optional int32 config = 5;
48  // Whether the pixel data is mutable.
49  // b/398624484: this should be a boolean.
50  optional int32 mutable_pixels = 6;
51  // Pixel storage type, in android::PixelStorageType ordinal values.
52  optional int32 pixel_storage_type = 7;
53  // Bitmap id; see android.graphics.Bitmap#mId.
54  optional int64 id = 8;
55}
56
57message AndroidTrackEvent {
58  // Usable range: [2001, 2999]
59  // Next id: 2006
60  extend TrackEvent {
61    // The name of a binder service.
62    optional string binder_service_name = 2001;
63    // The name of a binder interface.
64    optional string binder_interface_name = 2002;
65    // The name of an apex.
66    optional string apex_name = 2003;
67
68    // MessageQueue messages.
69    optional AndroidMessageQueue message_queue = 2004;
70    // Bitmaps
71    optional AndroidBitmap bitmap = 2005;
72  }
73}
74