| 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 194eb3596d4280acd53d7e3bebf820ff5347d170..dc81915ea222449cc4b5369a52ea2a09f81387cd 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -1137,10 +1137,22 @@ 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 for each usage.
|
| + // crbug.com/490362
|
| + gfx::GpuMemoryBuffer::Format format = gfx::GpuMemoryBuffer::BGRA_8888;
|
| +
|
| + // TODO(danakj): When one-copy uploads support partial update, change this
|
| + // usage to PERSISTENT_MAP for one-copy.
|
| + gfx::GpuMemoryBuffer::Usage usage = gfx::GpuMemoryBuffer::MAP;
|
| +
|
| command_line->AppendSwitchASCII(
|
| switches::kUseImageTextureTarget,
|
| base::UintToString(
|
| - BrowserGpuChannelHostFactory::GetImageTextureTarget()));
|
| + BrowserGpuChannelHostFactory::GetImageTextureTarget(format, usage)));
|
|
|
| // Appending disable-gpu-feature switches due to software rendering list.
|
| GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
|
|
|