OLD | NEW |
---|---|
(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 "ui/gl/gl_bindings.h" | |
10 | |
11 namespace content { | |
12 | |
13 // A utility class which copies the given external texture | |
14 // (GL_TEXTURE_EXTERNAL_OES) to the target texture (GL_TEXTURE_2D) by using | |
15 // framebuffer. | |
16 class Gles2ExternalTextureCopier { | |
Ami GONE FROM CHROMIUM
2013/02/13 18:07:11
What's the status of using glCopyTextureChromium?
dwkang1
2013/02/14 01:38:51
I've asked it also to Gregg(gman@), and cced you,
Ami GONE FROM CHROMIUM
2013/02/14 16:43:25
I remember that thread but thought it ended w/ gma
dwkang1
2013/02/16 11:30:31
Unfortunately, CopyTextureCHROMIUMResourceManager
| |
17 public: | |
18 Gles2ExternalTextureCopier(); | |
19 virtual ~Gles2ExternalTextureCopier(); | |
20 | |
21 bool Init(int32 width, int32 height); | |
22 | |
23 bool Copy(GLuint source_texture_id, GLuint destination_texture_id, | |
24 const float transfrom_matrix[16]); | |
25 | |
26 private: | |
27 bool SetupGraphics(); | |
28 void RenderFrame(int32 width, int32 height, GLuint texture_id, | |
29 const float transfrom_matrix[16]); | |
30 bool SetupFrameBuffer(); | |
31 | |
32 bool initialized_; | |
33 int32 width_; | |
34 int32 height_; | |
35 GLuint framebuffer_id_; | |
36 GLuint renderbuffer_id_; | |
37 GLuint program_; | |
38 GLuint position_handle_; | |
39 GLuint st_matrix_handle_; | |
40 GLuint mvp_matrix_handle_; | |
41 GLuint texture_handle_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(Gles2ExternalTextureCopier); | |
44 }; | |
45 | |
46 } // namespace content | |
47 | |
48 #endif // CONTENT_COMMON_GPU_MEDIA_GLES2_EXTERNAL_TEXTURE_COPIER_H_ | |
OLD | NEW |