1 // Copyright (c) 2012 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.
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_IMAGE_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_IMAGE_MANAGER_H_
8 #include "base/basictypes.h"
9 #include "base/containers/hash_tables.h"
10 #include "base/memory/ref_counted.h"
11 #include "gpu/gpu_export.h"
20 // This class keeps track of the images and their state.
21 class GPU_EXPORT ImageManager
{
26 void Destroy(bool have_context
);
27 void AddImage(gfx::GLImage
* image
, int32 service_id
);
28 void RemoveImage(int32 service_id
);
29 gfx::GLImage
* LookupImage(int32 service_id
);
32 typedef base::hash_map
<int32
, scoped_refptr
<gfx::GLImage
> > GLImageMap
;
35 DISALLOW_COPY_AND_ASSIGN(ImageManager
);
41 #endif // GPU_COMMAND_BUFFER_SERVICE_IMAGE_MANAGER_H_