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

Issue 1884763003: Mac h264: Plug GL program leak (Closed)

Created:
4 years, 8 months ago by ccameron
Modified:
4 years, 8 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2704
Target Ref:
refs/pending/branch-heads/2704
Project:
chromium
Visibility:
Public.

Description

Mac h264: Plug GL program leak The state for YUV to RGB conversion for GLImageIOSurface is stored in the GLImageIOSurface object. This is objectionable because - This means every GLImage object will re-create all shaders - For hardware decode, we create a new GLImage for every decoded frame, which means allocating a shader for every frame. - It is not clear which CGLContextObj the GL objects are associated with. - For hardware decode, we do not specify that a GL context is current when we free GLImages, so we end up leaking one GL program every frame. - This memory leak ends up causing GL context destroy to take more than ten seconds, causing a GPU hang when the GL context is destroyed. Move the program object into an RGBConverter class. Keep a global registry of RGBConverter classes for each CGLContextObj, and share RGBConverter objects across GLImages. Make the RGBConverter always destroy its objects when it is destroyed. It can do this because it retains the CGLContextObj that was used to allocate them. This could be better in that a pathological user of GLImages could still cause the RGBConverter to be created and destroyed every frame. BUG=598388, 599314 Review URL: https://codereview.chromium.org/1870323002 Cr-Commit-Position: refs/heads/master@{#386757} (cherry picked from commit c9295d4075c1e4a32977c446ab9734a88abf8391) Committed: https://chromium.googlesource.com/chromium/src/+/c5d9e014c2adc935365cb443444c7b28e52f9ad0

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -107 lines) Patch
M ui/gl/gl_image_io_surface.h View 2 chunks +5 lines, -7 lines 0 comments Download
M ui/gl/gl_image_io_surface.mm View 4 chunks +168 lines, -100 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
ccameron
4 years, 8 months ago (2016-04-12 20:52:48 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
c5d9e014c2adc935365cb443444c7b28e52f9ad0.

Powered by Google App Engine
This is Rietveld 408576698