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

Unified Diff: cc/resources/video_resource_updater.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: cc/resources/video_resource_updater.cc
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index bd914179fade171507746dde9fa64be321e94d0f..b170be6784b2a443978d6d2fcc94782fb7a4fe2d 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -213,16 +213,11 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL();
GLC(gl, gl->GenMailboxCHROMIUM(mailbox.name));
- if (mailbox.IsZero()) {
- resource_provider_->DeleteResource(resource_id);
- resource_id = 0;
- } else {
- ResourceProvider::ScopedWriteLockGL lock(
- resource_provider_, resource_id);
- GLC(gl, gl->BindTexture(GL_TEXTURE_2D, lock.texture_id()));
- GLC(gl, gl->ProduceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name));
- GLC(gl, gl->BindTexture(GL_TEXTURE_2D, 0));
- }
+ ResourceProvider::ScopedWriteLockGL lock(resource_provider_,
+ resource_id);
+ GLC(gl, gl->BindTexture(GL_TEXTURE_2D, lock.texture_id()));
+ GLC(gl, gl->ProduceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name));
+ GLC(gl, gl->BindTexture(GL_TEXTURE_2D, 0));
}
if (resource_id)

Powered by Google App Engine
This is Rietveld 408576698