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

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: Add missing parameter in GLES2Implementation ctor in GLES2Implementation unittest 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 "testing/gmock/include/gmock/gmock.h"
12
13 namespace gpu {
14 namespace gles2 {
15 class ImageManager;
16
17 // Mock implementation of ImageFactory
18 class ImageFactoryMock : public ImageFactory {
19 public:
20 ImageFactoryMock(ImageManager* image_manager);
21 virtual ~ImageFactoryMock();
22
23 MOCK_METHOD4(CreateGpuMemoryBufferMock, GpuMemoryBuffer*(
24 int width, int height, GLenum internalformat, unsigned* image_id));
25 MOCK_METHOD1(DeleteGpuMemoryBuffer, void(unsigned));
26 // Workaround for mocking methods that return scoped_ptrs
27 virtual scoped_ptr<GpuMemoryBuffer> CreateGpuMemoryBuffer(
28 int width, int height, GLenum internalformat,
29 unsigned* image_id) OVERRIDE {
30 return scoped_ptr<GpuMemoryBuffer>(CreateGpuMemoryBufferMock(
31 width, height, internalformat, image_id));
32 }
33
34 private:
35 DISALLOW_COPY_AND_ASSIGN(ImageFactoryMock);
36 };
37
38 } // namespace gles2
39 } // namespace gpu
40
41 #endif // GPU_COMMAND_BUFFER_CLIENT_IMAGE_FACTORY_MOCK_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/image_factory.h ('k') | gpu/command_buffer/client/image_factory_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698