| Index: content/browser/renderer_host/render_process_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
| index 14006ce388f2c59fd6e83ec6256919e5f01b3bba..e3092f8cb1951e0d34d5efba560f4d86be0a475d 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -1137,10 +1137,21 @@ static void AppendCompositorCommandLineFlags(base::CommandLine* command_line) {
|
| if (IsForceGpuRasterizationEnabled())
|
| command_line->AppendSwitch(switches::kForceGpuRasterization);
|
|
|
| + // TODO(reveman): We currently assume that the compositor will use BGRA_8888
|
| + // if it's able to, and RGBA_8888 otherwise. Since we don't know what it will
|
| + // use we hardcode BGRA_8888 here for now. We should instead move decisions
|
| + // about GpuMemoryBuffer format to the browser embedder so we know it here,
|
| + // and pass that decision to the compositor.
|
| + gfx::GpuMemoryBuffer::Format format = gfx::GpuMemoryBuffer::BGRA_8888;
|
| +
|
| + command_line->AppendSwitchASCII(
|
| + switches::kMapImageTextureTarget,
|
| + base::UintToString(BrowserGpuChannelHostFactory::GetImageTextureTarget(
|
| + format, gfx::GpuMemoryBuffer::MAP)));
|
| command_line->AppendSwitchASCII(
|
| - switches::kUseImageTextureTarget,
|
| - base::UintToString(
|
| - BrowserGpuChannelHostFactory::GetImageTextureTarget()));
|
| + switches::kPersistentMapImageTextureTarget,
|
| + base::UintToString(BrowserGpuChannelHostFactory::GetImageTextureTarget(
|
| + format, gfx::GpuMemoryBuffer::PERSISTENT_MAP)));
|
|
|
| // Appending disable-gpu-feature switches due to software rendering list.
|
| GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
|
|
|