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

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

Issue 2583183002: gles2: Fix glDiscardFramebufferEXT (Closed)
Patch Set: Update unit test accordingly Created 4 years 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 3858 matching lines...) Expand 10 before | Expand all | Expand 10 after
3869 3869
3870 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(attachments))); 3870 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(attachments)));
3871 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 3871 EXPECT_EQ(GL_NO_ERROR, GetGLError());
3872 // Invalidating part of DEPTH_STENCIL attachment doesn't change framebuffer 3872 // Invalidating part of DEPTH_STENCIL attachment doesn't change framebuffer
3873 // clearance status. 3873 // clearance status.
3874 EXPECT_TRUE(framebuffer->IsCleared()); 3874 EXPECT_TRUE(framebuffer->IsCleared());
3875 EXPECT_FALSE(framebuffer->HasUnclearedAttachment(GL_DEPTH_ATTACHMENT)); 3875 EXPECT_FALSE(framebuffer->HasUnclearedAttachment(GL_DEPTH_ATTACHMENT));
3876 EXPECT_FALSE(framebuffer->HasUnclearedAttachment(GL_STENCIL_ATTACHMENT)); 3876 EXPECT_FALSE(framebuffer->HasUnclearedAttachment(GL_STENCIL_ATTACHMENT));
3877 3877
3878 attachments[0] = GL_DEPTH_STENCIL_ATTACHMENT; 3878 attachments[0] = GL_DEPTH_STENCIL_ATTACHMENT;
3879 EXPECT_CALL(*gl_, InvalidateFramebuffer(target, 1, _)) 3879 EXPECT_CALL(*gl_, InvalidateFramebuffer(target, 2, _))
3880 .Times(1) 3880 .Times(1)
3881 .RetiresOnSaturation(); 3881 .RetiresOnSaturation();
3882 cmd.Init(target, count, attachments); 3882 cmd.Init(target, count, attachments);
3883 3883
3884 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(attachments))); 3884 EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(attachments)));
3885 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 3885 EXPECT_EQ(GL_NO_ERROR, GetGLError());
3886 // Invalidating DEPTH_STENCIL attachment should make framebuffer uncleared. 3886 // Invalidating DEPTH_STENCIL attachment should make framebuffer uncleared.
3887 EXPECT_FALSE(framebuffer->IsCleared()); 3887 EXPECT_FALSE(framebuffer->IsCleared());
3888 EXPECT_TRUE(framebuffer->HasUnclearedAttachment(GL_DEPTH_ATTACHMENT)); 3888 EXPECT_TRUE(framebuffer->HasUnclearedAttachment(GL_DEPTH_ATTACHMENT));
3889 EXPECT_TRUE(framebuffer->HasUnclearedAttachment(GL_STENCIL_ATTACHMENT)); 3889 EXPECT_TRUE(framebuffer->HasUnclearedAttachment(GL_STENCIL_ATTACHMENT));
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
4033 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 4033 EXPECT_EQ(GL_NO_ERROR, GetGLError());
4034 } 4034 }
4035 } 4035 }
4036 4036
4037 // TODO(gman): PixelStorei 4037 // TODO(gman): PixelStorei
4038 4038
4039 // TODO(gman): SwapBuffers 4039 // TODO(gman): SwapBuffers
4040 4040
4041 } // namespace gles2 4041 } // namespace gles2
4042 } // namespace gpu 4042 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698