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

Unified Diff: ui/gl/gl_image_io_surface.h

Issue 1870323002: Mac h264: Plug GL program leak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add thread checker Created 4 years, 8 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
« no previous file with comments | « no previous file | ui/gl/gl_image_io_surface.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_io_surface.h
diff --git a/ui/gl/gl_image_io_surface.h b/ui/gl/gl_image_io_surface.h
index d17d9eb9d0084349456bf074bb057f21e874ddca..7b68a96b6f54ac7c718de1662a80a2079440b4e2 100644
--- a/ui/gl/gl_image_io_surface.h
+++ b/ui/gl/gl_image_io_surface.h
@@ -69,6 +69,8 @@ class GL_EXPORT GLImageIOSurface : public GLImage {
~GLImageIOSurface() override;
private:
+ class RGBConverter;
+
const gfx::Size size_;
const unsigned internalformat_;
gfx::BufferFormat format_;
@@ -77,13 +79,9 @@ class GL_EXPORT GLImageIOSurface : public GLImage {
gfx::GenericSharedMemoryId io_surface_id_;
base::ThreadChecker thread_checker_;
- // GL state to support 420v IOSurface conversion to RGB.
- unsigned framebuffer_ = 0;
- unsigned vertex_shader_ = 0;
- unsigned fragment_shader_ = 0;
- unsigned program_ = 0;
- int size_location_ = -1;
- unsigned vertex_buffer_ = 0;
+ // GL state to support 420v IOSurface conversion to RGB. This is retained
+ // to avoid re-creating the necessary GL programs every frame.
+ scoped_refptr<RGBConverter> rgb_converter_;
DISALLOW_COPY_AND_ASSIGN(GLImageIOSurface);
};
« no previous file with comments | « no previous file | ui/gl/gl_image_io_surface.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698