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

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

Issue 105743004: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cc2a95fe Android fixes. Created 7 years 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
diff --git a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
index 2b07d35cb857082a50bf987340b1960fe40df5ef..29afe9524230e1491e0b5d5d5052118d56ccc90f 100644
--- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
+++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
@@ -120,10 +120,9 @@ void BrowserPluginCompositingHelper::CheckSizeAndAdjustLayerProperties(
background_layer_->SetIsDrawable(false);
}
-void BrowserPluginCompositingHelper::MailboxReleased(
- SwapBuffersInfo mailbox,
- unsigned sync_point,
- bool lost_resource) {
+void BrowserPluginCompositingHelper::MailboxReleased(SwapBuffersInfo mailbox,
+ uint32 sync_point,
+ bool lost_resource) {
if (mailbox.type == SOFTWARE_COMPOSITOR_FRAME) {
delete mailbox.shared_memory;
mailbox.shared_memory = NULL;
@@ -206,7 +205,7 @@ void BrowserPluginCompositingHelper::OnContainerDestroy() {
void BrowserPluginCompositingHelper::OnBuffersSwappedPrivate(
const SwapBuffersInfo& mailbox,
- unsigned sync_point,
+ uint32 sync_point,
float device_scale_factor) {
DCHECK(!delegated_layer_.get());
// If these mismatch, we are either just starting up, GPU process crashed or
@@ -269,10 +268,12 @@ void BrowserPluginCompositingHelper::OnBuffersSwappedPrivate(
base::Bind(&BrowserPluginCompositingHelper::MailboxReleased,
scoped_refptr<BrowserPluginCompositingHelper>(this),
mailbox)).Pass();
- if (is_software_frame)
+ if (is_software_frame) {
texture_mailbox = cc::TextureMailbox(mailbox.shared_memory, mailbox.size);
- else
- texture_mailbox = cc::TextureMailbox(mailbox.name, sync_point);
+ } else {
+ texture_mailbox =
+ cc::TextureMailbox(mailbox.name, GL_TEXTURE_2D, sync_point);
+ }
}
texture_layer_->SetFlipped(!is_software_frame);

Powered by Google App Engine
This is Rietveld 408576698