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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc

Issue 10388131: Allow GLES2CmdDecoder to change the GLSurface associated with the default FBO. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
===================================================================
--- gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc (revision 137438)
+++ gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc (working copy)
@@ -11,6 +11,7 @@
#include "gpu/command_buffer/common/id_allocator.h"
#include "gpu/command_buffer/service/cmd_buffer_engine.h"
#include "gpu/command_buffer/service/context_group.h"
+#include "gpu/command_buffer/service/gl_surface_mock.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
#include "gpu/command_buffer/service/mailbox_manager.h"
#include "gpu/command_buffer/service/program_manager.h"
@@ -21,6 +22,7 @@
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface_stub.h"
+
#if !defined(GL_DEPTH24_STENCIL8)
#define GL_DEPTH24_STENCIL8 0x88F0
#endif
@@ -7012,6 +7014,16 @@
EXPECT_EQ(kServiceTextureId, info->service_id());
}
+
+TEST_F(GLES2DecoderTest, CanChangeSurface) {
+ scoped_refptr<GLSurfaceMock> other_surface(new GLSurfaceMock);
+ EXPECT_CALL(*other_surface.get(), GetBackingFrameBufferObject()).
+ WillOnce(Return(7));
+ EXPECT_CALL(*gl_, BindFramebufferEXT(GL_FRAMEBUFFER_EXT, 7));
+
+ decoder_->SetSurface(other_surface);
+}
+
TEST_F(GLES2DecoderTest, IsEnabledReturnsCachedValue) {
// NOTE: There are no expectations because no GL functions should be
// called for DEPTH_TEST or STENCIL_TEST
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_mock.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698