Chromium Code Reviews| Index: content/renderer/browser_plugin/browser_plugin_compositing_helper.cc |
| diff --git a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc |
| index bf7956ea1abd465677978223a19cb97deebfebe1..1c505bea9e7fd56fb2555b82b454d617b8c8370d 100644 |
| --- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc |
| +++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc |
| @@ -62,9 +62,9 @@ void BrowserPluginCompositingHelper::EnableCompositing(bool enable) { |
| // We use a shared graphics context accessible from the main |
| // thread to do it. |
| void BrowserPluginCompositingHelper::FreeMailboxMemory( |
| - const std::string& mailbox_name, |
| + const gpu::Mailbox& mailbox_name, |
| unsigned sync_point) { |
| - if (mailbox_name.empty()) |
| + if (mailbox_name.IsZero()) |
| return; |
| scoped_refptr<cc::ContextProvider> context_provider = |
| @@ -86,14 +86,12 @@ void BrowserPluginCompositingHelper::FreeMailboxMemory( |
| unsigned texture_id = context->createTexture(); |
| context->bindTexture(GL_TEXTURE_2D, texture_id); |
| - context->consumeTextureCHROMIUM( |
| - GL_TEXTURE_2D, |
| - reinterpret_cast<const int8*>(mailbox_name.data())); |
| + context->consumeTextureCHROMIUM( GL_TEXTURE_2D, mailbox_name.name); |
|
alexst (slow to review)
2013/03/06 21:54:27
There is an extra space here
piman
2013/03/07 01:48:02
Done.
|
| context->deleteTexture(texture_id); |
| } |
| void BrowserPluginCompositingHelper::MailboxReleased( |
| - const std::string& mailbox_name, |
| + const gpu::Mailbox& mailbox_name, |
| int gpu_route_id, |
| int gpu_host_id, |
| unsigned sync_point) { |
| @@ -155,7 +153,7 @@ void BrowserPluginCompositingHelper::OnContainerDestroy() { |
| void BrowserPluginCompositingHelper::OnBuffersSwapped( |
| const gfx::Size& size, |
| - const std::string& mailbox_name, |
| + const gpu::Mailbox& mailbox_name, |
| int gpu_route_id, |
| int gpu_host_id, |
| float device_scale_factor) { |
| @@ -202,9 +200,9 @@ void BrowserPluginCompositingHelper::OnBuffersSwapped( |
| texture_layer_->setBounds(device_scale_adjusted_size); |
| } |
| - bool current_mailbox_valid = !mailbox_name.empty(); |
| + bool current_mailbox_valid = !mailbox_name.IsZero(); |
| if (!last_mailbox_valid_) { |
| - MailboxReleased(std::string(), gpu_route_id, gpu_host_id, 0); |
| + MailboxReleased(gpu::Mailbox(), gpu_route_id, gpu_host_id, 0); |
| if (!current_mailbox_valid) |
| return; |
| } |