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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.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, 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 CopyTexImage2D cmd; 735 CopyTexImage2D cmd;
736 cmd.Init(target, level, internal_format, 0, 0, width, height); 736 cmd.Init(target, level, internal_format, 0, 0, width, height);
737 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 737 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
738 EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError()); 738 EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError());
739 EXPECT_FALSE( 739 EXPECT_FALSE(
740 texture->GetLevelSize(GL_TEXTURE_2D, level, &width, &height, nullptr)); 740 texture->GetLevelSize(GL_TEXTURE_2D, level, &width, &height, nullptr));
741 } 741 }
742 742
743 TEST_P(GLES2DecoderManualInitTest, CopyTexImage2DUnsizedInternalFormat) { 743 TEST_P(GLES2DecoderManualInitTest, CopyTexImage2DUnsizedInternalFormat) {
744 base::CommandLine command_line(0, NULL); 744 base::CommandLine command_line(0, NULL);
745 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs);
746 InitState init; 745 InitState init;
747 init.gl_version = "OpenGL ES 3.0"; 746 init.gl_version = "OpenGL ES 3.0";
748 init.extensions = "GL_APPLE_texture_format_BGRA8888 GL_EXT_sRGB"; 747 init.extensions = "GL_APPLE_texture_format_BGRA8888 GL_EXT_sRGB";
749 init.has_alpha = true; 748 init.has_alpha = true;
750 init.request_alpha = true; 749 init.request_alpha = true;
751 init.bind_generates_resource = true; 750 init.bind_generates_resource = true;
752 init.context_type = CONTEXT_TYPE_OPENGLES2; 751 init.context_type = CONTEXT_TYPE_OPENGLES2;
753 InitDecoderWithCommandLine(init, &command_line); 752 InitDecoderWithCommandLine(init, &command_line);
754 753
755 GLenum kUnsizedInternalFormats[] = { 754 GLenum kUnsizedInternalFormats[] = {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 if (complete) { 825 if (complete) {
827 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 826 EXPECT_EQ(GL_NO_ERROR, GetGLError());
828 } else { 827 } else {
829 EXPECT_EQ(GL_INVALID_FRAMEBUFFER_OPERATION, GetGLError()); 828 EXPECT_EQ(GL_INVALID_FRAMEBUFFER_OPERATION, GetGLError());
830 } 829 }
831 } 830 }
832 } 831 }
833 832
834 TEST_P(GLES2DecoderManualInitTest, CopyTexImage2DUnsizedInternalFormatES3) { 833 TEST_P(GLES2DecoderManualInitTest, CopyTexImage2DUnsizedInternalFormatES3) {
835 base::CommandLine command_line(0, NULL); 834 base::CommandLine command_line(0, NULL);
836 command_line.AppendSwitch(switches::kEnableUnsafeES3APIs);
837 InitState init; 835 InitState init;
838 init.gl_version = "OpenGL ES 3.0"; 836 init.gl_version = "OpenGL ES 3.0";
839 init.extensions = "GL_APPLE_texture_format_BGRA8888"; 837 init.extensions = "GL_APPLE_texture_format_BGRA8888";
840 init.has_alpha = true; 838 init.has_alpha = true;
841 init.request_alpha = true; 839 init.request_alpha = true;
842 init.bind_generates_resource = true; 840 init.bind_generates_resource = true;
843 init.context_type = CONTEXT_TYPE_OPENGLES3; 841 init.context_type = CONTEXT_TYPE_OPENGLES3;
844 InitDecoderWithCommandLine(init, &command_line); 842 InitDecoderWithCommandLine(init, &command_line);
845 843
846 struct UnsizedSizedInternalFormat { 844 struct UnsizedSizedInternalFormat {
(...skipping 3842 matching lines...) Expand 10 before | Expand all | Expand 10 after
4689 // TODO(gman): CompressedTexSubImage2DImmediate 4687 // TODO(gman): CompressedTexSubImage2DImmediate
4690 4688
4691 // TODO(gman): TexImage2D 4689 // TODO(gman): TexImage2D
4692 4690
4693 // TODO(gman): TexImage2DImmediate 4691 // TODO(gman): TexImage2DImmediate
4694 4692
4695 // TODO(gman): TexSubImage2DImmediate 4693 // TODO(gman): TexSubImage2DImmediate
4696 4694
4697 } // namespace gles2 4695 } // namespace gles2
4698 } // namespace gpu 4696 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc ('k') | gpu/command_buffer/service/gpu_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698