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

Side by Side 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: remove runtime flag unsafeES3APIs from blink webgl module Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/texture_manager.h" 5 #include "gpu/command_buffer/service/texture_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 gl_.get(), error_state_.get(), manager_.get(), 104 gl_.get(), error_state_.get(), manager_.get(),
105 texture_ref, pname, value, error); 105 texture_ref, pname, value, error);
106 } 106 }
107 107
108 void SetupFeatureInfo(const char* gl_extensions, 108 void SetupFeatureInfo(const char* gl_extensions,
109 const char* gl_version, 109 const char* gl_version,
110 bool enable_es3) { 110 bool enable_es3) {
111 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( 111 TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
112 gl_.get(), gl_extensions, "", gl_version, 112 gl_.get(), gl_extensions, "", gl_version,
113 feature_info_->context_type(), enable_es3); 113 feature_info_->context_type(), enable_es3);
114 feature_info_->InitializeForTesting(); 114 if (enable_es3) {
115 EXPECT_CALL(*gl_, GetIntegerv(35055, _))
116 .Times(1)
117 .RetiresOnSaturation();
118 }
119 feature_info_->InitializeForTesting(
120 enable_es3 ? CONTEXT_TYPE_OPENGLES3 : CONTEXT_TYPE_OPENGLES2);
115 if (enable_es3) { 121 if (enable_es3) {
116 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) 122 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _))
117 .WillOnce(SetArgPointee<1>(8)) 123 .WillOnce(SetArgPointee<1>(8))
118 .RetiresOnSaturation(); 124 .RetiresOnSaturation();
119 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) 125 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _))
120 .WillOnce(SetArgPointee<1>(8)) 126 .WillOnce(SetArgPointee<1>(8))
121 .RetiresOnSaturation(); 127 .RetiresOnSaturation();
122 feature_info_->EnableES3Validators(); 128 feature_info_->EnableES3Validators();
123 } 129 }
124 } 130 }
(...skipping 2569 matching lines...) Expand 10 before | Expand all | Expand 10 after
2694 ExpectValid( 2700 ExpectValid(
2695 true, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8); 2701 true, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, GL_DEPTH24_STENCIL8);
2696 ExpectValid(true, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, 2702 ExpectValid(true, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV,
2697 GL_DEPTH32F_STENCIL8); 2703 GL_DEPTH32F_STENCIL8);
2698 2704
2699 ExpectInvalid(true, GL_RGB_INTEGER, GL_INT, GL_RGBA8); 2705 ExpectInvalid(true, GL_RGB_INTEGER, GL_INT, GL_RGBA8);
2700 } 2706 }
2701 2707
2702 } // namespace gles2 2708 } // namespace gles2
2703 } // namespace gpu 2709 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698