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_IN_PROCESS_H_ | |
6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_IN_PROCESS_H_ | |
7 | |
8 #include <GLES2/gl2.h> | |
9 | |
10 #include "../client/gpu_memory_buffer_tracker.h" | |
11 #include "../client/hash_tables.h" | |
12 #include "base/basictypes.h" | |
13 #include "base/compiler_specific.h" | |
14 #include "gles2_impl_export.h" | |
15 | |
16 namespace gpu { | |
17 class GpuMemoryBuffer; | |
18 | |
19 namespace gles2 { | |
20 class GLES2Implementation; | |
21 class ImageFactory; | |
22 | |
23 // Tracks GPU memory buffer objects for client side of command buffer. | |
24 class GLES2_IMPL_EXPORT GpuMemoryBufferTrackerInProcess | |
no sievers
2013/05/10 01:21:51
I don't understand the in-process notion here. Gpu
kaanb
2013/05/13 23:00:36
Yes, removed this file.
| |
25 : public GpuMemoryBufferTracker { | |
26 public: | |
27 // Ownership of |factory| and |gl| remain with caller. | |
28 explicit GpuMemoryBufferTrackerInProcess(ImageFactory* factory, | |
29 GLES2Implementation* gl); | |
30 virtual ~GpuMemoryBufferTrackerInProcess(); | |
31 | |
32 // Methods from GpuMemoryBufferTracker | |
33 virtual GLuint CreateBuffer(GLsizei width, GLsizei height) OVERRIDE; | |
34 virtual GpuMemoryBuffer* GetBuffer(GLuint image_id) OVERRIDE; | |
35 virtual void RemoveBuffer(GLuint image_id) OVERRIDE; | |
36 | |
37 private: | |
38 typedef gpu::hash_map<GLuint, GpuMemoryBuffer*> BufferMap; | |
39 BufferMap buffers_; | |
40 ImageFactory* factory_; // weak | |
41 GLES2Implementation* gl_; // weak | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferTrackerInProcess); | |
44 }; | |
45 | |
46 } // namespace gles2 | |
47 } // namespace gpu | |
48 | |
49 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_IN_PROCESS_H_ | |
OLD | NEW |