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

Unified Diff: cc/layers/video_layer_impl.h

Issue 1033563002: cc: Various code safety improvements in video compositing code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 9 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: cc/layers/video_layer_impl.h
diff --git a/cc/layers/video_layer_impl.h b/cc/layers/video_layer_impl.h
index d05bd5768e62f57c6d2773880397df7c671ef68b..5e99923b1278f4bd61507cc663fca2459253d16a 100644
--- a/cc/layers/video_layer_impl.h
+++ b/cc/layers/video_layer_impl.h
@@ -23,6 +23,8 @@ class VideoFrameProviderClientImpl;
class CC_EXPORT VideoLayerImpl : public LayerImpl {
public:
+ // Must be called on the impl thread while the main thread is blocked. This is
+ // so that |provider| stays alive while this is being created.
static scoped_ptr<VideoLayerImpl> Create(LayerTreeImpl* tree_impl,
int id,
VideoFrameProvider* provider,
@@ -31,7 +33,6 @@ class CC_EXPORT VideoLayerImpl : public LayerImpl {
// LayerImpl implementation.
scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
- void PushPropertiesTo(LayerImpl* layer) override;
bool WillDraw(DrawMode draw_mode,
ResourceProvider* resource_provider) override;
void AppendQuads(RenderPass* render_pass,
@@ -41,16 +42,14 @@ class CC_EXPORT VideoLayerImpl : public LayerImpl {
void ReleaseResources() override;
void SetNeedsRedraw();
-
- void SetProviderClientImpl(
- scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl);
-
media::VideoRotation video_rotation() const { return video_rotation_; }
private:
- VideoLayerImpl(LayerTreeImpl* tree_impl,
- int id,
- media::VideoRotation video_rotation);
+ VideoLayerImpl(
+ LayerTreeImpl* tree_impl,
+ int id,
+ scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl,
+ media::VideoRotation video_rotation);
const char* LayerTypeAsString() const override;

Powered by Google App Engine
This is Rietveld 408576698