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

Unified Diff: content/renderer/media/android/stream_texture_factory_android_synchronous_impl.h

Issue 23234003: Support stream textures with the synchronous compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android clang Created 7 years, 4 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_android_synchronous_impl.h
diff --git a/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.h b/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.h
index 52fc65a885ab665a668a14986b2771ed8c65aea5..50f9e8024368d06900a699b9ae98a758a9f934af 100644
--- a/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.h
+++ b/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.h
@@ -5,14 +5,36 @@
#ifndef CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_ANDROID_SYNCHRONOUS_IMPL_H_
#define CONTENT_RENDERER_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_ANDROID_SYNCHRONOUS_IMPL_H_
+#include "base/memory/ref_counted.h"
#include "content/renderer/media/android/stream_texture_factory_android.h"
+namespace gfx {
+class SurfaceTextureBridge;
+}
+
+namespace WebKit {
+class WebGraphicsContext3D;
+}
+
namespace content {
// Factory for when using synchronous compositor in Android WebView.
class StreamTextureFactorySynchronousImpl : public StreamTextureFactory {
public:
- StreamTextureFactorySynchronousImpl();
+ class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> {
+ public:
+ virtual scoped_refptr<gfx::SurfaceTextureBridge> GetSurfaceTexture(
+ uint32 stream_id) = 0;
+
+ virtual WebKit::WebGraphicsContext3D* Context3d() = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<ContextProvider>;
+ virtual ~ContextProvider() {}
+ };
+
+ StreamTextureFactorySynchronousImpl(ContextProvider* context_provider,
+ int view_id);
virtual ~StreamTextureFactorySynchronousImpl();
virtual StreamTextureProxy* CreateProxy() OVERRIDE;
@@ -23,10 +45,13 @@ class StreamTextureFactorySynchronousImpl : public StreamTextureFactory {
gpu::Mailbox* texture_mailbox,
unsigned* texture_mailbox_sync_point) OVERRIDE;
virtual void DestroyStreamTexture(unsigned texture_id) OVERRIDE;
- virtual void SetStreamTextureSize(int32 texture_id,
+ virtual void SetStreamTextureSize(int32 stream_id,
const gfx::Size& size) OVERRIDE;
private:
+ scoped_refptr<ContextProvider> context_provider_;
+ int view_id_;
+
DISALLOW_COPY_AND_ASSIGN(StreamTextureFactorySynchronousImpl);
};

Powered by Google App Engine
This is Rietveld 408576698