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

Side by Side Diff: content/renderer/media/android/stream_texture_factory_synchronous_impl.cc

Issue 371463009: Making use of bindless variants mailbox produce/consume on remainders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minimize diff in gl_renderer Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/android/stream_texture_factory_synchronous_impl .h" 5 #include "content/renderer/media/android/stream_texture_factory_synchronous_impl .h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 unsigned texture_target, 161 unsigned texture_target,
162 unsigned* texture_id, 162 unsigned* texture_id,
163 gpu::Mailbox* texture_mailbox) { 163 gpu::Mailbox* texture_mailbox) {
164 DCHECK(context_provider_); 164 DCHECK(context_provider_);
165 unsigned stream_id = 0; 165 unsigned stream_id = 0;
166 GLES2Interface* gl = context_provider_->ContextGL(); 166 GLES2Interface* gl = context_provider_->ContextGL();
167 gl->GenTextures(1, texture_id); 167 gl->GenTextures(1, texture_id);
168 stream_id = gl->CreateStreamTextureCHROMIUM(*texture_id); 168 stream_id = gl->CreateStreamTextureCHROMIUM(*texture_id);
169 169
170 gl->GenMailboxCHROMIUM(texture_mailbox->name); 170 gl->GenMailboxCHROMIUM(texture_mailbox->name);
171 gl->BindTexture(texture_target, *texture_id); 171 gl->ProduceTextureDirectCHROMIUM(
172 gl->ProduceTextureCHROMIUM(texture_target, texture_mailbox->name); 172 *texture_id, texture_target, texture_mailbox->name);
173 return stream_id; 173 return stream_id;
174 } 174 }
175 175
176 void StreamTextureFactorySynchronousImpl::SetStreamTextureSize( 176 void StreamTextureFactorySynchronousImpl::SetStreamTextureSize(
177 int32 stream_id, 177 int32 stream_id,
178 const gfx::Size& size) {} 178 const gfx::Size& size) {}
179 179
180 gpu::gles2::GLES2Interface* StreamTextureFactorySynchronousImpl::ContextGL() { 180 gpu::gles2::GLES2Interface* StreamTextureFactorySynchronousImpl::ContextGL() {
181 DCHECK(context_provider_); 181 DCHECK(context_provider_);
182 return context_provider_->ContextGL(); 182 return context_provider_->ContextGL();
183 } 183 }
184 184
185 } // namespace content 185 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698