[chromium] Allow retaining texture across frames in composited video playback and...
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2012 22:20:25 +0000 (22:20 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2012 22:20:25 +0000 (22:20 +0000)
commit19b38d5091e70518da3d5cc52b34748f804cbfc9
tree93547b42fcd05452b8e4320a394610712cfad19c
parentd9337708a4264f3688e87ce2fdb797f658677a9d
[chromium] Allow retaining texture across frames in composited video playback and correctly handle lost context
https://bugs.webkit.org/show_bug.cgi?id=77923

Reviewed by Kenneth Russell.

Thanks to r106840, we can improve the video playback mode a bit. Instead of creating a new texture on every
frame, this attempts to reuse the texture from the previous frame unless the context is lost. Also improves
error checking in case the TextureManager cannot successfully reserve memory for the texture.

Tested manually by killing the GPU process with an html5 video playing and verifying that the video playback
continues and that we don't create a new set of textures for each plane on each frame.

* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::draw):
(WebCore::CCVideoLayerImpl::reserveTextures):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106992 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp