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

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

Issue 6749014: Workground for glGenerateMipmap bug in some drivers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment change Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "gpu/command_buffer/common/gl_mock.h" 7 #include "gpu/command_buffer/common/gl_mock.h"
8 #include "gpu/command_buffer/common/gles2_cmd_format.h" 8 #include "gpu/command_buffer/common/gles2_cmd_format.h"
9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
10 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" 10 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
11 #include "gpu/command_buffer/service/cmd_buffer_engine.h" 11 #include "gpu/command_buffer/service/cmd_buffer_engine.h"
(...skipping 15 matching lines...) Expand all
27 namespace gpu { 27 namespace gpu {
28 namespace gles2 { 28 namespace gles2 {
29 29
30 class GLES2DecoderTest1 : public GLES2DecoderTestBase { 30 class GLES2DecoderTest1 : public GLES2DecoderTestBase {
31 public: 31 public:
32 GLES2DecoderTest1() { } 32 GLES2DecoderTest1() { }
33 }; 33 };
34 34
35 template <> 35 template <>
36 void GLES2DecoderTestBase::SpecializedSetup<GenerateMipmap, 0>( 36 void GLES2DecoderTestBase::SpecializedSetup<GenerateMipmap, 0>(
37 bool /* valid */) { 37 bool valid) {
38 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); 38 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
39 DoTexImage2D( 39 DoTexImage2D(
40 GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE, 40 GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE,
41 0, 0); 41 0, 0);
42 if (valid) {
43 EXPECT_CALL(*gl_, TexParameteri(
44 GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR))
45 .Times(1)
46 .RetiresOnSaturation();
47 EXPECT_CALL(*gl_, TexParameteri(
48 GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR))
49 .Times(1)
50 .RetiresOnSaturation();
51 }
42 }; 52 };
43 53
44 template <> 54 template <>
45 void GLES2DecoderTestBase::SpecializedSetup<CheckFramebufferStatus, 0>( 55 void GLES2DecoderTestBase::SpecializedSetup<CheckFramebufferStatus, 0>(
46 bool /* valid */) { 56 bool /* valid */) {
47 DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_, 57 DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_,
48 kServiceFramebufferId); 58 kServiceFramebufferId);
49 }; 59 };
50 60
51 template <> 61 template <>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 .WillOnce(Return(GL_NO_ERROR)) 163 .WillOnce(Return(GL_NO_ERROR))
154 .RetiresOnSaturation(); 164 .RetiresOnSaturation();
155 } 165 }
156 }; 166 };
157 167
158 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h" 168 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h"
159 169
160 } // namespace gles2 170 } // namespace gles2
161 } // namespace gpu 171 } // namespace gpu
162 172
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698