OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 #include "cc/test/test_image_texture_targets_map.h" |
| 5 |
| 6 #include "gpu/GLES2/gl2extchromium.h" |
| 7 #include "ui/gfx/buffer_types.h" |
| 8 |
| 9 namespace cc { |
| 10 |
| 11 RendererSettings::ImageTextureTargetsMap TestImageTextureTargetsMap() { |
| 12 RendererSettings::ImageTextureTargetsMap image_targets; |
| 13 for (size_t usage_idx = 0; |
| 14 usage_idx <= static_cast<size_t>(gfx::BufferUsage::LAST) + 1; |
| 15 ++usage_idx) { |
| 16 gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx); |
| 17 for (size_t format_idx = 0; |
| 18 format_idx < static_cast<size_t>(gfx::BufferFormat::LAST) + 1; |
| 19 ++format_idx) { |
| 20 gfx::BufferFormat format = static_cast<gfx::BufferFormat>(format_idx); |
| 21 image_targets.emplace( |
| 22 RendererSettings::ImageTextureTargetKey(usage, format), |
| 23 GL_TEXTURE_2D); |
| 24 } |
| 25 } |
| 26 |
| 27 return image_targets; |
| 28 } |
| 29 |
| 30 } // namespace cc |
OLD | NEW |