Chromium Code Reviews| 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_ | |
|
no sievers
2013/05/14 21:10:03
nit: update macro name to reflect class name
kaanb
2013/05/14 23:37:09
Done.
| |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_IN_PROCESS_H_ | |
| 7 | |
| 8 #include <GLES2/gl2.h> | |
| 9 | |
| 10 #include "../client/hash_tables.h" | |
| 11 #include "base/basictypes.h" | |
| 12 #include "base/compiler_specific.h" | |
| 13 #include "gles2_impl_export.h" | |
| 14 | |
| 15 namespace gpu { | |
| 16 class GpuMemoryBuffer; | |
| 17 | |
| 18 namespace gles2 { | |
| 19 class ImageFactory; | |
| 20 | |
| 21 // Tracks GPU memory buffer objects for client side of command buffer. | |
|
no sievers
2013/05/14 21:10:03
nit: 'for the client side of the' or 'on the clien
kaanb
2013/05/14 23:37:09
Done.
| |
| 22 class GLES2_IMPL_EXPORT GpuMemoryBufferTracker { | |
| 23 public: | |
| 24 // Ownership of |factory| and |gl| remain with caller. | |
|
no sievers
2013/05/14 21:10:03
nit: |gl| seems to be obsolete
kaanb
2013/05/14 23:37:09
Done.
| |
| 25 explicit GpuMemoryBufferTracker(ImageFactory* factory); | |
| 26 virtual ~GpuMemoryBufferTracker(); | |
| 27 | |
| 28 // Methods from GpuMemoryBufferTracker | |
|
no sievers
2013/05/14 21:10:03
nit: comment is obsolete since these methods are n
kaanb
2013/05/14 23:37:09
Done.
| |
| 29 virtual GLuint CreateBuffer( | |
| 30 GLsizei width, GLsizei height, GLenum internalformat) OVERRIDE; | |
| 31 virtual GpuMemoryBuffer* GetBuffer(GLuint image_id) OVERRIDE; | |
|
no sievers
2013/05/14 21:10:03
make non-virtual and remove 'override'
kaanb
2013/05/14 23:37:09
Done.
| |
| 32 virtual void RemoveBuffer(GLuint image_id) OVERRIDE; | |
| 33 | |
| 34 private: | |
| 35 typedef gpu::hash_map<GLuint, GpuMemoryBuffer*> BufferMap; | |
| 36 BufferMap buffers_; | |
| 37 ImageFactory* factory_; | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferTracker); | |
| 40 }; | |
| 41 | |
| 42 } // namespace gles2 | |
| 43 } // namespace gpu | |
| 44 | |
| 45 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_IN_PROCESS_H_ | |
| OLD | NEW |