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

Unified Diff: cc/video_layer_impl.h

Issue 11882037: Activate LayerImpl tree with sync+push instead of pointer swap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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
« no previous file with comments | « cc/video_frame_provider_client_impl.cc ('k') | cc/video_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/video_layer_impl.h
diff --git a/cc/video_layer_impl.h b/cc/video_layer_impl.h
index 0ea274da1e19d398251a212ecb30c3549355f86d..73d854a4282ae02f13489e2a1518882d71828e31 100644
--- a/cc/video_layer_impl.h
+++ b/cc/video_layer_impl.h
@@ -21,29 +21,26 @@ class SkCanvasVideoRenderer;
namespace cc {
class LayerTreeHostImpl;
+class VideoFrameProviderClientImpl;
-class CC_EXPORT VideoLayerImpl : public LayerImpl
- , public VideoFrameProvider::Client {
+class CC_EXPORT VideoLayerImpl : public LayerImpl {
public:
- static scoped_ptr<VideoLayerImpl> create(LayerTreeImpl* treeImpl, int id, VideoFrameProvider* provider)
- {
- return make_scoped_ptr(new VideoLayerImpl(treeImpl, id, provider));
- }
+ static scoped_ptr<VideoLayerImpl> create(LayerTreeImpl* treeImpl, int id, VideoFrameProvider* provider);
virtual ~VideoLayerImpl();
+ // LayerImpl implementation.
+ virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl*) OVERRIDE;
+ virtual void pushPropertiesTo(LayerImpl*) OVERRIDE;
virtual void willDraw(ResourceProvider*) OVERRIDE;
virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE;
virtual void didDraw(ResourceProvider*) OVERRIDE;
-
- // VideoFrameProvider::Client implementation.
- virtual void StopUsingProvider() OVERRIDE; // Callable on any thread.
- virtual void DidReceiveFrame() OVERRIDE; // Callable on impl thread.
- virtual void DidUpdateMatrix(const float*) OVERRIDE; // Callable on impl thread.
-
+ virtual void didBecomeActive() OVERRIDE;
virtual void didLoseOutputSurface() OVERRIDE;
void setNeedsRedraw();
+ void setProviderClientImpl(scoped_refptr<VideoFrameProviderClientImpl>);
+
struct FramePlane {
ResourceProvider::ResourceId resourceId;
gfx::Size size;
@@ -56,7 +53,7 @@ public:
};
private:
- VideoLayerImpl(LayerTreeImpl*, int, VideoFrameProvider*);
+ VideoLayerImpl(LayerTreeImpl*, int);
virtual const char* layerTypeAsString() const OVERRIDE;
@@ -67,11 +64,7 @@ private:
void freeUnusedPlaneData(ResourceProvider*);
size_t numPlanes() const;
- // Guards the destruction of m_provider and the frame that it provides
- base::Lock m_providerLock;
- VideoFrameProvider* m_provider;
-
- gfx::Transform m_streamTextureMatrix;
+ scoped_refptr<VideoFrameProviderClientImpl> m_providerClientImpl;
media::VideoFrame* m_frame;
GLenum m_format;
« no previous file with comments | « cc/video_frame_provider_client_impl.cc ('k') | cc/video_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698