summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-25 00:48:50 +0000
committerqinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-25 00:48:50 +0000
commit34aaa568000452d4edde5fbe03bbab8256ef026d (patch)
treec5a8bb65811d6d6e7460b99de4b26a0197b19d03
parente37dc38c5f1e4b21af6f4461104d3c749f26c6f8 (diff)
downloadchromium_src-34aaa568000452d4edde5fbe03bbab8256ef026d.zip
chromium_src-34aaa568000452d4edde5fbe03bbab8256ef026d.tar.gz
chromium_src-34aaa568000452d4edde5fbe03bbab8256ef026d.tar.bz2
Upstream the code to pass StreamTextureManagerAndroid from GpuChannel to GLES2DecoderImpl
The StreamTextureManagerAndroid object is responsible for creating the surface texture object on android. It is created in GpuChannel, and passed to GLES2DecoderImpl so that all the related commands can work. BUG= Review URL: https://chromiumcodereview.appspot.com/10978004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158467 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/common/gpu/gpu_channel.h6
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.cc8
2 files changed, 14 insertions, 0 deletions
diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h
index 12ede69..867c4ce 100644
--- a/content/common/gpu/gpu_channel.h
+++ b/content/common/gpu/gpu_channel.h
@@ -125,6 +125,12 @@ class GpuChannel : public IPC::Listener,
void SetPreemptByCounter(
scoped_refptr<gpu::RefCountedCounter> preempt_by_counter);
+#if defined(OS_ANDROID)
+ content::StreamTextureManagerAndroid* stream_texture_manager() {
+ return stream_texture_manager_.get();
+ }
+#endif
+
protected:
virtual ~GpuChannel();
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index 99d053f..6661447 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -33,6 +33,10 @@
#include "content/public/common/sandbox_init.h"
#endif
+#if defined(OS_ANDROID)
+#include "content/common/gpu/stream_texture_manager_android.h"
+#endif
+
namespace {
// The GpuCommandBufferMemoryTracker class provides a bridge between the
@@ -448,6 +452,10 @@ void GpuCommandBufferStub::OnInitialize(
base::Unretained(this)));
}
+#if defined(OS_ANDROID)
+ decoder_->SetStreamTextureManager(channel_->stream_texture_manager());
+#endif
+
if (parent_stub_for_initialization_) {
decoder_->SetParent(parent_stub_for_initialization_->decoder_.get(),
parent_texture_for_initialization_);