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

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

Issue 2170293002: Use GLVersionInfo instead of gl::GetGLImplementation() to decide GL paths (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 years, 5 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/test/gl_image_test_template.h ('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 struct GLVersionInfo;
13
12 class YUVToRGBConverter { 14 class YUVToRGBConverter {
13 public: 15 public:
14 YUVToRGBConverter(); 16 explicit YUVToRGBConverter(const GLVersionInfo& gl_version_info);
15 ~YUVToRGBConverter(); 17 ~YUVToRGBConverter();
16 18
17 // The input Y and UV textures should be bound to these texture objects 19 // The input Y and UV textures should be bound to these texture objects
18 // prior to calling CopyYUV420ToRGB. 20 // prior to calling CopyYUV420ToRGB.
19 unsigned y_texture() const { return y_texture_; } 21 unsigned y_texture() const { return y_texture_; }
20 unsigned uv_texture() const { return uv_texture_; } 22 unsigned uv_texture() const { return uv_texture_; }
21 23
22 void CopyYUV420ToRGB(unsigned target, 24 void CopyYUV420ToRGB(unsigned target,
23 const gfx::Size& size, 25 const gfx::Size& size,
24 unsigned rgb_texture); 26 unsigned rgb_texture);
25 27
26 private: 28 private:
27 unsigned framebuffer_ = 0; 29 unsigned framebuffer_ = 0;
28 unsigned vertex_shader_ = 0; 30 unsigned vertex_shader_ = 0;
29 unsigned fragment_shader_ = 0; 31 unsigned fragment_shader_ = 0;
30 unsigned program_ = 0; 32 unsigned program_ = 0;
31 int size_location_ = -1; 33 int size_location_ = -1;
32 unsigned vertex_buffer_ = 0; 34 unsigned vertex_buffer_ = 0;
33 unsigned y_texture_ = 0; 35 unsigned y_texture_ = 0;
34 unsigned uv_texture_ = 0; 36 unsigned uv_texture_ = 0;
35 }; 37 };
36 38
37 } // namespace gl 39 } // namespace gl
38 40
39 #endif // UI_GL_YUV420_RGB_CONVERTER_H_ 41 #endif // UI_GL_YUV420_RGB_CONVERTER_H_
OLDNEW
« no previous file with comments | « ui/gl/test/gl_image_test_template.h ('k') | ui/gl/yuv_to_rgb_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698