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

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

Issue 1385883002: Leave CreateStreamTexture route id out of the GL interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 193 }
194 194
195 unsigned StreamTextureFactorySynchronousImpl::CreateStreamTexture( 195 unsigned StreamTextureFactorySynchronousImpl::CreateStreamTexture(
196 unsigned texture_target, 196 unsigned texture_target,
197 unsigned* texture_id, 197 unsigned* texture_id,
198 gpu::Mailbox* texture_mailbox) { 198 gpu::Mailbox* texture_mailbox) {
199 DCHECK(context_provider_.get()); 199 DCHECK(context_provider_.get());
200 unsigned stream_id = 0; 200 unsigned stream_id = 0;
201 GLES2Interface* gl = context_provider_->ContextGL(); 201 GLES2Interface* gl = context_provider_->ContextGL();
202 gl->GenTextures(1, texture_id); 202 gl->GenTextures(1, texture_id);
203 stream_id = gl->CreateStreamTextureCHROMIUM(*texture_id); 203 gl->ShallowFlushCHROMIUM();
204 204 stream_id = context_provider_->CreateStreamTexture(*texture_id);
205 gl->GenMailboxCHROMIUM(texture_mailbox->name); 205 gl->GenMailboxCHROMIUM(texture_mailbox->name);
206 gl->ProduceTextureDirectCHROMIUM( 206 gl->ProduceTextureDirectCHROMIUM(
207 *texture_id, texture_target, texture_mailbox->name); 207 *texture_id, texture_target, texture_mailbox->name);
208 return stream_id; 208 return stream_id;
209 } 209 }
210 210
211 void StreamTextureFactorySynchronousImpl::SetStreamTextureSize( 211 void StreamTextureFactorySynchronousImpl::SetStreamTextureSize(
212 int32 stream_id, 212 int32 stream_id,
213 const gfx::Size& size) {} 213 const gfx::Size& size) {}
214 214
(...skipping 12 matching lines...) Expand all
227 227
228 void StreamTextureFactorySynchronousImpl::RemoveObserver( 228 void StreamTextureFactorySynchronousImpl::RemoveObserver(
229 StreamTextureFactoryContextObserver* obs) { 229 StreamTextureFactoryContextObserver* obs) {
230 DCHECK_EQ(observer_, obs); 230 DCHECK_EQ(observer_, obs);
231 observer_ = NULL; 231 observer_ = NULL;
232 if (context_provider_.get()) 232 if (context_provider_.get())
233 context_provider_->RemoveObserver(obs); 233 context_provider_->RemoveObserver(obs);
234 } 234 }
235 235
236 } // namespace content 236 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698