| 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 5d903d61d067dffa39b1d363734f128d6373b975..006bd802aec8c32fc3a7925018199fb1c94346bb 100644
|
| --- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
|
| +++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
|
| @@ -63,9 +63,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 =
|
| @@ -87,14 +87,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);
|
| 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) {
|
| @@ -156,7 +154,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) {
|
| @@ -203,9 +201,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;
|
| }
|
|
|