Sync with impl thread when removing references to external textures
authorpiman@chromium.org <piman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 May 2012 03:07:08 +0000 (03:07 +0000)
committerpiman@chromium.org <piman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 May 2012 03:07:08 +0000 (03:07 +0000)
commit8231facfad8a69897f1473ffbfb0ce8edfe9ac3e
treef69a27a46816d97a77ae22226e227e52ce79f4bc
parent24cc809ed6a5388bb8819da7b0063b8740b27743
Sync with impl thread when removing references to external textures
https://bugs.webkit.org/show_bug.cgi?id=86054

We want to ensure the client side is safe to release textures, so we
sync with the impl thread when:
- we change the texture (and we had one)
- the layer is removed from the tree (and we had a texture)
- the layer is destroyed (and we had a texture)

Reviewed by James Robinson.

Test: TextureLayerChromiumTest.

* platform/graphics/chromium/TextureLayerChromium.cpp:
(WebCore::TextureLayerChromium::~TextureLayerChromium):
(WebCore::TextureLayerChromium::setTextureId):
(WebCore::TextureLayerChromium::setLayerTreeHost):
(WebCore):
* platform/graphics/chromium/TextureLayerChromium.h:
(TextureLayerChromium):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116722 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/TextureLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/TextureLayerChromium.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
Source/WebKit/chromium/WebKit.gypi
Source/WebKit/chromium/tests/TextureLayerChromiumTest.cpp [new file with mode: 0644]