| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 #include "content/public/common/service_names.mojom.h" | 163 #include "content/public/common/service_names.mojom.h" |
| 164 #include "content/public/common/url_constants.h" | 164 #include "content/public/common/url_constants.h" |
| 165 #include "device/battery/battery_monitor_impl.h" | 165 #include "device/battery/battery_monitor_impl.h" |
| 166 #include "device/gamepad/gamepad_monitor.h" | 166 #include "device/gamepad/gamepad_monitor.h" |
| 167 #include "device/power_monitor/power_monitor_message_broadcaster.h" | 167 #include "device/power_monitor/power_monitor_message_broadcaster.h" |
| 168 #include "device/time_zone_monitor/time_zone_monitor.h" | 168 #include "device/time_zone_monitor/time_zone_monitor.h" |
| 169 #include "gpu/GLES2/gl2extchromium.h" | 169 #include "gpu/GLES2/gl2extchromium.h" |
| 170 #include "gpu/command_buffer/client/gpu_switches.h" | 170 #include "gpu/command_buffer/client/gpu_switches.h" |
| 171 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 171 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 172 #include "gpu/command_buffer/service/gpu_switches.h" | 172 #include "gpu/command_buffer/service/gpu_switches.h" |
| 173 #include "gpu/ipc/host/gpu_memory_buffer_support.h" |
| 173 #include "ipc/ipc.mojom.h" | 174 #include "ipc/ipc.mojom.h" |
| 174 #include "ipc/ipc_channel.h" | 175 #include "ipc/ipc_channel.h" |
| 175 #include "ipc/ipc_channel_mojo.h" | 176 #include "ipc/ipc_channel_mojo.h" |
| 176 #include "ipc/ipc_logging.h" | 177 #include "ipc/ipc_logging.h" |
| 177 #include "media/base/media_switches.h" | 178 #include "media/base/media_switches.h" |
| 178 #include "media/media_features.h" | 179 #include "media/media_features.h" |
| 179 #include "mojo/edk/embedder/embedder.h" | 180 #include "mojo/edk/embedder/embedder.h" |
| 180 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" | 181 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" |
| 181 #include "net/url_request/url_request_context_getter.h" | 182 #include "net/url_request/url_request_context_getter.h" |
| 182 #include "ppapi/features/features.h" | 183 #include "ppapi/features/features.h" |
| (...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1552 command_line->AppendSwitch(cc::switches::kEnableMainFrameBeforeActivation); | 1553 command_line->AppendSwitch(cc::switches::kEnableMainFrameBeforeActivation); |
| 1553 | 1554 |
| 1554 cc::BufferToTextureTargetMap image_targets; | 1555 cc::BufferToTextureTargetMap image_targets; |
| 1555 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); | 1556 for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); |
| 1556 ++usage_idx) { | 1557 ++usage_idx) { |
| 1557 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); | 1558 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); |
| 1558 for (int format_idx = 0; | 1559 for (int format_idx = 0; |
| 1559 format_idx <= static_cast<int>(gfx::BufferFormat::LAST); | 1560 format_idx <= static_cast<int>(gfx::BufferFormat::LAST); |
| 1560 ++format_idx) { | 1561 ++format_idx) { |
| 1561 gfx::BufferFormat format = static_cast<gfx::BufferFormat>(format_idx); | 1562 gfx::BufferFormat format = static_cast<gfx::BufferFormat>(format_idx); |
| 1562 uint32_t target = | 1563 uint32_t target = gpu::GetImageTextureTarget(format, usage); |
| 1563 BrowserGpuMemoryBufferManager::GetImageTextureTarget(format, usage); | 1564 image_targets[std::make_pair(usage, format)] = target; |
| 1564 image_targets.insert(cc::BufferToTextureTargetMap::value_type( | |
| 1565 cc::BufferToTextureTargetKey(usage, format), target)); | |
| 1566 } | 1565 } |
| 1567 } | 1566 } |
| 1568 command_line->AppendSwitchASCII( | 1567 command_line->AppendSwitchASCII( |
| 1569 switches::kContentImageTextureTarget, | 1568 switches::kContentImageTextureTarget, |
| 1570 cc::BufferToTextureTargetMapToString(image_targets)); | 1569 cc::BufferToTextureTargetMapToString(image_targets)); |
| 1571 | 1570 |
| 1572 // Appending disable-gpu-feature switches due to software rendering list. | 1571 // Appending disable-gpu-feature switches due to software rendering list. |
| 1573 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); | 1572 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); |
| 1574 DCHECK(gpu_data_manager); | 1573 DCHECK(gpu_data_manager); |
| 1575 gpu_data_manager->AppendRendererCommandLine(command_line); | 1574 gpu_data_manager->AppendRendererCommandLine(command_line); |
| (...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3003 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3002 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3004 | 3003 |
| 3005 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3004 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3006 // Capture the error message in a crash key value. | 3005 // Capture the error message in a crash key value. |
| 3007 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3006 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3008 bad_message::ReceivedBadMessage(render_process_id, | 3007 bad_message::ReceivedBadMessage(render_process_id, |
| 3009 bad_message::RPH_MOJO_PROCESS_ERROR); | 3008 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3010 } | 3009 } |
| 3011 | 3010 |
| 3012 } // namespace content | 3011 } // namespace content |
| OLD | NEW |