Commit cbce6f73 authored by Khushal's avatar Khushal Committed by Chromium LUCI CQ

gpu: Ensure consistent GrContextOptions between GPU and OOPR.

R=bsalomon@google.com

Change-Id: I72615b36891e9e5ee568a8332bf0b6344b8188da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2545684
Commit-Queue: Khushal <khushalsagar@chromium.org>
Reviewed-by: default avatarBrian Salomon <bsalomon@google.com>
Cr-Commit-Position: refs/heads/master@{#836396}
parent 7974ebb5
...@@ -349,8 +349,8 @@ GpuServiceImpl::GpuServiceImpl( ...@@ -349,8 +349,8 @@ GpuServiceImpl::GpuServiceImpl(
protected_buffer_manager_ = new arc::ProtectedBufferManager(); protected_buffer_manager_ = new arc::ProtectedBufferManager();
#endif // BUILDFLAG(IS_CHROMEOS_ASH) #endif // BUILDFLAG(IS_CHROMEOS_ASH)
GrContextOptions context_options = GrContextOptions context_options = GetDefaultGrContextOptions(
GetDefaultGrContextOptions(gpu_preferences_.gr_context_type); gpu_preferences_.gr_context_type, gpu_preferences_);
if (gpu_preferences_.force_max_texture_size) { if (gpu_preferences_.force_max_texture_size) {
context_options.fMaxTextureSizeOverride = context_options.fMaxTextureSizeOverride =
gpu_preferences_.force_max_texture_size; gpu_preferences_.force_max_texture_size;
......
...@@ -270,7 +270,8 @@ bool SharedContextState::InitializeGrContext( ...@@ -270,7 +270,8 @@ bool SharedContextState::InitializeGrContext(
// affect text rendering, make sure to match the capabilities initialized // affect text rendering, make sure to match the capabilities initialized
// in GetCapabilities and ensuring these are also used by the // in GetCapabilities and ensuring these are also used by the
// PaintOpBufferSerializer. // PaintOpBufferSerializer.
GrContextOptions options = GetDefaultGrContextOptions(gr_context_type_); GrContextOptions options =
GetDefaultGrContextOptions(gr_context_type_, gpu_preferences);
options.fPersistentCache = cache; options.fPersistentCache = cache;
options.fShaderErrorHandler = this; options.fShaderErrorHandler = this;
if (gpu_preferences.force_max_texture_size) if (gpu_preferences.force_max_texture_size)
......
...@@ -71,7 +71,8 @@ void DeleteSkObject(SharedContextState* context_state, sk_sp<T> sk_object) { ...@@ -71,7 +71,8 @@ void DeleteSkObject(SharedContextState* context_state, sk_sp<T> sk_object) {
} // namespace } // namespace
GrContextOptions GetDefaultGrContextOptions(GrContextType type) { GrContextOptions GetDefaultGrContextOptions(GrContextType type,
const GpuPreferences& gpu_prefs) {
// If you make any changes to the GrContext::Options here that could affect // If you make any changes to the GrContext::Options here that could affect
// text rendering, make sure to match the capabilities initialized in // text rendering, make sure to match the capabilities initialized in
// GetCapabilities and ensuring these are also used by the // GetCapabilities and ensuring these are also used by the
...@@ -93,6 +94,11 @@ GrContextOptions GetDefaultGrContextOptions(GrContextType type) { ...@@ -93,6 +94,11 @@ GrContextOptions GetDefaultGrContextOptions(GrContextType type) {
base::CommandLine::ForCurrentProcess()->HasSwitch( base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableMipmapGeneration); switches::kDisableMipmapGeneration);
options.fAllowPathMaskCaching = false;
// TODO(penghuang) : Use this consistently for swiftshader vulkan backend.
options.fSharpenMipmappedTextures =
gpu_prefs.use_vulkan != VulkanImplementationName::kSwiftshader;
return options; return options;
} }
......
...@@ -46,7 +46,7 @@ class SharedContextState; ...@@ -46,7 +46,7 @@ class SharedContextState;
// Returns default GrContextOptions. // Returns default GrContextOptions.
GPU_GLES2_EXPORT GrContextOptions GPU_GLES2_EXPORT GrContextOptions
GetDefaultGrContextOptions(GrContextType type); GetDefaultGrContextOptions(GrContextType type, const GpuPreferences& gpu_prefs);
// Returns internal gl format of texture for Skia // Returns internal gl format of texture for Skia
GPU_GLES2_EXPORT GLuint GPU_GLES2_EXPORT GLuint
......
This is a testharness.js-based test.
PASS can detect same-origin iframe events in parent
PASS can detect same-origin iframe events in subframe
Harness: the test ran to completion.
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