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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" 9 #include "gpu/command_buffer/common/gles2_cmd_format.h"
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 .RetiresOnSaturation(); 119 .RetiresOnSaturation();
120 GenerateMipmap cmd; 120 GenerateMipmap cmd;
121 cmd.Init(GL_TEXTURE_2D); 121 cmd.Init(GL_TEXTURE_2D);
122 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 122 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
123 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 123 EXPECT_EQ(GL_NO_ERROR, GetGLError());
124 } 124 }
125 125
126 // Same as GenerateMipmapClearsUnclearedTexture, but with workaround 126 // Same as GenerateMipmapClearsUnclearedTexture, but with workaround
127 // |set_texture_filters_before_generating_mipmap|. 127 // |set_texture_filters_before_generating_mipmap|.
128 TEST_P(GLES2DecoderManualInitTest, SetTextureFiltersBeforeGenerateMipmap) { 128 TEST_P(GLES2DecoderManualInitTest, SetTextureFiltersBeforeGenerateMipmap) {
129 CommandLine command_line(0, NULL); 129 base::CommandLine command_line(0, NULL);
130 command_line.AppendSwitchASCII( 130 command_line.AppendSwitchASCII(
131 switches::kGpuDriverBugWorkarounds, 131 switches::kGpuDriverBugWorkarounds,
132 base::IntToString(gpu::SET_TEXTURE_FILTER_BEFORE_GENERATING_MIPMAP)); 132 base::IntToString(gpu::SET_TEXTURE_FILTER_BEFORE_GENERATING_MIPMAP));
133 InitState init; 133 InitState init;
134 init.gl_version = "3.0"; 134 init.gl_version = "3.0";
135 init.bind_generates_resource = true; 135 init.bind_generates_resource = true;
136 InitDecoderWithCommandLine(init, &command_line); 136 InitDecoderWithCommandLine(init, &command_line);
137 137
138 EXPECT_CALL(*gl_, GenerateMipmapEXT(_)).Times(0); 138 EXPECT_CALL(*gl_, GenerateMipmapEXT(_)).Times(0);
139 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); 139 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1620 GL_UNSIGNED_BYTE, 1620 GL_UNSIGNED_BYTE,
1621 shared_memory_address_)) 1621 shared_memory_address_))
1622 .Times(1) 1622 .Times(1)
1623 .RetiresOnSaturation(); 1623 .RetiresOnSaturation();
1624 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 1624 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
1625 } 1625 }
1626 1626
1627 TEST_P( 1627 TEST_P(
1628 GLES2DecoderManualInitTest, 1628 GLES2DecoderManualInitTest,
1629 TexSubImage2DDoesNotClearAfterTexImage2DNULLThenDataWithTexImage2DIsFaster) { 1629 TexSubImage2DDoesNotClearAfterTexImage2DNULLThenDataWithTexImage2DIsFaster) {
1630 CommandLine command_line(0, NULL); 1630 base::CommandLine command_line(0, NULL);
1631 command_line.AppendSwitchASCII( 1631 command_line.AppendSwitchASCII(
1632 switches::kGpuDriverBugWorkarounds, 1632 switches::kGpuDriverBugWorkarounds,
1633 base::IntToString(gpu::TEXSUBIMAGE2D_FASTER_THAN_TEXIMAGE2D)); 1633 base::IntToString(gpu::TEXSUBIMAGE2D_FASTER_THAN_TEXIMAGE2D));
1634 InitState init; 1634 InitState init;
1635 init.gl_version = "3.0"; 1635 init.gl_version = "3.0";
1636 init.bind_generates_resource = true; 1636 init.bind_generates_resource = true;
1637 InitDecoderWithCommandLine(init, &command_line); 1637 InitDecoderWithCommandLine(init, &command_line);
1638 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); 1638 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
1639 DoTexImage2D( 1639 DoTexImage2D(
1640 GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0); 1640 GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0);
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
2833 // TODO(gman): CompressedTexSubImage2DImmediate 2833 // TODO(gman): CompressedTexSubImage2DImmediate
2834 2834
2835 // TODO(gman): TexImage2D 2835 // TODO(gman): TexImage2D
2836 2836
2837 // TODO(gman): TexImage2DImmediate 2837 // TODO(gman): TexImage2DImmediate
2838 2838
2839 // TODO(gman): TexSubImage2DImmediate 2839 // TODO(gman): TexSubImage2DImmediate
2840 2840
2841 } // namespace gles2 2841 } // namespace gles2
2842 } // namespace gpu 2842 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc ('k') | gpu/command_buffer/service/logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698