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

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

Issue 766663005: cc: zero/one-copy based on shared memory on IOS uses GL_TEXTURE_2D, not GL_TEXTURE_RECTANGLE_ARB. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: replace use_image_external+use_texture_rectangle with a texture target Created 6 years 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 e683a1d5c25baca05e0e7108628f8f031ff46f3c..cc9b1a8ad0aeab44a65cc39ef468d3c0206bbe62 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1037,9 +1037,15 @@ static void AppendCompositorCommandLineFlags(base::CommandLine* command_line) {
// The GPU service will always use the preferred type.
gfx::GpuMemoryBufferType type = supported_types[0];
- // Surface texture backed GPU memory buffers require TEXTURE_EXTERNAL_OES.
- if (type == gfx::SURFACE_TEXTURE_BUFFER)
- command_line->AppendSwitch(switches::kUseImageExternal);
+ if (type == gfx::SURFACE_TEXTURE_BUFFER) {
reveman 2014/12/03 15:57:19 please use a switch statement instead.
+ // Surface texture backed GPU memory buffers require TEXTURE_EXTERNAL_OES.
+ command_line->AppendSwitchASCII(switches::kImageTextureTarget,
+ "GL_TEXTURE_EXTERNAL_OES");
+ } else if (type == gfx::IO_SURFACE_BUFFER) {
+ // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB.
+ command_line->AppendSwitchASCII(switches::kImageTextureTarget,
+ "GL_TEXTURE_RECTANGLE_ARB");
+ }
}
// Appending disable-gpu-feature switches due to software rendering list.

Powered by Google App Engine
This is Rietveld 408576698