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

Unified Diff: gpu/command_buffer/service/texture_manager_unittest.cc

Issue 2444813002: Remove unsafe mode to enable es3 api by default for WebGL2 and ES3 context (Closed)
Patch Set: fix a bug Created 4 years, 2 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: gpu/command_buffer/service/texture_manager_unittest.cc
diff --git a/gpu/command_buffer/service/texture_manager_unittest.cc b/gpu/command_buffer/service/texture_manager_unittest.cc
index 476222672ace590cd35e28cf16dc94b3de0515ff..a29e70f1decea1b4eb0b3e72d7e1ebe7ed77778e 100644
--- a/gpu/command_buffer/service/texture_manager_unittest.cc
+++ b/gpu/command_buffer/service/texture_manager_unittest.cc
@@ -27,6 +27,7 @@
#include "ui/gl/gl_mock.h"
#include "ui/gl/gl_switches.h"
+using ::testing::AnyNumber;
using ::testing::AtLeast;
using ::testing::Pointee;
using ::testing::Return;
@@ -71,7 +72,6 @@ class TextureManagerTest : public GpuServiceTest {
// Always run with this command line, but the ES3 features are not
// enabled without FeatureInfo::EnableES3Validators().
base::CommandLine command_line(0, nullptr);
- command_line.AppendSwitch(switches::kEnableUnsafeES3APIs);
GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line);
feature_info_ = new FeatureInfo(command_line, gpu_driver_bug_workaround);
}
@@ -111,7 +111,16 @@ class TextureManagerTest : public GpuServiceTest {
TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
gl_.get(), gl_extensions, "", gl_version,
feature_info_->context_type(), enable_es3);
- feature_info_->InitializeForTesting();
+ if (enable_es3) {
+ EXPECT_CALL(*gl_, GetIntegerv(GL_PIXEL_UNPACK_BUFFER_BINDING, _))
+ .Times(1)
+ .RetiresOnSaturation();
+ EXPECT_CALL(*gl_, BindBuffer(GL_PIXEL_UNPACK_BUFFER, _))
+ .Times(AnyNumber())
+ .RetiresOnSaturation();
+ }
+ feature_info_->InitializeForTesting(
+ enable_es3 ? CONTEXT_TYPE_OPENGLES3 : CONTEXT_TYPE_OPENGLES2);
if (enable_es3) {
EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _))
.WillOnce(SetArgPointee<1>(8))
« no previous file with comments | « gpu/command_buffer/service/gpu_preferences.h ('k') | gpu/command_buffer/tests/es3_misc_functions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698