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

Side by Side 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: Introduce switches::kUseImageIOSurface 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 std::vector<gfx::GpuMemoryBufferType> supported_types; 1033 std::vector<gfx::GpuMemoryBufferType> supported_types;
1034 GpuMemoryBufferFactory::GetSupportedTypes(&supported_types); 1034 GpuMemoryBufferFactory::GetSupportedTypes(&supported_types);
1035 DCHECK(!supported_types.empty()); 1035 DCHECK(!supported_types.empty());
1036 1036
1037 // The GPU service will always use the preferred type. 1037 // The GPU service will always use the preferred type.
1038 gfx::GpuMemoryBufferType type = supported_types[0]; 1038 gfx::GpuMemoryBufferType type = supported_types[0];
1039 1039
1040 // Surface texture backed GPU memory buffers require TEXTURE_EXTERNAL_OES. 1040 // Surface texture backed GPU memory buffers require TEXTURE_EXTERNAL_OES.
1041 if (type == gfx::SURFACE_TEXTURE_BUFFER) 1041 if (type == gfx::SURFACE_TEXTURE_BUFFER)
1042 command_line->AppendSwitch(switches::kUseImageExternal); 1042 command_line->AppendSwitch(switches::kUseImageExternal);
1043
1044 // Surface texture backed GPU memory buffers require
1045 // GL_TEXTURE_RECTANGLE_ARB.
1046 if (type == gfx::IO_SURFACE_BUFFER)
1047 command_line->AppendSwitch(switches::kUseImageIOSurface);
1043 } 1048 }
1044 1049
1045 // Appending disable-gpu-feature switches due to software rendering list. 1050 // Appending disable-gpu-feature switches due to software rendering list.
1046 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); 1051 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
1047 DCHECK(gpu_data_manager); 1052 DCHECK(gpu_data_manager);
1048 gpu_data_manager->AppendRendererCommandLine(command_line); 1053 gpu_data_manager->AppendRendererCommandLine(command_line);
1049 } 1054 }
1050 1055
1051 void RenderProcessHostImpl::AppendRendererCommandLine( 1056 void RenderProcessHostImpl::AppendRendererCommandLine(
1052 base::CommandLine* command_line) const { 1057 base::CommandLine* command_line) const {
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 2275
2271 void RenderProcessHostImpl::DecrementWorkerRefCount() { 2276 void RenderProcessHostImpl::DecrementWorkerRefCount() {
2272 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2277 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2273 DCHECK_GT(worker_ref_count_, 0); 2278 DCHECK_GT(worker_ref_count_, 0);
2274 --worker_ref_count_; 2279 --worker_ref_count_;
2275 if (worker_ref_count_ == 0) 2280 if (worker_ref_count_ == 0)
2276 Cleanup(); 2281 Cleanup();
2277 } 2282 }
2278 2283
2279 } // namespace content 2284 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698