Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(878)

Unified Diff: gpu/ipc/host/gpu_memory_buffer_support.cc

Issue 2690113010: Abstract OSMesa from the Layout tests (Closed)
Patch Set: Renamed "Renderer" to "GL" Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/app/shell_main_delegate.cc ('k') | gpu/ipc/service/gpu_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/host/gpu_memory_buffer_support.cc
diff --git a/gpu/ipc/host/gpu_memory_buffer_support.cc b/gpu/ipc/host/gpu_memory_buffer_support.cc
index cbd3655936503cd5cffe22ea2aae69d287d31f39..860257c0d83a242763624c45c5c00c4b6e5d3cc3 100644
--- a/gpu/ipc/host/gpu_memory_buffer_support.cc
+++ b/gpu/ipc/host/gpu_memory_buffer_support.cc
@@ -10,14 +10,16 @@
#include "gpu/ipc/common/gpu_memory_buffer_support.h"
#include "gpu/ipc/host/gpu_switches.h"
#include "ui/gl/gl_bindings.h"
+#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_switches.h"
namespace gpu {
bool AreNativeGpuMemoryBuffersEnabled() {
- // Disable native buffers when using Mesa.
+ // Disable native buffers when using software GL.
if (base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kUseGL) == gl::kGLImplementationOSMesaName) {
+ switches::kUseGL) ==
+ gl::GetGLImplementationName(gl::GetSoftwareGLImplementation())) {
return false;
}
@@ -57,10 +59,11 @@ GpuMemoryBufferConfigurationSet GetNativeGpuMemoryBufferConfigurations() {
}
}
- // Disable native buffers only when using Mesa.
+ // Disable native buffers only when using software GL.
bool force_native_gpu_read_write_formats =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kUseGL) != gl::kGLImplementationOSMesaName;
+ switches::kUseGL) !=
+ gl::GetGLImplementationName(gl::GetSoftwareGLImplementation());
if (force_native_gpu_read_write_formats) {
const gfx::BufferFormat kGPUReadWriteFormats[] = {
gfx::BufferFormat::BGR_565, gfx::BufferFormat::RGBA_8888,
« no previous file with comments | « content/shell/app/shell_main_delegate.cc ('k') | gpu/ipc/service/gpu_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698