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

Unified Diff: ui/gl/yuv_to_rgb_converter.cc

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 side-by-side diff with in-line comments
Download patch
« ui/gl/yuv_to_rgb_converter.h ('K') | « ui/gl/yuv_to_rgb_converter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/yuv_to_rgb_converter.cc
diff --git a/ui/gl/yuv_to_rgb_converter.cc b/ui/gl/yuv_to_rgb_converter.cc
index 4c19b3685d0ceb1396c3c49b0f5b067f2bf26571..11cba8cf24e7de31af9f5ab86668b284d0c83b48 100644
--- a/ui/gl/yuv_to_rgb_converter.cc
+++ b/ui/gl/yuv_to_rgb_converter.cc
@@ -100,12 +100,17 @@ YUVToRGBConverter::YUVToRGBConverter() {
int uv_sampler_location = glGetUniformLocation(program_, "a_uv_texture");
DCHECK_NE(-1, uv_sampler_location);
+ glGenTextures(1, &y_texture_);
+ glGenTextures(1, &uv_texture_);
+
glUniform1i(y_sampler_location, 0);
glUniform1i(uv_sampler_location, 1);
}
YUVToRGBConverter::~YUVToRGBConverter() {
gfx::ScopedSetGLToRealGLApi scoped_set_gl_api;
+ glDeleteTextures(1, &y_texture_);
+ glDeleteTextures(1, &uv_texture_);
glDeleteProgram(program_);
glDeleteShader(vertex_shader_);
glDeleteShader(fragment_shader_);
« ui/gl/yuv_to_rgb_converter.h ('K') | « ui/gl/yuv_to_rgb_converter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698