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

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

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stdint.h> 10 #include <stdint.h>
11 11
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 16 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
17 #include "gpu/command_buffer/common/mailbox.h" 17 #include "gpu/command_buffer/common/mailbox.h"
18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
19 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.h"
20 #include "ui/gfx/geometry/size.h" 20 #include "ui/gfx/geometry/size.h"
21 21
22 namespace gfx { 22 namespace gl {
23 class GLContext; 23 class GLContext;
24 class GLSurface; 24 class GLSurface;
25 } 25 }
26 26
27 namespace gpu { 27 namespace gpu {
28 class AsyncPixelTransferDelegate; 28 class AsyncPixelTransferDelegate;
29 29
30 namespace gles2 { 30 namespace gles2 {
31 31
32 class ContextGroup; 32 class ContextGroup;
33 class ErrorState; 33 class ErrorState;
34 class QueryManager; 34 class QueryManager;
35 struct ContextState; 35 struct ContextState;
36 36
37 class MockGLES2Decoder : public GLES2Decoder { 37 class MockGLES2Decoder : public GLES2Decoder {
38 public: 38 public:
39 MockGLES2Decoder(); 39 MockGLES2Decoder();
40 virtual ~MockGLES2Decoder(); 40 virtual ~MockGLES2Decoder();
41 41
42 error::Error FakeDoCommands(unsigned int num_commands, 42 error::Error FakeDoCommands(unsigned int num_commands,
43 const void* buffer, 43 const void* buffer,
44 int num_entries, 44 int num_entries,
45 int* entries_processed); 45 int* entries_processed);
46 46
47 MOCK_METHOD6(Initialize, 47 MOCK_METHOD6(Initialize,
48 bool(const scoped_refptr<gfx::GLSurface>& surface, 48 bool(const scoped_refptr<gl::GLSurface>& surface,
49 const scoped_refptr<gfx::GLContext>& context, 49 const scoped_refptr<gl::GLContext>& context,
50 bool offscreen, 50 bool offscreen,
51 const gfx::Size& size, 51 const gfx::Size& size,
52 const DisallowedFeatures& disallowed_features, 52 const DisallowedFeatures& disallowed_features,
53 const ContextCreationAttribHelper& attrib_helper)); 53 const ContextCreationAttribHelper& attrib_helper));
54 MOCK_METHOD1(Destroy, void(bool have_context)); 54 MOCK_METHOD1(Destroy, void(bool have_context));
55 MOCK_METHOD1(SetSurface, void(const scoped_refptr<gfx::GLSurface>& surface)); 55 MOCK_METHOD1(SetSurface, void(const scoped_refptr<gl::GLSurface>& surface));
56 MOCK_METHOD0(ReleaseSurface, void()); 56 MOCK_METHOD0(ReleaseSurface, void());
57 MOCK_METHOD1(TakeFrontBuffer, void(const Mailbox& mailbox)); 57 MOCK_METHOD1(TakeFrontBuffer, void(const Mailbox& mailbox));
58 MOCK_METHOD2(ReturnFrontBuffer, void(const Mailbox& mailbox, bool is_lost)); 58 MOCK_METHOD2(ReturnFrontBuffer, void(const Mailbox& mailbox, bool is_lost));
59 MOCK_METHOD0(GetSavedBackTextureCountForTest, size_t()); 59 MOCK_METHOD0(GetSavedBackTextureCountForTest, size_t());
60 MOCK_METHOD0(GetCreatedBackTextureCountForTest, size_t()); 60 MOCK_METHOD0(GetCreatedBackTextureCountForTest, size_t());
61 MOCK_METHOD1(ResizeOffscreenFrameBuffer, bool(const gfx::Size& size)); 61 MOCK_METHOD1(ResizeOffscreenFrameBuffer, bool(const gfx::Size& size));
62 MOCK_METHOD0(MakeCurrent, bool()); 62 MOCK_METHOD0(MakeCurrent, bool());
63 MOCK_METHOD1(GetServiceIdForTesting, uint32_t(uint32_t client_id)); 63 MOCK_METHOD1(GetServiceIdForTesting, uint32_t(uint32_t client_id));
64 MOCK_METHOD0(GetGLES2Util, GLES2Util*()); 64 MOCK_METHOD0(GetGLES2Util, GLES2Util*());
65 MOCK_METHOD0(GetGLSurface, gfx::GLSurface*()); 65 MOCK_METHOD0(GetGLSurface, gl::GLSurface*());
66 MOCK_METHOD0(GetGLContext, gfx::GLContext*()); 66 MOCK_METHOD0(GetGLContext, gl::GLContext*());
67 MOCK_METHOD0(GetContextGroup, ContextGroup*()); 67 MOCK_METHOD0(GetContextGroup, ContextGroup*());
68 MOCK_METHOD0(GetContextState, const ContextState*()); 68 MOCK_METHOD0(GetContextState, const ContextState*());
69 MOCK_METHOD0(GetCapabilities, Capabilities()); 69 MOCK_METHOD0(GetCapabilities, Capabilities());
70 MOCK_CONST_METHOD0(HasPendingQueries, bool()); 70 MOCK_CONST_METHOD0(HasPendingQueries, bool());
71 MOCK_METHOD1(ProcessPendingQueries, void(bool)); 71 MOCK_METHOD1(ProcessPendingQueries, void(bool));
72 MOCK_CONST_METHOD0(HasMoreIdleWork, bool()); 72 MOCK_CONST_METHOD0(HasMoreIdleWork, bool());
73 MOCK_METHOD0(PerformIdleWork, void()); 73 MOCK_METHOD0(PerformIdleWork, void());
74 MOCK_METHOD1(RestoreState, void(const ContextState* prev_state)); 74 MOCK_METHOD1(RestoreState, void(const ContextState* prev_state));
75 MOCK_CONST_METHOD0(RestoreActiveTexture, void()); 75 MOCK_CONST_METHOD0(RestoreActiveTexture, void());
76 MOCK_CONST_METHOD1( 76 MOCK_CONST_METHOD1(
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 MOCK_CONST_METHOD0(WasContextLostByRobustnessExtension, bool()); 156 MOCK_CONST_METHOD0(WasContextLostByRobustnessExtension, bool());
157 MOCK_METHOD1(MarkContextLost, void(gpu::error::ContextLostReason reason)); 157 MOCK_METHOD1(MarkContextLost, void(gpu::error::ContextLostReason reason));
158 158
159 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); 159 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder);
160 }; 160 };
161 161
162 } // namespace gles2 162 } // namespace gles2
163 } // namespace gpu 163 } // namespace gpu
164 164
165 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ 165 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698