Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 // Surface texture backed GPU memory buffers require TEXTURE_EXTERNAL_OES |
| 1041 if (type == gfx::SURFACE_TEXTURE_BUFFER) | 1041 // or GL_TEXTURE_RECTANGLE_ARB. |
|
reveman
2014/12/01 17:03:14
This comment is now incorrect and telling the rend
| |
| 1042 if (type == gfx::SURFACE_TEXTURE_BUFFER || type == gfx::IO_SURFACE_BUFFER) | |
| 1042 command_line->AppendSwitch(switches::kUseImageExternal); | 1043 command_line->AppendSwitch(switches::kUseImageExternal); |
| 1043 } | 1044 } |
| 1044 | 1045 |
| 1045 // Appending disable-gpu-feature switches due to software rendering list. | 1046 // Appending disable-gpu-feature switches due to software rendering list. |
| 1046 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); | 1047 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); |
| 1047 DCHECK(gpu_data_manager); | 1048 DCHECK(gpu_data_manager); |
| 1048 gpu_data_manager->AppendRendererCommandLine(command_line); | 1049 gpu_data_manager->AppendRendererCommandLine(command_line); |
| 1049 } | 1050 } |
| 1050 | 1051 |
| 1051 void RenderProcessHostImpl::AppendRendererCommandLine( | 1052 void RenderProcessHostImpl::AppendRendererCommandLine( |
| (...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2270 | 2271 |
| 2271 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2272 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 2272 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2273 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2273 DCHECK_GT(worker_ref_count_, 0); | 2274 DCHECK_GT(worker_ref_count_, 0); |
| 2274 --worker_ref_count_; | 2275 --worker_ref_count_; |
| 2275 if (worker_ref_count_ == 0) | 2276 if (worker_ref_count_ == 0) |
| 2276 Cleanup(); | 2277 Cleanup(); |
| 2277 } | 2278 } |
| 2278 | 2279 |
| 2279 } // namespace content | 2280 } // namespace content |
| OLD | NEW |