Commit 1be24e27 authored by Wei Li's avatar Wei Li Committed by Commit Bot

Use GL rendering for views examples

On Linux, skia rendering is the default. Views examples application has
to override that to use GL for rendering instead. This override was
missed in the previous change @0678d778.

Bug: none
Change-Id: I102370418af4d8b761a61d039322fff12947ff54
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2286479Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786363}
parent e2c691a3
......@@ -5,6 +5,7 @@
#include "ui/views/examples/examples_main_proc.h"
#include <memory>
#include <string>
#include "base/base_switches.h"
#include "base/bind.h"
......@@ -23,6 +24,7 @@
#include "base/test/test_discardable_memory_allocator.h"
#include "base/test/test_timeouts.h"
#include "build/build_config.h"
#include "components/viz/common/features.h"
#include "components/viz/host/host_frame_sink_manager.h"
#include "components/viz/service/display_embedder/server_shared_bitmap_manager.h"
#include "components/viz/service/frame_sinks/frame_sink_manager_impl.h"
......@@ -82,6 +84,14 @@ ExamplesExitCode ExamplesMainProc(bool under_test) {
// window to not render. See http://crbug.com/936249.
command_line->AppendSwitch(switches::kDisableDirectComposition);
// Disable skia renderer to use GL instead.
std::string disabled =
command_line->GetSwitchValueASCII(switches::kDisableFeatures);
if (!disabled.empty())
disabled += ",";
disabled += features::kUseSkiaRenderer.name;
command_line->AppendSwitchASCII(switches::kDisableFeatures, disabled);
base::FeatureList::InitializeInstance(
command_line->GetSwitchValueASCII(switches::kEnableFeatures),
command_line->GetSwitchValueASCII(switches::kDisableFeatures));
......
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