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

Unified 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: Move CreateGLImage below virtual methods. 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/image_manager.cc
diff --git a/gpu/command_buffer/service/image_manager.cc b/gpu/command_buffer/service/image_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f17c4b060e5fad79d26c9d4641d14f877f025f0f
--- /dev/null
+++ b/gpu/command_buffer/service/image_manager.cc
@@ -0,0 +1,36 @@
+// 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(
+ scoped_refptr<gfx::GLImage> image, int32 service_id) {
+ gl_images_[service_id] = image;
+}
+
+void ImageManager::RemoveImage(int32 service_id) {
+ gl_images_.erase(service_id);
+}
+
+scoped_refptr<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

Powered by Google App Engine
This is Rietveld 408576698