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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_mock.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 // This file contains the mock GLES2Decoder class. 5 // This file contains the mock GLES2Decoder class.
6 6
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 12 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 #include "ui/gfx/size.h" 15 #include "ui/gfx/size.h"
16 16
17 namespace gfx {
18 class GLContext;
19 class GLSurface;
20 }
21
17 namespace gpu { 22 namespace gpu {
18 class GLContext;
19 23
20 namespace gles2 { 24 namespace gles2 {
21 25
22 class ContextGroup; 26 class ContextGroup;
23 class MockGLES2Decoder : public GLES2Decoder { 27 class MockGLES2Decoder : public GLES2Decoder {
24 public: 28 public:
25 MockGLES2Decoder(); 29 MockGLES2Decoder();
26 virtual ~MockGLES2Decoder(); 30 virtual ~MockGLES2Decoder();
27 31
28 MOCK_METHOD7(Initialize, 32 MOCK_METHOD8(Initialize,
29 bool(gfx::GLContext* context, 33 bool(gfx::GLSurface* surface,
34 gfx::GLContext* context,
30 const gfx::Size& size, 35 const gfx::Size& size,
31 const DisallowedExtensions& disallowed_extensions, 36 const DisallowedExtensions& disallowed_extensions,
32 const char* allowed_extensions, 37 const char* allowed_extensions,
33 const std::vector<int32>& attribs, 38 const std::vector<int32>& attribs,
34 GLES2Decoder* parent, 39 GLES2Decoder* parent,
35 uint32 parent_texture_id)); 40 uint32 parent_texture_id));
36 MOCK_METHOD0(Destroy, void()); 41 MOCK_METHOD0(Destroy, void());
37 MOCK_METHOD1(ResizeOffscreenFrameBuffer, void(const gfx::Size& size)); 42 MOCK_METHOD1(ResizeOffscreenFrameBuffer, void(const gfx::Size& size));
38 MOCK_METHOD0(UpdateOffscreenFrameBufferSize, bool()); 43 MOCK_METHOD0(UpdateOffscreenFrameBufferSize, bool());
39 MOCK_METHOD0(MakeCurrent, bool()); 44 MOCK_METHOD0(MakeCurrent, bool());
40 MOCK_METHOD1(GetServiceIdForTesting, uint32(uint32 client_id)); 45 MOCK_METHOD1(GetServiceIdForTesting, uint32(uint32 client_id));
41 MOCK_METHOD0(GetGLES2Util, GLES2Util*()); 46 MOCK_METHOD0(GetGLES2Util, GLES2Util*());
47 MOCK_METHOD0(GetGLSurface, gfx::GLSurface*());
42 MOCK_METHOD0(GetGLContext, gfx::GLContext*()); 48 MOCK_METHOD0(GetGLContext, gfx::GLContext*());
43 MOCK_METHOD0(GetContextGroup, ContextGroup*()); 49 MOCK_METHOD0(GetContextGroup, ContextGroup*());
44 MOCK_METHOD1(SetResizeCallback, void(Callback1<gfx::Size>::Type*)); 50 MOCK_METHOD1(SetResizeCallback, void(Callback1<gfx::Size>::Type*));
45 MOCK_METHOD1(SetSwapBuffersCallback, void(Callback0::Type*)); 51 MOCK_METHOD1(SetSwapBuffersCallback, void(Callback0::Type*));
46 MOCK_METHOD1(SetLatchCallback, void(const base::Callback<void(bool)>&)); 52 MOCK_METHOD1(SetLatchCallback, void(const base::Callback<void(bool)>&));
47 MOCK_METHOD3(DoCommand, error::Error(unsigned int command, 53 MOCK_METHOD3(DoCommand, error::Error(unsigned int command,
48 unsigned int arg_count, 54 unsigned int arg_count,
49 const void* cmd_data)); 55 const void* cmd_data));
50 MOCK_METHOD2(GetServiceTextureId, bool(uint32 client_texture_id, 56 MOCK_METHOD2(GetServiceTextureId, bool(uint32 client_texture_id,
51 uint32* service_texture_id)); 57 uint32* service_texture_id));
52 MOCK_CONST_METHOD1(GetCommandName, const char*(unsigned int command_id)); 58 MOCK_CONST_METHOD1(GetCommandName, const char*(unsigned int command_id));
53 59
54 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); 60 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder);
55 }; 61 };
56 62
57 } // namespace gles2 63 } // namespace gles2
58 } // namespace gpu 64 } // namespace gpu
59 65
60 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ 66 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698