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

Unified Diff: content/renderer/media/android/stream_texture_factory_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, 2 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/renderer/media/android/stream_texture_factory_impl.cc
diff --git a/content/renderer/media/android/stream_texture_factory_impl.cc b/content/renderer/media/android/stream_texture_factory_impl.cc
index a17531b2c91a35c97b4907e041e74192126602c3..92ee401e197426ee3e3f9c6abf3e99f4378e03a3 100644
--- a/content/renderer/media/android/stream_texture_factory_impl.cc
+++ b/content/renderer/media/android/stream_texture_factory_impl.cc
@@ -5,6 +5,7 @@
#include "content/renderer/media/android/stream_texture_factory_impl.h"
#include "cc/output/context_provider.h"
+#include "content/common/gpu/client/context_provider_command_buffer.h"
#include "content/common/gpu/client/gpu_channel_host.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/renderer/gpu/stream_texture_host_android.h"
@@ -110,14 +111,14 @@ void StreamTextureProxyImpl::OnMatrixChanged(const float matrix[16]) {
// static
scoped_refptr<StreamTextureFactoryImpl> StreamTextureFactoryImpl::Create(
- const scoped_refptr<cc::ContextProvider>& context_provider,
+ const scoped_refptr<ContextProviderCommandBuffer>& context_provider,
GpuChannelHost* channel,
int frame_id) {
return new StreamTextureFactoryImpl(context_provider, channel, frame_id);
}
StreamTextureFactoryImpl::StreamTextureFactoryImpl(
- const scoped_refptr<cc::ContextProvider>& context_provider,
+ const scoped_refptr<ContextProviderCommandBuffer>& context_provider,
GpuChannelHost* channel,
int frame_id)
: context_provider_(context_provider),
@@ -147,9 +148,10 @@ unsigned StreamTextureFactoryImpl::CreateStreamTexture(
GLuint stream_id = 0;
gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL();
gl->GenTextures(1, texture_id);
-
- stream_id = gl->CreateStreamTextureCHROMIUM(*texture_id);
-
+ gl->Flush();
no sievers 2015/10/26 21:35:33 ShallowFlushCHROMIUM() is good enough (and same as
sivag 2015/10/27 15:42:44 Done.
+ stream_id =
+ context_provider_->GetCommandBufferProxy()->CreateStreamTexture(
+ *texture_id);
gl->GenMailboxCHROMIUM(texture_mailbox->name);
gl->ProduceTextureDirectCHROMIUM(
*texture_id, texture_target, texture_mailbox->name);

Powered by Google App Engine
This is Rietveld 408576698