Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 614cbf4000576667d412cdbe275f282fd7ad67c5 https://github.com/WebKit/WebKit/commit/614cbf4000576667d412cdbe275f282fd7ad67c5 Author: Kimmo Kinnunen <kkinnu...@apple.com> Date: 2023-09-22 (Fri, 22 Sep 2023)
Changed paths: M Source/WebCore/platform/graphics/NativeImage.cpp M Source/WebCore/platform/graphics/NativeImage.h M Source/WebCore/platform/graphics/cg/NativeImageCG.cpp M Source/WebKit/GPUProcess/media/RemoteImageDecoderAVFProxy.cpp Log Message: ----------- RemoteImageDecoderAVFProxy leaks video frames through CG image cache https://bugs.webkit.org/show_bug.cgi?id=261869 rdar://115834350 Reviewed by Brent Fulgham. Currently transferring ImageDecoder frames from GPUP happens for example when a video is in <img> tag. Currently the frame is converted to a new bitmap due to NativeImage transfer shortcomings. When drawn from, CG might convert the image to a source it can read more efficiently. Unless the image is marked as transient, the converted source image will be stored into a global cache. In case of videos, this cache grows very fast since the videos might be big. Fix by marking the frame as transient. Later on the conversion-transfer step is planned to be fixed in more consistent way. * Source/WebCore/platform/graphics/NativeImage.cpp: (WebCore::createTransient): * Source/WebCore/platform/graphics/NativeImage.h: * Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): * Source/WebCore/platform/graphics/cg/NativeImageCG.cpp: (WebCore::NativeImage::create): (WebCore::NativeImage::createTransient): * Source/WebKit/GPUProcess/media/RemoteImageDecoderAVFProxy.cpp: (WebKit::RemoteImageDecoderAVFProxy::createFrameImageAtIndex): Canonical link: https://commits.webkit.org/268323@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes