Chromium Code Reviews| 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 "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_ | |
| OLD | NEW |