OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 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_GPU_MEMORY_BUFFER_TRACKER_MOCK_H_ |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_MOCK_H_ |
| 7 |
| 8 #include <GLES2/gl2.h> |
| 9 |
| 10 #include "../client/gpu_memory_buffer_tracker.h" |
| 11 #include "gles2_impl_export.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" |
| 13 |
| 14 namespace gpu { |
| 15 class GpuMemoryBuffer; |
| 16 |
| 17 namespace gles2 { |
| 18 class ImageFactory; |
| 19 |
| 20 // Mock implementation of the GpuMemoryBufferTracker |
| 21 class GLES2_IMPL_EXPORT GpuMemoryBufferTrackerMock |
| 22 : public GpuMemoryBufferTracker { |
| 23 public: |
| 24 GpuMemoryBufferTrackerMock(ImageFactory* image_factory); |
| 25 virtual ~GpuMemoryBufferTrackerMock(); |
| 26 |
| 27 MOCK_METHOD2(CreateBuffer, GLuint(GLsizei, GLsizei)); |
| 28 MOCK_METHOD1(GetBuffer, GpuMemoryBuffer*(GLuint)); |
| 29 MOCK_METHOD1(RemoveBuffer, void(GLuint)); |
| 30 |
| 31 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferTrackerMock); |
| 33 }; |
| 34 |
| 35 } // namespace gles2 |
| 36 } // namespace gpu |
| 37 |
| 38 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_MOCK_H_ |
OLD | NEW |