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

Side by Side Diff: gpu/command_buffer/client/gpu_memory_buffer_tracker.h

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: rebase Created 6 years, 2 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 "base/basictypes.h"
9 #include "base/containers/hash_tables.h"
10 #include "gles2_impl_export.h"
11
12 namespace gfx {
13 class GpuMemoryBuffer;
14 }
15
16 namespace gpu {
17 class GpuControl;
18
19 namespace gles2 {
20
21 // Tracks GPU memory buffer objects on the client side.
22 class GLES2_IMPL_EXPORT GpuMemoryBufferTracker {
23 public:
24 explicit GpuMemoryBufferTracker(GpuControl* gpu_control);
25 virtual ~GpuMemoryBufferTracker();
26
27 int32 CreateBuffer(size_t width,
28 size_t height,
29 int32 internalformat,
30 int32 usage);
31 gfx::GpuMemoryBuffer* GetBuffer(int32 image_id);
32 void RemoveBuffer(int32 image_id);
33
34 private:
35 typedef base::hash_map<int32, gfx::GpuMemoryBuffer*> BufferMap;
36 BufferMap buffers_;
37 GpuControl* gpu_control_;
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_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gpu_control.h ('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