Commit 2b7e85eb authored by James Cook's avatar James Cook Committed by Commit Bot

cros: Use lazy serialization for window service mojo methods

The window service runs in the browser process for --mus and in the
ash_and_ui process for --mash. Use the support_lazy_serialization
build flag for the window service mojom targets so that in-process
mojo method calls avoid doing serialization for IPC. This should
improve event dispatch performance, as the mojo call becomes
equivalent to a PostTask.

This causes a known 130KB code size increase on 64-bit Intel
builds, so the feature is enabled on Chrome OS only.

Bug: 798800
Test: bots
Change-Id: Ia488f95e6dd35ce1947df7117e623cd222786fb0
Reviewed-on: https://chromium-review.googlesource.com/849657Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526999}
parent 2a0ba12b
...@@ -6,6 +6,14 @@ import("//mojo/public/tools/bindings/mojom.gni") ...@@ -6,6 +6,14 @@ import("//mojo/public/tools/bindings/mojom.gni")
import("//testing/test.gni") import("//testing/test.gni")
mojom("interfaces") { mojom("interfaces") {
# The window service runs in the browser process for --mus and in the
# ash_and_ui process for --mash. Allow IPC serialization to be skipped for
# the common case of in-process mojo calls. This causes a ~130KB size
# increase on 64-bit Intel builds.
if (is_chromeos) {
support_lazy_serialization = true
}
sources = [ sources = [
"accessibility_manager.mojom", "accessibility_manager.mojom",
"clipboard.mojom", "clipboard.mojom",
......
...@@ -5,6 +5,11 @@ ...@@ -5,6 +5,11 @@
import("//mojo/public/tools/bindings/mojom.gni") import("//mojo/public/tools/bindings/mojom.gni")
mojom("ime") { mojom("ime") {
# See //services/ui/public/interfaces/BUILD.gn
if (is_chromeos) {
support_lazy_serialization = true
}
sources = [ sources = [
"ime.mojom", "ime.mojom",
] ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment