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

Unified Diff: content/common/gpu/client/gl_helper.cc

Issue 132233041: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ff7262fa Rebase. Created 6 years, 11 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
« no previous file with comments | « content/common/gpu/client/gl_helper.h ('k') | content/renderer/child_frame_compositing_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8d9dbac3b152f0318f523d20330b410c3b83478d..fa4430ee7c971d5eaddd2ae723669be11a53e34f 100644
--- a/content/common/gpu/client/gl_helper.cc
+++ b/content/common/gpu/client/gl_helper.cc
@@ -19,6 +19,7 @@
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/command_buffer/client/context_support.h"
#include "gpu/command_buffer/common/mailbox.h"
+#include "gpu/command_buffer/common/mailbox_holder.h"
#include "media/base/video_frame.h"
#include "media/base/video_util.h"
#include "third_party/skia/include/core/SkRegion.h"
@@ -822,18 +823,15 @@ void GLHelper::WaitSyncPoint(uint32 sync_point) {
gl_->WaitSyncPointCHROMIUM(sync_point);
}
-gpu::Mailbox GLHelper::ProduceMailboxFromTexture(GLuint texture_id,
- uint32* sync_point) {
+gpu::MailboxHolder GLHelper::ProduceMailboxHolderFromTexture(
+ GLuint texture_id) {
gpu::Mailbox mailbox;
gl_->GenMailboxCHROMIUM(mailbox.name);
- if (mailbox.IsZero()) {
- *sync_point = 0;
- return mailbox;
- }
+ if (mailbox.IsZero())
+ return gpu::MailboxHolder();
content::ScopedTextureBinder<GL_TEXTURE_2D> texture_binder(gl_, texture_id);
gl_->ProduceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
- *sync_point = InsertSyncPoint();
- return mailbox;
+ return gpu::MailboxHolder(mailbox, GL_TEXTURE_2D, InsertSyncPoint());
}
GLuint GLHelper::ConsumeMailboxToTexture(const gpu::Mailbox& mailbox,
« no previous file with comments | « content/common/gpu/client/gl_helper.h ('k') | content/renderer/child_frame_compositing_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698