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

Side by Side Diff: gpu/command_buffer/client/image_factory_mock.h

Issue 14456004: GPU client side changes for GpuMemoryBuffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@glapi
Patch Set: Incorporate code reviews Created 7 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
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GPU_COMMAND_BUFFER_CLIENT_IMAGE_FACTORY_MOCK_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_IMAGE_FACTORY_MOCK_H_
7
8 #include "../client/gpu_memory_buffer.h"
9 #include "../client/image_factory.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "gles2_impl_export.h"
12 #include "testing/gmock/include/gmock/gmock.h"
13
14 namespace gpu {
15 namespace gles2 {
16 class ImageManager;
17
18 // Mock implementation of ImageFactory
19 class GLES2_IMPL_EXPORT ImageFactoryMock : public ImageFactory {
20 public:
21 ImageFactoryMock(ImageManager* image_manager);
22 virtual ~ImageFactoryMock();
23
24 MOCK_METHOD4(CreateGpuMemoryBufferMock, GpuMemoryBuffer*(
25 int width, int height, GLenum internalformat, unsigned int* image_id));
reveman 2013/05/14 01:21:04 nit: unsigned
kaanb 2013/05/14 18:12:11 Done.
26 MOCK_METHOD1(DeleteGpuMemoryBuffer, void(unsigned int));
reveman 2013/05/14 01:21:04 nit: unsigned
kaanb 2013/05/14 18:12:11 Done.
27 // Workaround for mocking methods that return scoped_ptrs
28 virtual scoped_ptr<GpuMemoryBuffer> CreateGpuMemoryBuffer(
29 int width, int height, GLenum internalformat,
30 unsigned int* image_id) OVERRIDE {
reveman 2013/05/14 01:21:04 nit: unsigned
kaanb 2013/05/14 18:12:11 Done.
31 return scoped_ptr<GpuMemoryBuffer>(CreateGpuMemoryBufferMock(
32 width, height, internalformat, image_id));
33 }
34
35 private:
36 DISALLOW_COPY_AND_ASSIGN(ImageFactoryMock);
37 };
38
39 } // namespace gles2
40 } // namespace gpu
41
42 #endif // GPU_COMMAND_BUFFER_CLIENT_IMAGE_FACTORY_MOCK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698