| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2008 switches::kEnableGpuMemoryBufferCompositorResources); | 2008 switches::kEnableGpuMemoryBufferCompositorResources); |
| 2009 } | 2009 } |
| 2010 | 2010 |
| 2011 if (IsMainFrameBeforeActivationEnabled()) | 2011 if (IsMainFrameBeforeActivationEnabled()) |
| 2012 command_line->AppendSwitch(cc::switches::kEnableMainFrameBeforeActivation); | 2012 command_line->AppendSwitch(cc::switches::kEnableMainFrameBeforeActivation); |
| 2013 | 2013 |
| 2014 if (IsCheckerImagingEnabled()) | 2014 if (IsCheckerImagingEnabled()) |
| 2015 command_line->AppendSwitch(cc::switches::kEnableCheckerImaging); | 2015 command_line->AppendSwitch(cc::switches::kEnableCheckerImaging); |
| 2016 | 2016 |
| 2017 cc::BufferToTextureTargetMap image_targets; | 2017 cc::BufferToTextureTargetMap image_targets; |
| 2018 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); | 2018 GetBufferToTextureTargetMap(&image_targets); |
| 2019 ++usage_idx) { | |
| 2020 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); | |
| 2021 for (int format_idx = 0; | |
| 2022 format_idx <= static_cast<int>(gfx::BufferFormat::LAST); | |
| 2023 ++format_idx) { | |
| 2024 gfx::BufferFormat format = static_cast<gfx::BufferFormat>(format_idx); | |
| 2025 uint32_t target = gpu::GetImageTextureTarget(format, usage); | |
| 2026 image_targets[std::make_pair(usage, format)] = target; | |
| 2027 } | |
| 2028 } | |
| 2029 command_line->AppendSwitchASCII( | 2019 command_line->AppendSwitchASCII( |
| 2030 switches::kContentImageTextureTarget, | 2020 switches::kContentImageTextureTarget, |
| 2031 cc::BufferToTextureTargetMapToString(image_targets)); | 2021 cc::BufferToTextureTargetMapToString(image_targets)); |
| 2032 | 2022 |
| 2033 // Appending disable-gpu-feature switches due to software rendering list. | 2023 // Appending disable-gpu-feature switches due to software rendering list. |
| 2034 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); | 2024 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); |
| 2035 DCHECK(gpu_data_manager); | 2025 DCHECK(gpu_data_manager); |
| 2036 gpu_data_manager->AppendRendererCommandLine(command_line); | 2026 gpu_data_manager->AppendRendererCommandLine(command_line); |
| 2037 | 2027 |
| 2038 // Slimming Paint v2 implies layer lists in the renderer. | 2028 // Slimming Paint v2 implies layer lists in the renderer. |
| (...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3626 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3616 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3627 | 3617 |
| 3628 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3618 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3629 // Capture the error message in a crash key value. | 3619 // Capture the error message in a crash key value. |
| 3630 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3620 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3631 bad_message::ReceivedBadMessage(render_process_id, | 3621 bad_message::ReceivedBadMessage(render_process_id, |
| 3632 bad_message::RPH_MOJO_PROCESS_ERROR); | 3622 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3633 } | 3623 } |
| 3634 | 3624 |
| 3635 } // namespace content | 3625 } // namespace content |
| OLD | NEW |