Index: ui/compositor/compositor.cc |
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc |
index edc4622ff25ad13f3afe906e98fd5a1bf78783a4..76b13935fe747af4a257945ebc9d5349b00cf582 100644 |
--- a/ui/compositor/compositor.cc |
+++ b/ui/compositor/compositor.cc |
@@ -137,21 +137,17 @@ Compositor::Compositor(gfx::AcceleratedWidget widget, |
settings.use_zero_copy = IsUIZeroCopyEnabled(); |
settings.use_one_copy = IsUIOneCopyEnabled(); |
- // 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; |
- |
// Use PERSISTENT_MAP memory buffers to support partial tile raster for |
// software raster into GpuMemoryBuffers. |
gfx::GpuMemoryBuffer::Usage usage = gfx::GpuMemoryBuffer::PERSISTENT_MAP; |
settings.use_persistent_map_for_gpu_memory_buffers = true; |
- settings.use_image_texture_target = |
- context_factory_->GetImageTextureTarget(format, usage); |
+ for (size_t format = 0; format < gfx::GpuMemoryBuffer::FORMAT_LAST + 1; |
+ format++) { |
+ settings.use_image_texture_targets[format] = |
reveman
2015/07/27 17:07:15
nit: DCHECK_GT(settings.use_image_texture_targets.
|
+ context_factory_->GetImageTextureTarget( |
+ static_cast<gfx::GpuMemoryBuffer::Format>(format), usage); |
+ } |
// Note: gathering of pixel refs is only needed when using multiple |
// raster threads. |