blob: b42477069e9f4d7ad887ea7b1413d2aa4c16c927 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "gpu/command_buffer/service/image_manager.h"
#include "ui/gl/gl_image.h"
namespace gpu {
namespace gles2 {
ImageManager::ImageManager() {
}
ImageManager::~ImageManager() {
}
void ImageManager::AddImage(gfx::GLImage* image, int32 service_id) {
gl_images_[service_id] = image;
}
void ImageManager::RemoveImage(int32 service_id) {
gl_images_.erase(service_id);
}
gfx::GLImage* ImageManager::LookupImage(int32 service_id) {
GLImageMap::const_iterator iter = gl_images_.find(service_id);
if (iter != gl_images_.end())
return iter->second;
return NULL;
}
} // namespace gles2
} // namespace gpu
|