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

Unified Diff: gpu/command_buffer/tests/gl_unittest.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « gpu/command_buffer/tests/gl_tests_main.cc ('k') | gpu/command_buffer_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_unittest.cc b/gpu/command_buffer/tests/gl_unittest.cc
index 9915190001186f2b071d744cad77470966bf0e91..49eb00256cd720aa66b0a4493d8280d38c467133 100644
--- a/gpu/command_buffer/tests/gl_unittest.cc
+++ b/gpu/command_buffer/tests/gl_unittest.cc
@@ -5,6 +5,7 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
+#include "gpu/command_buffer/service/feature_info.h"
#include "gpu/command_buffer/tests/gl_manager.h"
#include "gpu/command_buffer/tests/gl_test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -88,6 +89,25 @@ TEST_F(GLTest, SimpleShader) {
EXPECT_TRUE(GLTestHelper::CheckPixels(0, 0, 1, 1, 0, expected_draw));
}
+TEST_F(GLTest, FeatureFlagsMatchCapabilities) {
+ scoped_refptr<gles2::FeatureInfo> features = new gles2::FeatureInfo;
+ EXPECT_TRUE(features->Initialize());
+ const auto& caps = gl_.GetCapabilities();
+ const auto& flags = features->feature_flags();
+ EXPECT_EQ(caps.egl_image_external, flags.oes_egl_image_external);
+ EXPECT_EQ(caps.texture_format_bgra8888, flags.ext_texture_format_bgra8888);
+ EXPECT_EQ(caps.texture_format_etc1, flags.oes_compressed_etc1_rgb8_texture);
+ EXPECT_EQ(caps.texture_rectangle, flags.arb_texture_rectangle);
+ EXPECT_EQ(caps.texture_usage, flags.angle_texture_usage);
+ EXPECT_EQ(caps.texture_storage, flags.ext_texture_storage);
+ EXPECT_EQ(caps.discard_framebuffer, flags.ext_discard_framebuffer);
+ EXPECT_EQ(caps.sync_query, flags.chromium_sync_query);
+ EXPECT_EQ(caps.blend_equation_advanced, flags.blend_equation_advanced);
+ EXPECT_EQ(caps.blend_equation_advanced_coherent,
+ flags.blend_equation_advanced_coherent);
+ EXPECT_EQ(caps.texture_rg, flags.ext_texture_rg);
+}
+
TEST_F(GLTest, GetString) {
EXPECT_STREQ(
"OpenGL ES 2.0 Chromium",
« no previous file with comments | « gpu/command_buffer/tests/gl_tests_main.cc ('k') | gpu/command_buffer_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698