Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Unified Diff: content/renderer/browser_plugin/browser_plugin_compositing_helper.cc

Issue 12612005: Revert 186627 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
===================================================================
--- content/renderer/browser_plugin/browser_plugin_compositing_helper.cc (revision 186756)
+++ content/renderer/browser_plugin/browser_plugin_compositing_helper.cc (working copy)
@@ -63,9 +63,9 @@
// We use a shared graphics context accessible from the main
// thread to do it.
void BrowserPluginCompositingHelper::FreeMailboxMemory(
- const gpu::Mailbox& mailbox_name,
+ const std::string& mailbox_name,
unsigned sync_point) {
- if (mailbox_name.IsZero())
+ if (mailbox_name.empty())
return;
scoped_refptr<cc::ContextProvider> context_provider =
@@ -87,12 +87,14 @@
unsigned texture_id = context->createTexture();
context->bindTexture(GL_TEXTURE_2D, texture_id);
- context->consumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox_name.name);
+ context->consumeTextureCHROMIUM(
+ GL_TEXTURE_2D,
+ reinterpret_cast<const int8*>(mailbox_name.data()));
context->deleteTexture(texture_id);
}
void BrowserPluginCompositingHelper::MailboxReleased(
- const gpu::Mailbox& mailbox_name,
+ const std::string& mailbox_name,
int gpu_route_id,
int gpu_host_id,
unsigned sync_point) {
@@ -154,7 +156,7 @@
void BrowserPluginCompositingHelper::OnBuffersSwapped(
const gfx::Size& size,
- const gpu::Mailbox& mailbox_name,
+ const std::string& mailbox_name,
int gpu_route_id,
int gpu_host_id,
float device_scale_factor) {
@@ -201,9 +203,9 @@
texture_layer_->setBounds(device_scale_adjusted_size);
}
- bool current_mailbox_valid = !mailbox_name.IsZero();
+ bool current_mailbox_valid = !mailbox_name.empty();
if (!last_mailbox_valid_) {
- MailboxReleased(gpu::Mailbox(), gpu_route_id, gpu_host_id, 0);
+ MailboxReleased(std::string(), gpu_route_id, gpu_host_id, 0);
if (!current_mailbox_valid)
return;
}

Powered by Google App Engine
This is Rietveld 408576698