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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h

Issue 7021014: GLContext no longer holds a pointer to a GLSurface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
7 7
8 #include "gpu/command_buffer/common/gl_mock.h" 8 #include "gpu/command_buffer/common/gl_mock.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"
11 #include "gpu/command_buffer/service/buffer_manager.h" 11 #include "gpu/command_buffer/service/buffer_manager.h"
12 #include "gpu/command_buffer/service/cmd_buffer_engine.h" 12 #include "gpu/command_buffer/service/cmd_buffer_engine.h"
13 #include "gpu/command_buffer/service/context_group.h" 13 #include "gpu/command_buffer/service/context_group.h"
14 #include "gpu/command_buffer/service/framebuffer_manager.h" 14 #include "gpu/command_buffer/service/framebuffer_manager.h"
15 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 15 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
16 #include "gpu/command_buffer/service/program_manager.h" 16 #include "gpu/command_buffer/service/program_manager.h"
17 #include "gpu/command_buffer/service/renderbuffer_manager.h" 17 #include "gpu/command_buffer/service/renderbuffer_manager.h"
18 #include "gpu/command_buffer/service/shader_manager.h" 18 #include "gpu/command_buffer/service/shader_manager.h"
19 #include "gpu/command_buffer/service/texture_manager.h" 19 #include "gpu/command_buffer/service/texture_manager.h"
20 #include "gpu/GLES2/gles2_command_buffer.h" 20 #include "gpu/GLES2/gles2_command_buffer.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 #include "ui/gfx/gl/gl_context_stub.h" 22 #include "ui/gfx/gl/gl_context_stub.h"
23 #include "ui/gfx/gl/gl_surface_stub.h"
23 24
24 namespace gpu { 25 namespace gpu {
25 namespace gles2 { 26 namespace gles2 {
26 27
27 class GLES2DecoderTestBase : public testing::Test { 28 class GLES2DecoderTestBase : public testing::Test {
28 public: 29 public:
29 GLES2DecoderTestBase(); 30 GLES2DecoderTestBase();
30 virtual ~GLES2DecoderTestBase(); 31 virtual ~GLES2DecoderTestBase();
31 32
32 protected: 33 protected:
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 Command cmd; 249 Command cmd;
249 cmd.Init(client_id, kSharedMemoryId, kSharedMemoryOffset); 250 cmd.Init(client_id, kSharedMemoryId, kSharedMemoryOffset);
250 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 251 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
251 bool isObject = static_cast<bool>(*result); 252 bool isObject = static_cast<bool>(*result);
252 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 253 EXPECT_EQ(GL_NO_ERROR, GetGLError());
253 return isObject; 254 return isObject;
254 } 255 }
255 256
256 // Use StrictMock to make 100% sure we know how GL will be called. 257 // Use StrictMock to make 100% sure we know how GL will be called.
257 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_; 258 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_;
259 gfx::GLSurfaceStub* surface_;
258 gfx::GLContextStub* context_; 260 gfx::GLContextStub* context_;
259 scoped_ptr<GLES2Decoder> decoder_; 261 scoped_ptr<GLES2Decoder> decoder_;
260 262
261 GLuint client_buffer_id_; 263 GLuint client_buffer_id_;
262 GLuint client_framebuffer_id_; 264 GLuint client_framebuffer_id_;
263 GLuint client_program_id_; 265 GLuint client_program_id_;
264 GLuint client_renderbuffer_id_; 266 GLuint client_renderbuffer_id_;
265 GLuint client_shader_id_; 267 GLuint client_shader_id_;
266 GLuint client_texture_id_; 268 GLuint client_texture_id_;
267 GLuint client_element_buffer_id_; 269 GLuint client_element_buffer_id_;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 void DeleteIndexBuffer(); 398 void DeleteIndexBuffer();
397 399
398 GLuint client_vertex_shader_id_; 400 GLuint client_vertex_shader_id_;
399 GLuint client_fragment_shader_id_; 401 GLuint client_fragment_shader_id_;
400 }; 402 };
401 403
402 } // namespace gles2 404 } // namespace gles2
403 } // namespace gpu 405 } // namespace gpu
404 406
405 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ 407 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698