Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -3405,6 +3405,7 @@ filegroup {
"protos/perfetto/trace/android/cpu_per_uid_data.proto",
"protos/perfetto/trace/android/frame_timeline_event.proto",
"protos/perfetto/trace/android/gpu_mem_event.proto",
"protos/perfetto/trace/android/graphics/corner_radii.proto",
"protos/perfetto/trace/android/graphics/insets.proto",
"protos/perfetto/trace/android/graphics/pixelformat.proto",
"protos/perfetto/trace/android/graphics/point.proto",
Expand Down Expand Up @@ -7771,6 +7772,7 @@ genrule {
filegroup {
name: "perfetto_protos_perfetto_trace_android_winscope_common_cpp",
srcs: [
"protos/perfetto/trace/android/graphics/corner_radii.proto",
"protos/perfetto/trace/android/graphics/insets.proto",
"protos/perfetto/trace/android/graphics/point.proto",
"protos/perfetto/trace/android/graphics/rect.proto",
Expand All @@ -7790,6 +7792,7 @@ genrule {
],
cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --plugin=protoc-gen-plugin=$(location perfetto_src_protozero_protoc_plugin_cppgen_plugin) --plugin_out=wrapper_namespace=gen:$(genDir)/external/perfetto/ $(locations :perfetto_protos_perfetto_trace_android_winscope_common_cpp)",
out: [
"external/perfetto/protos/perfetto/trace/android/graphics/corner_radii.gen.cc",
"external/perfetto/protos/perfetto/trace/android/graphics/insets.gen.cc",
"external/perfetto/protos/perfetto/trace/android/graphics/point.gen.cc",
"external/perfetto/protos/perfetto/trace/android/graphics/rect.gen.cc",
Expand All @@ -7809,6 +7812,7 @@ genrule {
],
cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --plugin=protoc-gen-plugin=$(location perfetto_src_protozero_protoc_plugin_cppgen_plugin) --plugin_out=wrapper_namespace=gen:$(genDir)/external/perfetto/ $(locations :perfetto_protos_perfetto_trace_android_winscope_common_cpp)",
out: [
"external/perfetto/protos/perfetto/trace/android/graphics/corner_radii.gen.h",
"external/perfetto/protos/perfetto/trace/android/graphics/insets.gen.h",
"external/perfetto/protos/perfetto/trace/android/graphics/point.gen.h",
"external/perfetto/protos/perfetto/trace/android/graphics/rect.gen.h",
Expand All @@ -7824,6 +7828,7 @@ genrule {
filegroup {
name: "perfetto_protos_perfetto_trace_android_winscope_common_lite",
srcs: [
"protos/perfetto/trace/android/graphics/corner_radii.proto",
"protos/perfetto/trace/android/graphics/insets.proto",
"protos/perfetto/trace/android/graphics/point.proto",
"protos/perfetto/trace/android/graphics/rect.proto",
Expand All @@ -7842,6 +7847,7 @@ genrule {
],
cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --cpp_out=lite=true:$(genDir)/external/perfetto/ $(locations :perfetto_protos_perfetto_trace_android_winscope_common_lite)",
out: [
"external/perfetto/protos/perfetto/trace/android/graphics/corner_radii.pb.cc",
"external/perfetto/protos/perfetto/trace/android/graphics/insets.pb.cc",
"external/perfetto/protos/perfetto/trace/android/graphics/point.pb.cc",
"external/perfetto/protos/perfetto/trace/android/graphics/rect.pb.cc",
Expand All @@ -7860,6 +7866,7 @@ genrule {
],
cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --cpp_out=lite=true:$(genDir)/external/perfetto/ $(locations :perfetto_protos_perfetto_trace_android_winscope_common_lite)",
out: [
"external/perfetto/protos/perfetto/trace/android/graphics/corner_radii.pb.h",
"external/perfetto/protos/perfetto/trace/android/graphics/insets.pb.h",
"external/perfetto/protos/perfetto/trace/android/graphics/point.pb.h",
"external/perfetto/protos/perfetto/trace/android/graphics/rect.pb.h",
Expand All @@ -7875,6 +7882,7 @@ genrule {
filegroup {
name: "perfetto_protos_perfetto_trace_android_winscope_common_zero",
srcs: [
"protos/perfetto/trace/android/graphics/corner_radii.proto",
"protos/perfetto/trace/android/graphics/insets.proto",
"protos/perfetto/trace/android/graphics/point.proto",
"protos/perfetto/trace/android/graphics/rect.proto",
Expand All @@ -7894,6 +7902,7 @@ genrule {
],
cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --plugin=protoc-gen-plugin=$(location protozero_plugin) --plugin_out=wrapper_namespace=pbzero:$(genDir)/external/perfetto/ $(locations :perfetto_protos_perfetto_trace_android_winscope_common_zero)",
out: [
"external/perfetto/protos/perfetto/trace/android/graphics/corner_radii.pbzero.cc",
"external/perfetto/protos/perfetto/trace/android/graphics/insets.pbzero.cc",
"external/perfetto/protos/perfetto/trace/android/graphics/point.pbzero.cc",
"external/perfetto/protos/perfetto/trace/android/graphics/rect.pbzero.cc",
Expand All @@ -7913,6 +7922,7 @@ genrule {
],
cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --plugin=protoc-gen-plugin=$(location protozero_plugin) --plugin_out=wrapper_namespace=pbzero:$(genDir)/external/perfetto/ $(locations :perfetto_protos_perfetto_trace_android_winscope_common_zero)",
out: [
"external/perfetto/protos/perfetto/trace/android/graphics/corner_radii.pbzero.h",
"external/perfetto/protos/perfetto/trace/android/graphics/insets.pbzero.h",
"external/perfetto/protos/perfetto/trace/android/graphics/point.pbzero.h",
"external/perfetto/protos/perfetto/trace/android/graphics/rect.pbzero.h",
Expand Down Expand Up @@ -7955,6 +7965,7 @@ genrule {
"protos/perfetto/trace/android/content/activityinfo.proto",
"protos/perfetto/trace/android/content/configuration.proto",
"protos/perfetto/trace/android/content/locale.proto",
"protos/perfetto/trace/android/graphics/corner_radii.proto",
"protos/perfetto/trace/android/graphics/insets.proto",
"protos/perfetto/trace/android/graphics/pixelformat.proto",
"protos/perfetto/trace/android/graphics/point.proto",
Expand Down Expand Up @@ -8709,6 +8720,7 @@ genrule {
"protos/perfetto/trace/android/cpu_per_uid_data.proto",
"protos/perfetto/trace/android/frame_timeline_event.proto",
"protos/perfetto/trace/android/gpu_mem_event.proto",
"protos/perfetto/trace/android/graphics/corner_radii.proto",
"protos/perfetto/trace/android/graphics/insets.proto",
"protos/perfetto/trace/android/graphics/point.proto",
"protos/perfetto/trace/android/graphics/rect.proto",
Expand Down Expand Up @@ -18926,6 +18938,7 @@ java_library {
"protos/perfetto/trace/android/cpu_per_uid_data.proto",
"protos/perfetto/trace/android/frame_timeline_event.proto",
"protos/perfetto/trace/android/gpu_mem_event.proto",
"protos/perfetto/trace/android/graphics/corner_radii.proto",
"protos/perfetto/trace/android/graphics/insets.proto",
"protos/perfetto/trace/android/graphics/point.proto",
"protos/perfetto/trace/android/graphics/rect.proto",
Expand Down
1 change: 1 addition & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7262,6 +7262,7 @@ perfetto_proto_library(
perfetto_proto_library(
name = "protos_perfetto_trace_android_winscope_common_protos",
srcs = [
"protos/perfetto/trace/android/graphics/corner_radii.proto",
"protos/perfetto/trace/android/graphics/insets.proto",
"protos/perfetto/trace/android/graphics/point.proto",
"protos/perfetto/trace/android/graphics/rect.proto",
Expand Down
1 change: 1 addition & 0 deletions protos/perfetto/trace/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ perfetto_proto_library("@TYPE@") {

perfetto_proto_library("winscope_common_@TYPE@") {
sources = [
"graphics/corner_radii.proto",
"graphics/insets.proto",
"graphics/point.proto",
"graphics/rect.proto",
Expand Down
26 changes: 26 additions & 0 deletions protos/perfetto/trace/android/graphics/corner_radii.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (C) 2026 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.
*/

syntax = "proto2";

package perfetto.protos;

message CornerRadiiProto {
optional float tl = 1;
optional float tr = 2;
optional float bl = 3;
optional float br = 4;
}
14 changes: 7 additions & 7 deletions protos/perfetto/trace/android/surfaceflinger_layers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package perfetto.protos;

import "protos/perfetto/trace/android/surfaceflinger_common.proto";
import "protos/perfetto/trace/android/graphics/rect.proto";
import "protos/perfetto/trace/android/graphics/corner_radii.proto";

// Message used by Winscope to process legacy trace files.
// Represents a file full of surface flinger trace entries.
Expand Down Expand Up @@ -259,6 +260,12 @@ message LayerProto {

// "True" corner radii of the layer computed by SurfaceFlinger.
optional CornerRadiiProto effective_radii = 67;

// Reported corner radii of the layer.
optional CornerRadiiProto reported_radii = 68;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any chance that "requested_radii" would be more consistent with the other field names? Not sure, just sanity checking. Iirc we usually talk about "requested" and "computed" properties


// Flag indicating if client-drawn radii are disabled.
optional bool disable_client_drawn_radii = 69;
}

message PositionProto {
Expand All @@ -273,13 +280,6 @@ message FloatRectProto {
optional float bottom = 4;
}

message CornerRadiiProto {
optional float tl = 1;
optional float tr = 2;
optional float bl = 3;
optional float br = 4;
}

message ActiveBufferProto {
optional uint32 width = 1;
optional uint32 height = 2;
Expand Down
3 changes: 3 additions & 0 deletions protos/perfetto/trace/android/view/viewrootimpl.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
syntax = "proto2";

import "protos/perfetto/trace/android/graphics/rect.proto";
import "protos/perfetto/trace/android/graphics/corner_radii.proto";
import "protos/perfetto/trace/android/view/displaycutout.proto";
import "protos/perfetto/trace/android/view/windowlayoutparams.proto";

Expand All @@ -41,4 +42,6 @@ message ViewRootImplProto {
optional int32 cur_scroll_y = 15;
optional bool removed = 16;
optional WindowLayoutParamsProto window_attributes = 17;
optional CornerRadiiProto corner_radii = 18;
optional RectProto last_set_client_drawn_radii_bounds = 19;
}
24 changes: 17 additions & 7 deletions protos/perfetto/trace/perfetto_trace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6861,6 +6861,17 @@ message ShellHandlerMapping {

// End of protos/perfetto/trace/android/shell_transition.proto

// Begin of protos/perfetto/trace/android/graphics/corner_radii.proto

message CornerRadiiProto {
optional float tl = 1;
optional float tr = 2;
optional float bl = 3;
optional float br = 4;
}

// End of protos/perfetto/trace/android/graphics/corner_radii.proto

// Begin of protos/perfetto/trace/android/surfaceflinger_common.proto

message RegionProto {
Expand Down Expand Up @@ -7200,6 +7211,12 @@ message LayerProto {

// "True" corner radii of the layer computed by SurfaceFlinger.
optional CornerRadiiProto effective_radii = 67;

// Reported corner radii of the layer.
optional CornerRadiiProto reported_radii = 68;

// Flag indicating if client-drawn radii are disabled.
optional bool disable_client_drawn_radii = 69;
}

message PositionProto {
Expand All @@ -7214,13 +7231,6 @@ message FloatRectProto {
optional float bottom = 4;
}

message CornerRadiiProto {
optional float tl = 1;
optional float tr = 2;
optional float bl = 3;
optional float br = 4;
}

message ActiveBufferProto {
optional uint32 width = 1;
optional uint32 height = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define SRC_TRACE_PROCESSOR_IMPORTERS_PROTO_WINSCOPE_SURFACEFLINGER_LAYERS_UTILS_H_

#include <optional>
#include "protos/perfetto/trace/android/graphics/corner_radii.pbzero.h"
#include "protos/perfetto/trace/android/graphics/rect.pbzero.h"
#include "protos/perfetto/trace/android/surfaceflinger_common.pbzero.h"
#include "protos/perfetto/trace/android/surfaceflinger_layers.pbzero.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "src/trace_processor/importers/proto/winscope/winscope_geometry.h"

#include "protos/perfetto/trace/android/graphics/corner_radii.gen.h"
#include "protos/perfetto/trace/android/graphics/rect.gen.h"
#include "protos/perfetto/trace/android/surfaceflinger_common.gen.h"
#include "protos/perfetto/trace/android/surfaceflinger_layers.gen.h"
Expand Down
Loading