OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_COMMON_GPU_MEDIA_GLES2_TEXTURE_TO_EGL_IMAGE_TRANSLATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_GLES2_TEXTURE_TO_EGL_IMAGE_TRANSLATOR_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_GLES2_TEXTURE_TO_EGL_IMAGE_TRANSLATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_GLES2_TEXTURE_TO_EGL_IMAGE_TRANSLATOR_H_ |
7 | 7 |
8 #include <utility> | |
Ami GONE FROM CHROMIUM
2012/02/07 17:05:40
unneeded
| |
9 #include <vector> | |
10 #include "base/scoped_ptr.h" | |
Ami GONE FROM CHROMIUM
2012/02/07 17:05:40
unneeded
| |
11 | |
8 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
9 #include "media/video/picture.h" | 13 #include "media/video/picture.h" |
10 #include "third_party/angle/include/EGL/egl.h" | 14 #include "third_party/angle/include/EGL/egl.h" |
11 #include "third_party/angle/include/EGL/eglext.h" | 15 #include "third_party/angle/include/EGL/eglext.h" |
12 #include "third_party/angle/include/GLES2/gl2.h" | 16 #include "third_party/angle/include/GLES2/gl2.h" |
13 #include "third_party/angle/include/GLES2/gl2ext.h" | 17 #include "third_party/angle/include/GLES2/gl2ext.h" |
14 | 18 |
19 #include <X11/Xutil.h> | |
20 #include <X11/extensions/Xrender.h> | |
21 #include <X11/extensions/Xcomposite.h> | |
Ami GONE FROM CHROMIUM
2012/02/07 17:05:40
None of these includes are necessary, are they?
| |
22 | |
15 // Class to wrap egl-opengles related operations. | 23 // Class to wrap egl-opengles related operations. |
16 // PPAPI will give the textures to OmxVideoDecodeAccelerator. | 24 // PPAPI will give the textures to OmxVideoDecodeAccelerator. |
17 // OmxVideoDecodeAccelerator will use this class to convert | 25 // OmxVideoDecodeAccelerator will use this class to convert |
18 // these texture into EGLImage and back. | 26 // these texture into EGLImage and back. |
19 // | 27 // |
20 // TODO(fischman): this class is now stateless (it wasn't always). If it seems | 28 // TODO(fischman): this class is now stateless (it wasn't always). If it seems |
21 // like it'll stay stateless, replace with a namespace and free functions, or | 29 // like it'll stay stateless, replace with a namespace and free functions, or |
22 // just in-line them into the only caller, OmxVideoDecodeAccelerator. | 30 // just in-line them into the only caller, OmxVideoDecodeAccelerator. |
23 class Gles2TextureToEglImageTranslator { | 31 class Gles2TextureToEglImageTranslator { |
24 public: | 32 public: |
25 Gles2TextureToEglImageTranslator(); | 33 Gles2TextureToEglImageTranslator(); |
26 ~Gles2TextureToEglImageTranslator(); | 34 ~Gles2TextureToEglImageTranslator(); |
27 | 35 |
28 // Translates texture into EGLImage and back. | 36 // Translates texture into EGLImage and back. |
29 EGLImageKHR TranslateToEglImage(EGLDisplay egl_display, | 37 EGLImageKHR TranslateToEglImage(EGLDisplay egl_display, |
30 EGLContext egl_context, | 38 EGLContext egl_context, |
31 uint32 texture); | 39 uint32 texture); |
40 EGLImageKHR CreateEglImage(Display* x_display, EGLDisplay egl_display, | |
Ami GONE FROM CHROMIUM
2012/02/07 17:05:40
Having a "Create" call per underlying implementati
| |
41 EGLContext egl_context, EGLSurface egl_surface, | |
42 uint32 texture, int width, int height); | |
43 | |
32 uint32 TranslateToTexture(EGLImageKHR egl_image); | 44 uint32 TranslateToTexture(EGLImageKHR egl_image); |
33 void DestroyEglImage(EGLDisplay egl_display, EGLImageKHR egl_image); | 45 void DestroyEglImage(Display* x_display, EGLDisplay egl_display, |
46 EGLImageKHR egl_image); | |
34 | 47 |
35 private: | 48 private: |
49 std::vector<Pixmap> pixmap_; | |
36 DISALLOW_COPY_AND_ASSIGN(Gles2TextureToEglImageTranslator); | 50 DISALLOW_COPY_AND_ASSIGN(Gles2TextureToEglImageTranslator); |
37 }; | 51 }; |
38 | 52 |
39 #endif // CONTENT_COMMON_GPU_MEDIA_GLES2_TEXTURE_TO_EGL_IMAGE_TRANSLATOR_H_ | 53 #endif // CONTENT_COMMON_GPU_MEDIA_GLES2_TEXTURE_TO_EGL_IMAGE_TRANSLATOR_H_ |
OLD | NEW |