summaryrefslogtreecommitdiffstats
path: root/cc/layers/video_layer.cc
diff options
context:
space:
mode:
authorenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-02 00:36:33 +0000
committerenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-02 00:36:33 +0000
commit41084bf399c66d9a29abc7f8f14f6cef1148e57d (patch)
tree9b9a4699bc4585e93790915d1b4a5f24e60c306e /cc/layers/video_layer.cc
parent349bce9fe93f3b69fd86f74163a2d9d99ac360ed (diff)
downloadchromium_src-41084bf399c66d9a29abc7f8f14f6cef1148e57d.zip
chromium_src-41084bf399c66d9a29abc7f8f14f6cef1148e57d.tar.gz
chromium_src-41084bf399c66d9a29abc7f8f14f6cef1148e57d.tar.bz2
cc: Fix accelerated video freezing with commit aborts
Although VideoLayer doesn't update any resources, it needs to not let commits abort when it has been invalidated as this is currently the mechanism on desktop to tell the compositor to redraw it with a new frame. R=danakj@chromium.org BUG=266350 Review URL: https://chromiumcodereview.appspot.com/21567003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215169 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/video_layer.cc')
-rw-r--r--cc/layers/video_layer.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/cc/layers/video_layer.cc b/cc/layers/video_layer.cc
index 5066835..6cba239 100644
--- a/cc/layers/video_layer.cc
+++ b/cc/layers/video_layer.cc
@@ -22,4 +22,14 @@ scoped_ptr<LayerImpl> VideoLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
return VideoLayerImpl::Create(tree_impl, id(), provider_).PassAs<LayerImpl>();
}
+bool VideoLayer::Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker* occlusion) {
+ // Video layer doesn't update any resources from the main thread side,
+ // but repaint rects need to be sent to the VideoLayerImpl via commit.
+ //
+ // This is the inefficient legacy redraw path for videos. It's better to
+ // communicate this directly to the VideoLayerImpl.
+ return !update_rect_.IsEmpty();
+}
+
} // namespace cc