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

Side by Side Diff: ui/gl/yuv_to_rgb_converter.h

Issue 1980183002: Workaround for Mac video flickering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 4 years, 7 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
« no previous file with comments | « ui/gl/gl_image_io_surface.mm ('k') | ui/gl/yuv_to_rgb_converter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 UI_GL_YUV420_RGB_CONVERTER_H_ 5 #ifndef UI_GL_YUV420_RGB_CONVERTER_H_
6 #define UI_GL_YUV420_RGB_CONVERTER_H_ 6 #define UI_GL_YUV420_RGB_CONVERTER_H_
7 7
8 #include "ui/gfx/geometry/size.h" 8 #include "ui/gfx/geometry/size.h"
9 9
10 namespace gl { 10 namespace gl {
11 11
12 class YUVToRGBConverter { 12 class YUVToRGBConverter {
13 public: 13 public:
14 YUVToRGBConverter(); 14 YUVToRGBConverter();
15 ~YUVToRGBConverter(); 15 ~YUVToRGBConverter();
16
17 // The input Y and UV textures should be bound to these texture objects
18 // prior to calling CopyYUV420ToRGB.
19 unsigned y_texture() const { return y_texture_; }
20 unsigned uv_texture() const { return uv_texture_; }
21
16 void CopyYUV420ToRGB(unsigned target, 22 void CopyYUV420ToRGB(unsigned target,
17 unsigned y_texture,
18 unsigned uv_texture,
19 const gfx::Size& size, 23 const gfx::Size& size,
20 unsigned rgb_texture); 24 unsigned rgb_texture);
21 25
22 private: 26 private:
23 unsigned framebuffer_ = 0; 27 unsigned framebuffer_ = 0;
24 unsigned vertex_shader_ = 0; 28 unsigned vertex_shader_ = 0;
25 unsigned fragment_shader_ = 0; 29 unsigned fragment_shader_ = 0;
26 unsigned program_ = 0; 30 unsigned program_ = 0;
27 int size_location_ = -1; 31 int size_location_ = -1;
28 unsigned vertex_buffer_ = 0; 32 unsigned vertex_buffer_ = 0;
33 unsigned y_texture_ = 0;
34 unsigned uv_texture_ = 0;
29 }; 35 };
30 36
31 } // namespace gl 37 } // namespace gl
32 38
33 #endif // UI_GL_YUV420_RGB_CONVERTER_H_ 39 #endif // UI_GL_YUV420_RGB_CONVERTER_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_image_io_surface.mm ('k') | ui/gl/yuv_to_rgb_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698