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

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: 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 void CopyYUV420ToRGB(unsigned target, 16 void CopyYUV420ToRGB(unsigned target,
17 unsigned y_texture, 17 unsigned y_texture,
18 unsigned uv_texture, 18 unsigned uv_texture,
19 const gfx::Size& size, 19 const gfx::Size& size,
20 unsigned rgb_texture); 20 unsigned rgb_texture);
21 21
22 // Workaround for https://crbug.com/611511:
23 // Destroying a GL texture object every frame will cause an implicit
24 // glFlush, which exposes a bug whereby incompletely-rendered compositor
25 // frames will appear briefly on-screen.
26 // TODO(ccameron): Fix the underlying but whereby inoppurtune glFlushes
Daniele Castagna 2016/05/17 19:29:37 I think this patch makes sense by itself even if i
27 // cause incorrect rendering results.
28 unsigned y_texture() const { return y_texture_; }
29 unsigned uv_texture() const { return uv_texture_; }
30
22 private: 31 private:
23 unsigned framebuffer_ = 0; 32 unsigned framebuffer_ = 0;
24 unsigned vertex_shader_ = 0; 33 unsigned vertex_shader_ = 0;
25 unsigned fragment_shader_ = 0; 34 unsigned fragment_shader_ = 0;
26 unsigned program_ = 0; 35 unsigned program_ = 0;
27 int size_location_ = -1; 36 int size_location_ = -1;
28 unsigned vertex_buffer_ = 0; 37 unsigned vertex_buffer_ = 0;
38
Daniele Castagna 2016/05/17 19:29:37 nit: no need for the blank line.
39 unsigned y_texture_ = 0;
40 unsigned uv_texture_ = 0;
29 }; 41 };
30 42
31 } // namespace gl 43 } // namespace gl
32 44
33 #endif // UI_GL_YUV420_RGB_CONVERTER_H_ 45 #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