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

Side by Side Diff: content/common/gpu/media/gles2_texture_to_egl_image_translator.h

Issue 9346012: Video decode in hardware on ARM platform. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 8 years, 10 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
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 <map>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "media/video/picture.h" 11 #include "media/video/picture.h"
10 #include "third_party/angle/include/EGL/egl.h" 12 #include "third_party/angle/include/EGL/egl.h"
11 #include "third_party/angle/include/EGL/eglext.h" 13 #include "third_party/angle/include/EGL/eglext.h"
12 #include "third_party/angle/include/GLES2/gl2.h" 14 #include "third_party/mesa/MesaLib/include/GL/gl.h"
13 #include "third_party/angle/include/GLES2/gl2ext.h" 15 #include "third_party/mesa/MesaLib/include/GL/glext.h"
Ami GONE FROM CHROMIUM 2012/02/18 00:00:25 What's the deal with the s/angle/mesa/ here and ab
14
15 // Class to wrap egl-opengles related operations. 16 // Class to wrap egl-opengles related operations.
16 // PPAPI will give the textures to OmxVideoDecodeAccelerator. 17 // PPAPI will give the textures to OmxVideoDecodeAccelerator.
17 // OmxVideoDecodeAccelerator will use this class to convert 18 // OmxVideoDecodeAccelerator will use this class to convert
18 // these texture into EGLImage and back. 19 // these texture into EGLImage and back.
19 // 20 //
20 // TODO(fischman): this class is now stateless (it wasn't always). If it seems 21 // 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 22 // like it'll stay stateless, replace with a namespace and free functions, or
22 // just in-line them into the only caller, OmxVideoDecodeAccelerator. 23 // just in-line them into the only caller, OmxVideoDecodeAccelerator.
23 class Gles2TextureToEglImageTranslator { 24 class Gles2TextureToEglImageTranslator {
24 public: 25 public:
25 Gles2TextureToEglImageTranslator(); 26 Gles2TextureToEglImageTranslator(Display* x_display);
26 ~Gles2TextureToEglImageTranslator(); 27 ~Gles2TextureToEglImageTranslator();
27 28
28 // Translates texture into EGLImage and back. 29 // Translates texture into EGLImage and back.
29 EGLImageKHR TranslateToEglImage(EGLDisplay egl_display, 30 EGLImageKHR TranslateToEglImage(EGLDisplay egl_display,
30 EGLContext egl_context, 31 EGLContext egl_context,
31 uint32 texture); 32 uint32 texture,
33 int width, int height);
32 uint32 TranslateToTexture(EGLImageKHR egl_image); 34 uint32 TranslateToTexture(EGLImageKHR egl_image);
33 void DestroyEglImage(EGLDisplay egl_display, EGLImageKHR egl_image); 35 void DestroyEglImage(EGLDisplay egl_display, EGLImageKHR egl_image);
34 36
35 private: 37 private:
38 Display* x_display_;
39 typedef std::map<EGLImageKHR, Pixmap> ImagePixmap;
40 ImagePixmap eglimage_pixmap_;
36 DISALLOW_COPY_AND_ASSIGN(Gles2TextureToEglImageTranslator); 41 DISALLOW_COPY_AND_ASSIGN(Gles2TextureToEglImageTranslator);
37 }; 42 };
38 43
39 #endif // CONTENT_COMMON_GPU_MEDIA_GLES2_TEXTURE_TO_EGL_IMAGE_TRANSLATOR_H_ 44 #endif // CONTENT_COMMON_GPU_MEDIA_GLES2_TEXTURE_TO_EGL_IMAGE_TRANSLATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698