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

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: Created 7 years, 11 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/23 01:32:32 Can this class be more or less replaced with a cal
dwkang1 2013/01/28 14:54:30 IIRC, it looks like a call which is supposed to be
18 public:
19 Gles2ExternalTextureCopier();
20 virtual ~Gles2ExternalTextureCopier();
21
22 bool Init(int32 width, int32 height);
23
24 bool Copy(GLuint source_texture_id, GLenum source_target,
25 const float transfrom_matrix[16],
26 GLuint destination_texture_id, GLenum destination_target);
Ami GONE FROM CHROMIUM 2013/01/23 01:32:32 Drop the _target params as they are specified cons
dwkang1 2013/01/28 14:54:30 Done.
27
28 private:
29 bool SetupGraphics();
30 void RenderFrame(int32 width, int32 height, GLuint texture_id,
31 const float transfrom_matrix[16]);
32 bool SetupFrameBuffer();
33
34 bool initialized_;
35 int32 width_;
36 int32 height_;
37 GLuint framebuffer_id_;
38 GLuint renderbuffer_id_;
39 GLuint program_;
40 GLuint position_handle_;
41 GLuint st_matrix_handle_;
42 GLuint mvp_matrix_handle_;
43 GLuint texture_handle_;
44 GLfloat st_matrix_[16];
45
46 DISALLOW_COPY_AND_ASSIGN(Gles2ExternalTextureCopier);
47 };
48
49 } // namespace content
50
51 #endif // CONTENT_COMMON_GPU_MEDIA_GLES2_EXTERNAL_TEXTURE_COPIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698