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

Unified Diff: content/renderer/pepper/pepper_platform_context_3d.cc

Issue 165393003: gpu: Generate mailboxes on client side (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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/pepper/pepper_platform_context_3d.cc
diff --git a/content/renderer/pepper/pepper_platform_context_3d.cc b/content/renderer/pepper/pepper_platform_context_3d.cc
index b9fd07b67d5ef1a26be0e09a23902937b710f41d..a10a221efb067327f2150e902575bd7cb6d0c962 100644
--- a/content/renderer/pepper/pepper_platform_context_3d.cc
+++ b/content/renderer/pepper/pepper_platform_context_3d.cc
@@ -100,13 +100,10 @@ bool PlatformContext3D::Init(const int32* attrib_list,
return false;
if (!command_buffer_->Initialize())
return false;
- std::vector<gpu::Mailbox> names;
- if (!command_buffer_->GenerateMailboxNames(1, &names))
+ gpu::Mailbox mailbox = gpu::Mailbox::Generate();
+ if (!command_buffer_->ProduceFrontBuffer(mailbox))
return false;
- DCHECK_EQ(names.size(), 1u);
- if (!command_buffer_->ProduceFrontBuffer(names[0]))
- return false;
- mailbox_ = names[0];
+ mailbox_ = mailbox;
command_buffer_->SetChannelErrorCallback(
base::Bind(&PlatformContext3D::OnContextLost,

Powered by Google App Engine
This is Rietveld 408576698