| 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 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 command_line->AppendSwitch(switches::kDisablePartialRaster); | 1234 command_line->AppendSwitch(switches::kDisablePartialRaster); |
| 1235 | 1235 |
| 1236 if (IsForceGpuRasterizationEnabled()) | 1236 if (IsForceGpuRasterizationEnabled()) |
| 1237 command_line->AppendSwitch(switches::kForceGpuRasterization); | 1237 command_line->AppendSwitch(switches::kForceGpuRasterization); |
| 1238 | 1238 |
| 1239 if (IsGpuMemoryBufferCompositorResourcesEnabled()) { | 1239 if (IsGpuMemoryBufferCompositorResourcesEnabled()) { |
| 1240 command_line->AppendSwitch( | 1240 command_line->AppendSwitch( |
| 1241 switches::kEnableGpuMemoryBufferCompositorResources); | 1241 switches::kEnableGpuMemoryBufferCompositorResources); |
| 1242 } | 1242 } |
| 1243 | 1243 |
| 1244 if (IsMainFrameBeforeActivationEnabled()) |
| 1245 command_line->AppendSwitch(cc::switches::kEnableMainFrameBeforeActivation); |
| 1246 |
| 1244 // Persistent buffers may come at a performance hit (not all platform specific | 1247 // Persistent buffers may come at a performance hit (not all platform specific |
| 1245 // buffers support it), so only enable them if partial raster is enabled and | 1248 // buffers support it), so only enable them if partial raster is enabled and |
| 1246 // we are actually going to use them. | 1249 // we are actually going to use them. |
| 1247 // TODO(dcastagna): Once GPU_READ_CPU_READ_WRITE_PERSISTENT is removed | 1250 // TODO(dcastagna): Once GPU_READ_CPU_READ_WRITE_PERSISTENT is removed |
| 1248 // kContentImageTextureTarget and kVideoImageTextureTarget can be merged into | 1251 // kContentImageTextureTarget and kVideoImageTextureTarget can be merged into |
| 1249 // one flag. | 1252 // one flag. |
| 1250 gfx::BufferUsage buffer_usage = | 1253 gfx::BufferUsage buffer_usage = |
| 1251 IsPartialRasterEnabled() | 1254 IsPartialRasterEnabled() |
| 1252 ? gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT | 1255 ? gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT |
| 1253 : gfx::BufferUsage::GPU_READ_CPU_READ_WRITE; | 1256 : gfx::BufferUsage::GPU_READ_CPU_READ_WRITE; |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 switches::kUseRemoteCompositing, | 1464 switches::kUseRemoteCompositing, |
| 1462 switches::kV, | 1465 switches::kV, |
| 1463 switches::kV8CacheStrategiesForCacheStorage, | 1466 switches::kV8CacheStrategiesForCacheStorage, |
| 1464 switches::kVideoThreads, | 1467 switches::kVideoThreads, |
| 1465 switches::kVideoUnderflowThresholdMs, | 1468 switches::kVideoUnderflowThresholdMs, |
| 1466 switches::kVModule, | 1469 switches::kVModule, |
| 1467 // Please keep these in alphabetical order. Compositor switches here should | 1470 // Please keep these in alphabetical order. Compositor switches here should |
| 1468 // also be added to chrome/browser/chromeos/login/chrome_restart_request.cc. | 1471 // also be added to chrome/browser/chromeos/login/chrome_restart_request.cc. |
| 1469 cc::switches::kDisableCachedPictureRaster, | 1472 cc::switches::kDisableCachedPictureRaster, |
| 1470 cc::switches::kDisableCompositedAntialiasing, | 1473 cc::switches::kDisableCompositedAntialiasing, |
| 1471 cc::switches::kDisableMainFrameBeforeActivation, | |
| 1472 cc::switches::kDisableThreadedAnimation, | 1474 cc::switches::kDisableThreadedAnimation, |
| 1473 cc::switches::kEnableBeginFrameScheduling, | 1475 cc::switches::kEnableBeginFrameScheduling, |
| 1474 cc::switches::kEnableGpuBenchmarking, | 1476 cc::switches::kEnableGpuBenchmarking, |
| 1475 cc::switches::kEnableLayerLists, | 1477 cc::switches::kEnableLayerLists, |
| 1476 cc::switches::kEnableMainFrameBeforeActivation, | |
| 1477 cc::switches::kEnableTileCompression, | 1478 cc::switches::kEnableTileCompression, |
| 1478 cc::switches::kShowCompositedLayerBorders, | 1479 cc::switches::kShowCompositedLayerBorders, |
| 1479 cc::switches::kShowFPSCounter, | 1480 cc::switches::kShowFPSCounter, |
| 1480 cc::switches::kShowLayerAnimationBounds, | 1481 cc::switches::kShowLayerAnimationBounds, |
| 1481 cc::switches::kShowPropertyChangedRects, | 1482 cc::switches::kShowPropertyChangedRects, |
| 1482 cc::switches::kShowReplicaScreenSpaceRects, | 1483 cc::switches::kShowReplicaScreenSpaceRects, |
| 1483 cc::switches::kShowScreenSpaceRects, | 1484 cc::switches::kShowScreenSpaceRects, |
| 1484 cc::switches::kShowSurfaceDamageRects, | 1485 cc::switches::kShowSurfaceDamageRects, |
| 1485 cc::switches::kSlowDownRasterScaleFactor, | 1486 cc::switches::kSlowDownRasterScaleFactor, |
| 1486 cc::switches::kTopControlsHideThreshold, | 1487 cc::switches::kTopControlsHideThreshold, |
| (...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2765 | 2766 |
| 2766 // Skip widgets in other processes. | 2767 // Skip widgets in other processes. |
| 2767 if (rvh->GetProcess()->GetID() != GetID()) | 2768 if (rvh->GetProcess()->GetID() != GetID()) |
| 2768 continue; | 2769 continue; |
| 2769 | 2770 |
| 2770 rvh->OnWebkitPreferencesChanged(); | 2771 rvh->OnWebkitPreferencesChanged(); |
| 2771 } | 2772 } |
| 2772 } | 2773 } |
| 2773 | 2774 |
| 2774 } // namespace content | 2775 } // namespace content |
| OLD | NEW |