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

Side by Side Diff: ui/gl/gl_image_shm.h

Issue 198703002: Add GL_TEXTURE_EXTERNAL_OES as supported texture target for CHROMIUM_map_image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GL_GL_IMAGE_SHM_H_ 5 #ifndef UI_GL_GL_IMAGE_SHM_H_
6 #define UI_GL_GL_IMAGE_SHM_H_ 6 #define UI_GL_GL_IMAGE_SHM_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/gl/gl_bindings.h"
9 #include "ui/gl/gl_image.h" 10 #include "ui/gl/gl_image.h"
10 11
11 namespace gfx { 12 namespace gfx {
12 13
13 class GL_EXPORT GLImageShm : public GLImage { 14 class GL_EXPORT GLImageShm : public GLImage {
14 public: 15 public:
15 GLImageShm(gfx::Size size, unsigned internalformat); 16 GLImageShm(gfx::Size size, unsigned internalformat);
16 17
17 bool Initialize(gfx::GpuMemoryBufferHandle buffer); 18 bool Initialize(gfx::GpuMemoryBufferHandle buffer);
18 19
19 // Overridden from GLImage: 20 // Overridden from GLImage:
20 virtual void Destroy() OVERRIDE; 21 virtual void Destroy() OVERRIDE;
21 virtual gfx::Size GetSize() OVERRIDE; 22 virtual gfx::Size GetSize() OVERRIDE;
22 virtual bool BindTexImage(unsigned target) OVERRIDE; 23 virtual bool BindTexImage(unsigned target) OVERRIDE;
23 virtual void ReleaseTexImage(unsigned target) OVERRIDE; 24 virtual void ReleaseTexImage(unsigned target) OVERRIDE;
24 virtual void WillUseTexImage() OVERRIDE; 25 virtual void WillUseTexImage() OVERRIDE;
25 virtual void DidUseTexImage() OVERRIDE; 26 virtual void DidUseTexImage() OVERRIDE;
26 27
27 protected: 28 protected:
28 virtual ~GLImageShm(); 29 virtual ~GLImageShm();
29 30
30 private: 31 private:
31 scoped_ptr<base::SharedMemory> shared_memory_; 32 scoped_ptr<base::SharedMemory> shared_memory_;
32 gfx::Size size_; 33 gfx::Size size_;
33 unsigned internalformat_; 34 unsigned internalformat_;
35 GLuint texture_id_;
reveman 2014/03/13 15:52:40 nit: maybe external_texture_id_ or something like
36 EGLImageKHR egl_imagekhr_;
reveman 2014/03/13 15:52:40 nit: egl_image_
34 37
35 DISALLOW_COPY_AND_ASSIGN(GLImageShm); 38 DISALLOW_COPY_AND_ASSIGN(GLImageShm);
36 }; 39 };
37 40
38 } // namespace gfx 41 } // namespace gfx
39 42
40 #endif // UI_GL_GL_IMAGE_SHM_H_ 43 #endif // UI_GL_GL_IMAGE_SHM_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | ui/gl/gl_image_shm.cc » ('j') | ui/gl/gl_image_shm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698