Chromium Code Reviews| Index: content/browser/renderer_host/compositor_impl_android.cc |
| diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc |
| index fff5edb377455b6abe81f8e9a36ca5d764c3e107..c30af2a8cbb8666067fa2af53e5982c6aa5e5ae3 100644 |
| --- a/content/browser/renderer_host/compositor_impl_android.cc |
| +++ b/content/browser/renderer_host/compositor_impl_android.cc |
| @@ -31,6 +31,7 @@ |
| #include "cc/base/switches.h" |
| #include "cc/input/input_handler.h" |
| #include "cc/layers/layer.h" |
| +#include "cc/output/buffer_to_texture_target_map.h" |
| #include "cc/output/compositor_frame.h" |
| #include "cc/output/context_provider.h" |
| #include "cc/output/output_surface.h" |
| @@ -528,7 +529,19 @@ void CompositorImpl::CreateLayerTreeHost() { |
| command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
| settings.single_thread_proxy_scheduler = true; |
| - animation_host_ = cc::AnimationHost::CreateMainInstance(); |
| + cc::BufferToTextureTargetMap image_targets; |
| + for (int usage_idx = 0; usage_idx <= static_cast<int>(gfx::BufferUsage::LAST); |
| + ++usage_idx) { |
| + gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); |
| + for (int format_idx = 0; |
| + format_idx <= static_cast<int>(gfx::BufferFormat::LAST); |
| + ++format_idx) { |
| + gfx::BufferFormat format = static_cast<gfx::BufferFormat>(format_idx); |
| + uint32_t target = gpu::GetImageTextureTarget(format, usage); |
| + image_targets[std::make_pair(usage, format)] = target; |
| + } |
| + } |
| + settings.buffer_to_texture_target_map = image_targets; |
|
reveman
2017/06/05 18:32:37
nit: avoid making a copy of the map by setting it
|
| cc::LayerTreeHost::InitParams params; |
| params.client = this; |