summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-11 00:54:02 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-11 00:54:02 +0000
commita03b2d2880f45263ee6460e5871d8fc409a6e736 (patch)
tree24dc6cf31a7e3284789963497ef2580371ba5e0a /webkit
parent546882bd3fae21df702efcaaec50ec168ec6bf86 (diff)
downloadchromium_src-a03b2d2880f45263ee6460e5871d8fc409a6e736.zip
chromium_src-a03b2d2880f45263ee6460e5871d8fc409a6e736.tar.gz
chromium_src-a03b2d2880f45263ee6460e5871d8fc409a6e736.tar.bz2
pepper: delay destruction of PlatformContext3D until after we call setBackingTextureId
This gives a chance to the compositor to ensure it's no longer using that texture before we delete it. BUG=124829 TEST=reload tabs with pepper in them, when using the compositor thread Review URL: https://chromiumcodereview.appspot.com/10391058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136471 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index a405e23..4bf6475 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -1614,6 +1614,9 @@ void PluginInstance::ClosePendingUserGesture(PP_Instance instance,
PP_Bool PluginInstance::BindGraphics(PP_Instance instance,
PP_Resource device) {
+ // The Graphics3D instance can't be destroyed until we call
+ // setBackingTextureId.
+ scoped_refptr< ::ppapi::Resource> old_graphics = bound_graphics_;
if (bound_graphics_.get()) {
if (GetBoundGraphics2D()) {
GetBoundGraphics2D()->BindToInstance(NULL);