Commit b5ab8f00 authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

Android: expose gpu_switches to Java

No change to logic. This exposes gpu_switches to Java with
java_cpp_strings.

Fixed: 1112006
Test: autoninja -C out/Default system_webview_apk
Change-Id: I84fb22671a6ce42c288b2772f3d49722ccc79f99
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343776
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797074}
parent d69f9c5e
......@@ -668,6 +668,7 @@ android_library("common_java") {
deps = [
"//base:base_java",
"//components/metrics:metrics_java",
"//gpu/config:config_java",
"//third_party/android_deps:androidx_annotation_annotation_java",
]
srcjar_deps = [ ":common_java_switches_srcjar" ]
......
......@@ -6,6 +6,7 @@ package org.chromium.android_webview.common;
import org.chromium.base.BaseSwitches;
import org.chromium.components.metrics.MetricsSwitches;
import org.chromium.gpu.config.GpuSwitches;
/**
* List of experimental features/flags supported for user devices. Add features/flags to this list
......@@ -57,7 +58,7 @@ public final class ProductionSupportedFlagList {
Flag.commandLine(BaseSwitches.ENABLE_CRASH_REPORTER_FOR_TESTING,
"Used for turning on Breakpad crash reporting in a debug environment where "
+ "crash reporting is typically compiled but disabled."),
Flag.commandLine("disable-gpu-rasterization",
Flag.commandLine(GpuSwitches.DISABLE_GPU_RASTERIZATION,
"Disables GPU rasterization, i.e. rasterizes on the CPU only."),
Flag.baseFeature("OutOfBlinkCors",
"Moves CORS logic into the Network Service (rather than inside the blink "
......
......@@ -7,6 +7,10 @@ import("//build/config/chromecast_build.gni")
import("//build/config/ui.gni")
import("//gpu/vulkan/features.gni")
if (is_android) {
import("//build/config/android/rules.gni")
}
group("config") {
if (is_component_build) {
public_deps = [ "//gpu" ]
......@@ -225,3 +229,18 @@ source_set("config_sources") {
]
}
}
if (is_android) {
java_cpp_strings("java_switches_srcjar") {
# External code should depend on ":config_java" instead.
visibility = [ ":*" ]
sources = [ "gpu_switches.cc" ]
template = "android/java/src/org/chromium/gpu/GpuSwitches.java.tmpl"
}
android_library("config_java") {
# Right now, this only includes the Java switches. But if we need more Java
# files, they should be added here as necessary.
srcjar_deps = [ ":java_switches_srcjar" ]
}
}
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.gpu.config;
/**
* Contains all of the command line switches that are specific to the gpu/ layer.
*/
public final class GpuSwitches {{
{NATIVE_STRINGS}
// Prevent instantiation.
private GpuSwitches() {{}}
}}
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