| Index: cc/test/test_image_texture_targets_map.cc
|
| diff --git a/cc/test/test_image_texture_targets_map.cc b/cc/test/test_image_texture_targets_map.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5716a6c9d9fadbc1b2aa1b465ff4310a75c62ee2
|
| --- /dev/null
|
| +++ b/cc/test/test_image_texture_targets_map.cc
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +#include "cc/test/test_image_texture_targets_map.h"
|
| +
|
| +#include "gpu/GLES2/gl2extchromium.h"
|
| +#include "ui/gfx/buffer_types.h"
|
| +
|
| +namespace cc {
|
| +
|
| +RendererSettings::ImageTextureTargetsMap TestImageTextureTargetsMap() {
|
| + RendererSettings::ImageTextureTargetsMap image_targets;
|
| + for (size_t usage_idx = 0;
|
| + usage_idx <= static_cast<size_t>(gfx::BufferUsage::LAST) + 1;
|
| + ++usage_idx) {
|
| + gfx::BufferUsage usage = static_cast<gfx::BufferUsage>(usage_idx);
|
| + for (size_t format_idx = 0;
|
| + format_idx < static_cast<size_t>(gfx::BufferFormat::LAST) + 1;
|
| + ++format_idx) {
|
| + gfx::BufferFormat format = static_cast<gfx::BufferFormat>(format_idx);
|
| + image_targets.emplace(
|
| + RendererSettings::ImageTextureTargetKey(usage, format),
|
| + GL_TEXTURE_2D);
|
| + }
|
| + }
|
| +
|
| + return image_targets;
|
| +}
|
| +
|
| +} // namespace cc
|
|
|