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

Side by Side Diff: gpu/command_buffer/service/image_manager.cc

Issue 10543125: gpu: Add support for GLX_EXT_texture_from_pixmap extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add image operation queue. Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #include "gpu/command_buffer/service/image_manager.h"
6
7 #include "ui/gl/gl_image.h"
8
9 namespace gpu {
10 namespace gles2 {
11
12 ImageManager::ImageManager() {
13 }
14
15 ImageManager::~ImageManager() {
16 }
17
18 void ImageManager::AddImage(
19 scoped_refptr<gfx::GLImage> image, int32 service_id) {
20 gl_images_[service_id] = image;
21 }
22
23 void ImageManager::RemoveImage(int32 service_id) {
24 gl_images_.erase(service_id);
25 }
26
27 scoped_refptr<gfx::GLImage> ImageManager::LookupImage(int32 service_id) {
28 GLImageMap::const_iterator iter = gl_images_.find(service_id);
29 if (iter != gl_images_.end())
30 return iter->second;
31
32 return NULL;
33 }
34
35 } // namespace gles2
36 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698