Chromium Code Reviews| Index: webkit/plugins/ppapi/ppb_graphics_2d_impl.cc |
| diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc |
| index 43a3467c6a106659d9c0b6ed80501331a23bc0e9..75c6ed5b0e99a5956c35165a13450a0e2c620d16 100644 |
| --- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc |
| +++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc |
| @@ -459,12 +459,16 @@ bool PPB_Graphics2D_Impl::BindToInstance(PluginInstance* new_instance) { |
| // we need to clear the list, but we still want to issue any pending |
| // callbacks to the plugin. |
| if (!unpainted_flush_callback_.is_null()) { |
| - ScheduleOffscreenCallback(unpainted_flush_callback_); |
| + FlushCallbackData callback; |
| + std::swap(callback, unpainted_flush_callback_); |
| unpainted_flush_callback_.Clear(); |
|
viettrungluu
2011/03/08 00:06:01
Is this Clear() really needed?
piman
2011/03/08 00:55:30
Done.
|
| + ScheduleOffscreenCallback(callback); |
| } |
| if (!painted_flush_callback_.is_null()) { |
| - ScheduleOffscreenCallback(painted_flush_callback_); |
| + FlushCallbackData callback; |
| + std::swap(callback, painted_flush_callback_); |
| painted_flush_callback_.Clear(); |
|
viettrungluu
2011/03/08 00:06:01
"
piman
2011/03/08 00:55:30
Done.
|
| + ScheduleOffscreenCallback(callback); |
| } |
| } else if (flushed_any_data_) { |
| // Only schedule a paint if this backing store has had any data flushed to |