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

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

Issue 11973010: AndroidVDA by using Android's MediaCodec API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: marking XXX for issues should be resolved before committing. Created 7 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 #ifndef CONTENT_COMMON_GPU_MEDIA_GLES2_EXTERNAL_TEXTURE_COPIER_H_
6 #define CONTENT_COMMON_GPU_MEDIA_GLES2_EXTERNAL_TEXTURE_COPIER_H_
7
8 #include "base/basictypes.h"
9 #include "third_party/angle/include/GLES2/gl2.h"
10 #include "third_party/angle/include/GLES2/gl2ext.h"
11
12 namespace content {
13
14 // A utility class which copies the given external texture
15 // (GL_TEXTURE_EXTERNAL_OES) to the target texture (GL_TEXTURE_2D) by using
16 // framebuffer.
17 class Gles2ExternalTextureCopier {
Ami GONE FROM CHROMIUM 2013/01/28 19:49:45 If you #include "ui/gl/gl_bindings.h" like r178150
dwkang1 2013/01/29 03:58:48 Will try in the next patch. Thanks. But, transfrom
dwkang1 2013/02/04 14:08:26 When I include "ui/gl/gl_bindings.h" and use glCop
18 public:
19 Gles2ExternalTextureCopier();
20 virtual ~Gles2ExternalTextureCopier();
21
22 bool Init(int32 width, int32 height);
23
24 bool Copy(GLuint source_texture_id, GLuint destination_texture_id,
25 const float transfrom_matrix[16]);
26
27 private:
28 bool SetupGraphics();
29 void RenderFrame(int32 width, int32 height, GLuint texture_id,
30 const float transfrom_matrix[16]);
31 bool SetupFrameBuffer();
32
33 bool initialized_;
34 int32 width_;
35 int32 height_;
36 GLuint framebuffer_id_;
37 GLuint renderbuffer_id_;
38 GLuint program_;
39 GLuint position_handle_;
40 GLuint st_matrix_handle_;
41 GLuint mvp_matrix_handle_;
42 GLuint texture_handle_;
43 GLfloat st_matrix_[16];
44
45 DISALLOW_COPY_AND_ASSIGN(Gles2ExternalTextureCopier);
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_COMMON_GPU_MEDIA_GLES2_EXTERNAL_TEXTURE_COPIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698