Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3584)

Unified Diff: cc/test/test_image_texture_targets_map.cc

Issue 2120713002: Fix use_image_texture_target inconsistencies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698