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(
protected_buffer_manager_ = new arc::ProtectedBufferManager();
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
GrContextOptions context_options =
GetDefaultGrContextOptions(gpu_preferences_.gr_context_type);
GrContextOptions context_options = GetDefaultGrContextOptions(
gpu_preferences_.gr_context_type, gpu_preferences_);
if (gpu_preferences_.force_max_texture_size) {
context_options.fMaxTextureSizeOverride =
gpu_preferences_.force_max_texture_size;
......
......@@ -270,7 +270,8 @@ bool SharedContextState::InitializeGrContext(
// affect text rendering, make sure to match the capabilities initialized
// in GetCapabilities and ensuring these are also used by the
// PaintOpBufferSerializer.
GrContextOptions options = GetDefaultGrContextOptions(gr_context_type_);
GrContextOptions options =
GetDefaultGrContextOptions(gr_context_type_, gpu_preferences);
options.fPersistentCache = cache;
options.fShaderErrorHandler = this;
if (gpu_preferences.force_max_texture_size)
......
......@@ -71,7 +71,8 @@ void DeleteSkObject(SharedContextState* context_state, sk_sp<T> sk_object) {
} // 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
// text rendering, make sure to match the capabilities initialized in
// GetCapabilities and ensuring these are also used by the
......@@ -93,6 +94,11 @@ GrContextOptions GetDefaultGrContextOptions(GrContextType type) {
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableMipmapGeneration);
options.fAllowPathMaskCaching = false;
// TODO(penghuang) : Use this consistently for swiftshader vulkan backend.
options.fSharpenMipmappedTextures =
gpu_prefs.use_vulkan != VulkanImplementationName::kSwiftshader;
return options;
}
......
......@@ -46,7 +46,7 @@ class SharedContextState;
// Returns default GrContextOptions.
GPU_GLES2_EXPORT GrContextOptions
GetDefaultGrContextOptions(GrContextType type);
GetDefaultGrContextOptions(GrContextType type, const GpuPreferences& gpu_prefs);
// Returns internal gl format of texture for Skia
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