Commit ca7cb63d authored by Adrienne Walker's avatar Adrienne Walker Committed by Commit Bot

Always enable passthrough raster decoder on Windows

This is a followup to:
https://chromium-review.googlesource.com/c/1444234

That previous patch worked, but only if --enable-oop-rasterization
was passed on the command line.  For finch and field trials,
it's decided much later in gpu_util.cc that oop raster should be
turned on and so the passthrough raster decoder needs to be
enabled earlier.

Bug: 627621
Change-Id: Ibe32cf715bca65faabc76954c46765ba3c18418d
Reviewed-on: https://chromium-review.googlesource.com/c/1487143
Commit-Queue: enne <enne@chromium.org>
Reviewed-by: default avatarJonathan Backer <backer@chromium.org>
Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636588}
parent 8d8384b8
...@@ -116,8 +116,7 @@ const gpu::GpuPreferences GetGpuPreferencesFromCommandLine() { ...@@ -116,8 +116,7 @@ const gpu::GpuPreferences GetGpuPreferencesFromCommandLine() {
gpu_preferences.enable_passthrough_raster_decoder = gpu_preferences.enable_passthrough_raster_decoder =
command_line->HasSwitch(switches::kEnablePassthroughRasterDecoder); command_line->HasSwitch(switches::kEnablePassthroughRasterDecoder);
#if defined(OS_WIN) #if defined(OS_WIN)
if (gpu_preferences.enable_oop_rasterization) gpu_preferences.enable_passthrough_raster_decoder = true;
gpu_preferences.enable_passthrough_raster_decoder = true;
#endif #endif
gpu_preferences.enable_vulkan = gpu_preferences.enable_vulkan =
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/memory_dump_manager.h" #include "base/trace_event/memory_dump_manager.h"
#include "build/build_config.h"
#include "components/viz/common/gpu/context_cache_controller.h" #include "components/viz/common/gpu/context_cache_controller.h"
#include "gpu/command_buffer/client/gles2_cmd_helper.h" #include "gpu/command_buffer/client/gles2_cmd_helper.h"
#include "gpu/command_buffer/client/gles2_trace_implementation.h" #include "gpu/command_buffer/client/gles2_trace_implementation.h"
...@@ -145,10 +146,18 @@ gpu::ContextResult ContextProviderCommandBuffer::BindToCurrentThread() { ...@@ -145,10 +146,18 @@ gpu::ContextResult ContextProviderCommandBuffer::BindToCurrentThread() {
return bind_result_; return bind_result_;
} }
bool allow_raster_decoder = // TODO(enne): remove the kEnablePassthroughRasterDecoder flag and
!command_buffer_->channel()->gpu_info().passthrough_cmd_decoder || // assume it is always available.
bool enable_passthrough_raster_decoder =
base::CommandLine::ForCurrentProcess()->HasSwitch( base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnablePassthroughRasterDecoder); switches::kEnablePassthroughRasterDecoder);
#if defined(OS_WIN)
enable_passthrough_raster_decoder = true;
#endif
bool allow_raster_decoder =
!command_buffer_->channel()->gpu_info().passthrough_cmd_decoder ||
enable_passthrough_raster_decoder;
if (attributes_.context_type == gpu::CONTEXT_TYPE_WEBGPU) { if (attributes_.context_type == gpu::CONTEXT_TYPE_WEBGPU) {
DCHECK(!attributes_.enable_raster_interface); DCHECK(!attributes_.enable_raster_interface);
DCHECK(!attributes_.enable_gles2_interface); DCHECK(!attributes_.enable_gles2_interface);
......
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