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

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: 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 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 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 1030
1031 if (BrowserGpuChannelHostFactory::IsGpuMemoryBufferFactoryUsageEnabled( 1031 if (BrowserGpuChannelHostFactory::IsGpuMemoryBufferFactoryUsageEnabled(
1032 gfx::GpuMemoryBuffer::MAP)) { 1032 gfx::GpuMemoryBuffer::MAP)) {
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 if (type == gfx::SURFACE_TEXTURE_BUFFER) {
reveman 2014/12/03 15:57:19 please use a switch statement instead.
1041 if (type == gfx::SURFACE_TEXTURE_BUFFER) 1041 // Surface texture backed GPU memory buffers require TEXTURE_EXTERNAL_OES.
1042 command_line->AppendSwitch(switches::kUseImageExternal); 1042 command_line->AppendSwitchASCII(switches::kImageTextureTarget,
1043 "GL_TEXTURE_EXTERNAL_OES");
1044 } else if (type == gfx::IO_SURFACE_BUFFER) {
1045 // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB.
1046 command_line->AppendSwitchASCII(switches::kImageTextureTarget,
1047 "GL_TEXTURE_RECTANGLE_ARB");
1048 }
1043 } 1049 }
1044 1050
1045 // Appending disable-gpu-feature switches due to software rendering list. 1051 // Appending disable-gpu-feature switches due to software rendering list.
1046 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); 1052 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
1047 DCHECK(gpu_data_manager); 1053 DCHECK(gpu_data_manager);
1048 gpu_data_manager->AppendRendererCommandLine(command_line); 1054 gpu_data_manager->AppendRendererCommandLine(command_line);
1049 } 1055 }
1050 1056
1051 void RenderProcessHostImpl::AppendRendererCommandLine( 1057 void RenderProcessHostImpl::AppendRendererCommandLine(
1052 base::CommandLine* command_line) const { 1058 base::CommandLine* command_line) const {
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
2280 2286
2281 void RenderProcessHostImpl::DecrementWorkerRefCount() { 2287 void RenderProcessHostImpl::DecrementWorkerRefCount() {
2282 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2288 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2283 DCHECK_GT(worker_ref_count_, 0); 2289 DCHECK_GT(worker_ref_count_, 0);
2284 --worker_ref_count_; 2290 --worker_ref_count_;
2285 if (worker_ref_count_ == 0) 2291 if (worker_ref_count_ == 0)
2286 Cleanup(); 2292 Cleanup();
2287 } 2293 }
2288 2294
2289 } // namespace content 2295 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698