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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 699073004: content: Add command line flag for native GPU memory buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gpu-memory-buffer-impl-unittests
Patch Set: rebase and use correct texture target Created 6 years, 1 month 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
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index ccf3d722432f255d9e27be197e0d7b846ccc1022..2764d92a50ac49463a37c51284276c91a0c8d05a 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -105,6 +105,7 @@
#include "content/common/child_process_host_impl.h"
#include "content/common/child_process_messages.h"
#include "content/common/content_switches_internal.h"
+#include "content/common/gpu/client/gpu_memory_buffer_impl.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/common/mojo/mojo_messages.h"
#include "content/common/resource_messages.h"
@@ -1021,6 +1022,10 @@ static void AppendCompositorCommandLineFlags(base::CommandLine* command_line) {
if (IsForceGpuRasterizationEnabled())
command_line->AppendSwitch(switches::kForceGpuRasterization);
+ // Surface texture backed GPU memory buffers require TEXTURE_EXTERNAL_OES.
+ if (GpuMemoryBufferImpl::GetPreferredType() == gfx::SURFACE_TEXTURE_BUFFER)
+ command_line->AppendSwitch(switches::kUseImageExternal);
+
// Appending disable-gpu-feature switches due to software rendering list.
GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
DCHECK(gpu_data_manager);

Powered by Google App Engine
This is Rietveld 408576698