diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-02 23:57:42 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-02-02 23:57:42 +0000 |
commit | 010063adaef74d9db61553e73542451622324346 (patch) | |
tree | 4d91ebd49c1cd9bb44333ae66ab1aa7e97b6aa42 | |
parent | 41aa1be25af7352659edd552cff820a9fe78de04 (diff) | |
parent | 9131cd7dd39fc3dda5dcf9f4a49695ad445bf041 (diff) | |
download | wayland-protocols-simpleperf-release.tar.gz |
Snap for 11400057 from 9131cd7dd39fc3dda5dcf9f4a49695ad445bf041 to simpleperf-releasesimpleperf-release
Change-Id: I7ef8be9fcff847416e6741eeff28068eea558211
-rw-r--r-- | chromium.org/unstable/aura-shell/aura-shell.xml | 38 | ||||
-rw-r--r-- | chromium.org/unstable/remote-shell/remote-shell-unstable-v2.xml | 22 | ||||
-rw-r--r-- | wayland_protocol_codegen.go | 165 | ||||
-rw-r--r-- | wayland_protocol_codegen_test.go | 25 |
4 files changed, 55 insertions, 195 deletions
diff --git a/chromium.org/unstable/aura-shell/aura-shell.xml b/chromium.org/unstable/aura-shell/aura-shell.xml index 2d3ea86..c94c40c 100644 --- a/chromium.org/unstable/aura-shell/aura-shell.xml +++ b/chromium.org/unstable/aura-shell/aura-shell.xml @@ -24,7 +24,7 @@ DEALINGS IN THE SOFTWARE. </copyright> - <interface name="zaura_shell" version="61"> + <interface name="zaura_shell" version="63"> <description summary="aura_shell"> The global interface exposing aura shell capabilities is used to instantiate an interface extension for a wl_surface object. @@ -805,7 +805,7 @@ </event> </interface> - <interface name="zaura_toplevel" version="60"> + <interface name="zaura_toplevel" version="63"> <description summary="aura shell interface to the toplevel shell"> An interface to the toplevel shell, which allows the client to access shell specific functionality. @@ -1342,6 +1342,40 @@ <arg name="lower_right_radius" type="uint"/> <arg name="lower_left_radius" type="uint"/> </request> + + <!-- Version 62 additions --> + <enum name="in_overview"> + <description summary="Describes whether or not the value is in overview"> + Binary enum maps to boolean, describes whether or not a value is in + overview. + </description> + <entry name="not_in_overview" value="0" summary="the value is not in overview"/> + <entry name="in_overview" value="1" summary="the value is in overview"/> + </enum> + + <event name="overview_change" since="62"> + <description summary="window is in overview"> + The window is being shown in overview mode. Note that this is + different than shell overview state, as not all windows will be + part of the overview grid. + </description> + <arg name="in_overview" type="uint" enum="in_overview" summary="in overview or not"/> + </event> + + <!-- Version 63 additions --> + <request name="set_shadow_corner_radii" since="63"> + <description summary="Request to apply rounded corners to the shadow of the surface."> + The client specifies the radius of each corner to be applied to the shadow + associated with the aura toplevel surface in device independent pixels (DPs). + + The shadow radius is double buffered, and will be applied at the + time wl_surface.commit of the corresponding wl_surface is called. + </description> + <arg name="upper_left_radius" type="uint"/> + <arg name="upper_right_radius" type="uint"/> + <arg name="lower_right_radius" type="uint"/> + <arg name="lower_left_radius" type="uint"/> + </request> </interface> <interface name="zaura_popup" version="46"> diff --git a/chromium.org/unstable/remote-shell/remote-shell-unstable-v2.xml b/chromium.org/unstable/remote-shell/remote-shell-unstable-v2.xml index 9c6733d..7a812f9 100644 --- a/chromium.org/unstable/remote-shell/remote-shell-unstable-v2.xml +++ b/chromium.org/unstable/remote-shell/remote-shell-unstable-v2.xml @@ -38,7 +38,7 @@ reset. </description> - <interface name="zcr_remote_shell_v2" version="5"> + <interface name="zcr_remote_shell_v2" version="6"> <description summary="remote_shell"> The global interface that allows clients to turn a wl_surface into a "real window" which is remotely managed but can be stacked, activated @@ -162,7 +162,7 @@ </interface> - <interface name="zcr_remote_surface_v2" version="5"> + <interface name="zcr_remote_surface_v2" version="6"> <description summary="A desktop window"> An interface that may be implemented by a wl_surface, for implementations that provide a desktop-style user interface @@ -595,7 +595,8 @@ <entry name="normal" value="1" summary="caption with shadow"/> <entry name="shadow" value="2" summary="shadow only"/> <entry name="autohide" value="3" summary="autohide frame with shadow"/> - <entry name="overlay" value="4" summary="overlay frame with shadow"/> + <entry name="overlay" value="4" summary="[Deprecated] overlay frame with shadow"/> + <entry name="overlap" value="5" summary="overlap frame with the window" since="6"/> </enum> <request name="set_frame" since="1"> @@ -874,6 +875,21 @@ <arg name="lower_right_radius" type="uint"/> <arg name="lower_left_radius" type="uint"/> </request> + + <!-- Version 6 additions --> + <request name="set_shadow_corner_radii" since="6"> + <description summary="Request to apply rounded corners to the shadow of the surface."> + The client specifies the radius of each corner to be applied to the shadow + associated with the aura toplevel surface in device independent pixels (DPs). + + The shadow radius is double buffered, and will be applied at the + time wl_surface.commit of the corresponding wl_surface is called. + </description> + <arg name="upper_left_radius" type="uint"/> + <arg name="upper_right_radius" type="uint"/> + <arg name="lower_right_radius" type="uint"/> + <arg name="lower_left_radius" type="uint"/> + </request> </interface> <interface name="zcr_notification_surface_v2" version="1"> diff --git a/wayland_protocol_codegen.go b/wayland_protocol_codegen.go index 0711ac7..e507e61 100644 --- a/wayland_protocol_codegen.go +++ b/wayland_protocol_codegen.go @@ -26,12 +26,6 @@ package, which was originally used for inspiration for this one, and has been recently restructured so that it can be kept in sync with a tool like "vimdiff" to keep things in sync as needed. -However this build system plugin will not be needed in the future, as -evidenced by some of the other files that have been added as part of the -last big sync-up. In the future, Android will be built with Bazel, and it -is much simpler there to define our own local version of "gensrcs" that -implements the functionality we need See bazel/gensrcs.bzl for it. - Notable differences: - This package implements a more powerful template mechanism for specifying @@ -82,10 +76,7 @@ import ( "github.com/google/blueprint/proptools" "android/soong/android" - "android/soong/bazel" - "android/soong/bazel/cquery" "android/soong/genrule" - "path/filepath" ) func init() { @@ -188,7 +179,6 @@ type generatorProperties struct { type Module struct { android.ModuleBase android.DefaultableModuleBase - android.BazelModuleBase android.ApexModuleBase android.ImageInterface @@ -211,9 +201,6 @@ type Module struct { modulePaths []string } -// Ensure Module implements the android.MixedBuildBuildable interface. -var _ android.MixedBuildBuildable = (*Module)(nil) - type taskFunc func(ctx android.ModuleContext, rawCommand string, srcFiles android.Paths) []generateTask type generateTask struct { @@ -289,41 +276,6 @@ func toolDepsMutator(ctx android.BottomUpMutatorContext) { } } -// Part of android.MixedBuildBuildable. -// Allow this module to be a bridge between Bazel and Soong. Fills in Soong -// properties for the module from the Bazel cquery, so that other Soong -// modules can depend on the module when it was actually built by Bazel. -func (g *Module) ProcessBazelQueryResponse(ctx android.ModuleContext) { - g.generateCommonBuildActions(ctx) - - // Get the list of output files that Bazel generates for the target. - label := g.GetBazelLabel(ctx, g) - bazelCtx := ctx.Config().BazelContext - filePaths, err := bazelCtx.GetOutputFiles(label, android.GetConfigKey(ctx)) - if err != nil { - ctx.ModuleErrorf(err.Error()) - return - } - - // Convert to android.Paths, and also form the set of include directories - // that might be needed for those paths. - var bazelOutputFiles android.Paths - exportIncludeDirs := map[string]bool{} - for _, bazelOutputFile := range filePaths { - bazelOutputFiles = append(bazelOutputFiles, - android.PathForBazelOutRelative(ctx, ctx.ModuleDir(), bazelOutputFile)) - exportIncludeDirs[filepath.Dir(bazelOutputFile)] = true - } - - // Set the Soong module properties to refer to the Bazel files - g.outputFiles = bazelOutputFiles - g.outputDeps = bazelOutputFiles - for includePath, _ := range exportIncludeDirs { - g.exportedIncludeDirs = append(g.exportedIncludeDirs, - android.PathForBazelOut(ctx, includePath)) - } -} - // Part of android.Module. // Generates all the rules and builds commands used by this module instance. func (g *Module) generateCommonBuildActions(ctx android.ModuleContext) { @@ -641,20 +593,6 @@ func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) { } } -// Part of android.MixedBuildBuildable. -// Queues up Bazel cquery requests related to this module. -func (g *Module) QueueBazelCall(ctx android.BaseModuleContext) { - bazelCtx := ctx.Config().BazelContext - bazelCtx.QueueBazelRequest(g.GetBazelLabel(ctx, g), cquery.GetOutputFiles, - android.GetConfigKey(ctx)) -} - -// Part of android.MixedBuildBuildable. -// Returns true if Bazel can and should build this module in a mixed build. -func (g *Module) IsMixedBuildSupported(ctx android.BaseModuleContext) bool { - return true -} - // Part of android.IDEInfo. // Collect information for opening IDE project files in java/jdeps.go. func (g *Module) IDEInfo(dpInfo *android.IdeInfo) { @@ -823,7 +761,6 @@ func newCodegen() *Module { func codegenFactory() android.Module { m := newCodegen() android.InitAndroidModule(m) - android.InitBazelModule(m) android.InitDefaultableModule(m) return m } @@ -910,108 +847,6 @@ func removeExtension(path string) string { return path } -// The attributes for the custom local ./bazel/gensrcs.bzl. See the .bzl file -// for attribute documentation. -type bazelGensrcsAttributes struct { - Srcs bazel.LabelListAttribute - Output string - Tools bazel.LabelListAttribute - Cmd string -} - -// ConvertWithBp2build converts a Soong module -> Bazel target. -func (m *Module) ConvertWithBp2build(ctx android.Bp2buildMutatorContext) { - // Bazel only has the "tools" attribute. - tools_prop := android.BazelLabelForModuleDeps(ctx, m.properties.Tools) - tool_files_prop := android.BazelLabelForModuleSrc(ctx, m.properties.Tool_files) - tools_prop.Append(tool_files_prop) - - tools := bazel.MakeLabelListAttribute(tools_prop) - srcs := bazel.LabelListAttribute{} - srcs_labels := bazel.LabelList{} - srcs_labels = android.BazelLabelForModuleSrcExcludes( - ctx, m.properties.Srcs, m.properties.Exclude_srcs) - srcs = bazel.MakeLabelListAttribute(srcs_labels) - - var allReplacements bazel.LabelList - allReplacements.Append(tools.Value) - allReplacements.Append(bazel.FirstUniqueBazelLabelList(srcs_labels)) - - // Convert the command line template. - var cmd string - if m.properties.Cmd != nil { - // $(in) becomes $(SRC) in our custom gensrcs.bzl - cmd = strings.ReplaceAll(*m.properties.Cmd, "$(in)", "$(SRC)") - // $(out) becomes $(OUT) in our custom gensrcs.bzl - cmd = strings.ReplaceAll(cmd, "$(out)", "$(OUT)") - // $(gendir) becomes $(RULEDIR) in our custom gensrcs.bzl - cmd = strings.Replace(cmd, "$(genDir)", "$(RULEDIR)", -1) - - // $(location) or $(locations) becomes the more explicit - // $(location <default-tool-label>) in Bazel. - if len(tools.Value.Includes) > 0 { - cmd = strings.Replace(cmd, "$(location)", - fmt.Sprintf("$(location %s)", tools.Value.Includes[0].Label), -1) - cmd = strings.Replace(cmd, "$(locations)", - fmt.Sprintf("$(locations %s)", tools.Value.Includes[0].Label), -1) - } - - // Translate all the other $(location <name>) and $(locations <name>) - // expansion placeholders. - for _, l := range allReplacements.Includes { - bpLoc := fmt.Sprintf("$(location %s)", l.OriginalModuleName) - bpLocs := fmt.Sprintf("$(locations %s)", l.OriginalModuleName) - bazelLoc := fmt.Sprintf("$(location %s)", l.Label) - bazelLocs := fmt.Sprintf("$(locations %s)", l.Label) - cmd = strings.Replace(cmd, bpLoc, bazelLoc, -1) - cmd = strings.Replace(cmd, bpLocs, bazelLocs, -1) - } - } - - tags := android.ApexAvailableTags(m) - - // The Output_extension prop is not in an immediately accessible field - // in the Module struct, so use GetProperties and cast it - // to the known struct prop. - var outputFileTemplate string - for _, propIntf := range m.GetProperties() { - if props, ok := propIntf.(*codegenProperties); ok { - // Convert the output path template. - outputFileTemplate = proptools.String(props.Output) - if len(outputFileTemplate) > 0 { - outputFileTemplate = strings.Replace( - outputFileTemplate, "$(in)", "$(SRC:BASE)", -1) - outputFileTemplate = strings.Replace( - outputFileTemplate, "$(in:path/base.ext)", "$(SRC:PATH/BASE.EXT)", -1) - outputFileTemplate = strings.Replace( - outputFileTemplate, "$(in:path/base)", "$(SRC:PATH/BASE)", -1) - outputFileTemplate = strings.Replace( - outputFileTemplate, "$(in:base.ext)", "$(SRC:BASE.EXT)", -1) - outputFileTemplate = strings.Replace( - outputFileTemplate, "$(in:base)", "$(SRC:BASE)", -1) - } else { - outputFileTemplate = proptools.String(props.Prefix) + "$(SRC:BASE)" + - proptools.String(props.Suffix) - } - break - } - } - props := bazel.BazelTargetModuleProperties{ - Rule_class: "gensrcs", - Bzl_load_location: "//external/wayland-protocols/bazel:gensrcs.bzl", - } - attrs := &bazelGensrcsAttributes{ - Srcs: srcs, - Output: outputFileTemplate, - Cmd: cmd, - Tools: tools, - } - ctx.CreateBazelTargetModule(props, android.CommonAttributes{ - Name: m.Name(), - Tags: tags, - }, attrs) -} - // Defaults module. type Defaults struct { android.ModuleBase diff --git a/wayland_protocol_codegen_test.go b/wayland_protocol_codegen_test.go index 90f1200..5285d86 100644 --- a/wayland_protocol_codegen_test.go +++ b/wayland_protocol_codegen_test.go @@ -408,31 +408,6 @@ func TestWaylandCodeGen(t *testing.T) { } } -func TestGenruleWithBazel(t *testing.T) { - bp := ` - wayland_protocol_codegen { - name: "mixed_codegen", - srcs: ["src_file"], - bazel_module: { label: "//example:bazel_codegen" }, - } - ` - - result := android.GroupFixturePreparers( - prepareForCodeGenTest, android.FixtureModifyConfig(func(config android.Config) { - config.BazelContext = android.MockBazelContext{ - OutputBaseDir: "outputbase", - LabelToOutputFiles: map[string][]string{ - "//example:bazel_codegen": {"bazelone.txt", "bazeltwo.txt"}}} - })).RunTestWithBp(t, testCodeGenBp()+bp) - - gen := result.Module("mixed_codegen", "").(*Module) - - expectedOutputFiles := []string{"outputbase/execroot/__main__/bazelone.txt", - "outputbase/execroot/__main__/bazeltwo.txt"} - android.AssertDeepEquals(t, "output files", expectedOutputFiles, gen.outputFiles.Strings()) - android.AssertDeepEquals(t, "output deps", expectedOutputFiles, gen.outputDeps.Strings()) -} - func TestDefaults(t *testing.T) { bp := ` wayland_protocol_codegen_defaults { |