diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 17:55:17 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 17:55:17 +0000 |
commit | a471e9c8828edff914937df14c1998d4bc3dff72 (patch) | |
tree | 5ecee8eb523eee9b9c405afcc7a063a53b016343 /chrome/renderer/webplugin_delegate_pepper.cc | |
parent | ba397fb326b12316038ae9b0b219e0283dcc55ad (diff) | |
download | chromium_src-a471e9c8828edff914937df14c1998d4bc3dff72.zip chromium_src-a471e9c8828edff914937df14c1998d4bc3dff72.tar.gz chromium_src-a471e9c8828edff914937df14c1998d4bc3dff72.tar.bz2 |
GPU plugin size is updated before GPU command buffer is initialized.
Now it happens before the command buffer is initialized, which fixes an occasional race condition in Pepper 3D plugins that are not animated.
TEST=try
BUG=none
Review URL: http://codereview.chromium.org/2461003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48848 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/webplugin_delegate_pepper.cc')
-rw-r--r-- | chrome/renderer/webplugin_delegate_pepper.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc index 2523efc..1fd996e 100644 --- a/chrome/renderer/webplugin_delegate_pepper.cc +++ b/chrome/renderer/webplugin_delegate_pepper.cc @@ -580,6 +580,10 @@ NPError WebPluginDelegatePepper::Device3DInitializeContext( false)) { plugin_->SetAcceptsInputEvents(true); + // Ensure the window has the correct size before initializing the + // command buffer. + nested_delegate_->UpdateGeometry(window_rect_, clip_rect_); + // Ask the GPU plugin to create a command buffer and return a proxy. command_buffer_ = nested_delegate_->CreateCommandBuffer(); if (command_buffer_) { @@ -599,8 +603,6 @@ NPError WebPluginDelegatePepper::Device3DInitializeContext( ScheduleHandleRepaint(instance_->npp(), context); - // Ensure the service knows the window size before rendering anything. - nested_delegate_->UpdateGeometry(window_rect_, clip_rect_); #if defined(OS_MACOSX) command_buffer_->SetWindowSize(window_rect_.size()); #endif // OS_MACOSX |