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

Side by Side Diff: gpu/command_buffer/client/gpu_memory_buffer_tracker.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 (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_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_H_
7
8 #include <GLES2/gl2.h>
9
10 #include "../client/hash_tables.h"
11 #include "base/basictypes.h"
12 #include "gles2_impl_export.h"
13
14 namespace gpu {
15 class GpuMemoryBuffer;
16
17 namespace gles2 {
18 class ImageFactory;
19
20 // Tracks GPU memory buffer objects on the client side.
21 class GLES2_IMPL_EXPORT GpuMemoryBufferTracker {
22 public:
23 // Ownership of |factory| remains with caller.
24 explicit GpuMemoryBufferTracker(ImageFactory* factory);
25 virtual ~GpuMemoryBufferTracker();
26
27 GLuint CreateBuffer(
28 GLsizei width, GLsizei height, GLenum internalformat);
29 GpuMemoryBuffer* GetBuffer(GLuint image_id);
30 void RemoveBuffer(GLuint image_id);
31
32 private:
33 typedef gpu::hash_map<GLuint, GpuMemoryBuffer*> BufferMap;
34 BufferMap buffers_;
35 ImageFactory* factory_;
36
37 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferTracker);
38 };
39
40 } // namespace gles2
41 } // namespace gpu
42
43 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_TRACKER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gpu_memory_buffer_mock.cc ('k') | gpu/command_buffer/client/gpu_memory_buffer_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698