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

Unified Diff: content/common/gpu/client/gl_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: c301e01d Rebase. Created 6 years, 12 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/common/gpu/client/gl_helper.cc
diff --git a/content/common/gpu/client/gl_helper.cc b/content/common/gpu/client/gl_helper.cc
index 3ea2557a69dbb970af8e6b656a62001b30e82d50..604de8ac3f7bc6d0d981c4753b7c3e0c18e4d0e4 100644
--- a/content/common/gpu/client/gl_helper.cc
+++ b/content/common/gpu/client/gl_helper.cc
@@ -706,19 +706,17 @@ void GLHelper::WaitSyncPoint(uint32 sync_point) {
context_->waitSyncPoint(sync_point);
}
-gpu::Mailbox GLHelper::ProduceMailboxFromTexture(blink::WebGLId texture_id,
- uint32* sync_point) {
+gpu::MailboxHolder GLHelper::ProduceMailboxHolderFromTexture(
+ blink::WebGLId texture_id) {
gpu::Mailbox mailbox;
context_->genMailboxCHROMIUM(mailbox.name);
- if (mailbox.IsZero()) {
- *sync_point = 0;
- return mailbox;
- }
+ if (mailbox.IsZero())
+ return gpu::MailboxHolder();
content::ScopedTextureBinder<GL_TEXTURE_2D> texture_binder(context_,
texture_id);
context_->produceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
- *sync_point = context_->insertSyncPoint();
- return mailbox;
+ return gpu::MailboxHolder(
+ mailbox, GL_TEXTURE_2D, context_->insertSyncPoint());
}
blink::WebGLId GLHelper::ConsumeMailboxToTexture(const gpu::Mailbox& mailbox,

Powered by Google App Engine
This is Rietveld 408576698