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

Side by Side Diff: cc/layers/video_layer_impl.cc

Issue 1039533002: cc: Add support for sending BeginFrames for video. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@misc_video_refactoring
Patch Set: Fix comment. Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « cc/layers/video_frame_provider_client_impl.cc ('k') | cc/scheduler/scheduler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/video_layer_impl.h" 5 #include "cc/layers/video_layer_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/layers/video_frame_provider_client_impl.h" 9 #include "cc/layers/video_frame_provider_client_impl.h"
10 #include "cc/quads/io_surface_draw_quad.h" 10 #include "cc/quads/io_surface_draw_quad.h"
(...skipping 16 matching lines...) Expand all
27 // static 27 // static
28 scoped_ptr<VideoLayerImpl> VideoLayerImpl::Create( 28 scoped_ptr<VideoLayerImpl> VideoLayerImpl::Create(
29 LayerTreeImpl* tree_impl, 29 LayerTreeImpl* tree_impl,
30 int id, 30 int id,
31 VideoFrameProvider* provider, 31 VideoFrameProvider* provider,
32 media::VideoRotation video_rotation) { 32 media::VideoRotation video_rotation) {
33 DCHECK(tree_impl->proxy()->IsMainThreadBlocked()); 33 DCHECK(tree_impl->proxy()->IsMainThreadBlocked());
34 DCHECK(tree_impl->proxy()->IsImplThread()); 34 DCHECK(tree_impl->proxy()->IsImplThread());
35 35
36 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl = 36 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl =
37 VideoFrameProviderClientImpl::Create(provider); 37 VideoFrameProviderClientImpl::Create(
38 provider, tree_impl->GetVideoFrameControllerClient());
38 39
39 return make_scoped_ptr( 40 return make_scoped_ptr(
40 new VideoLayerImpl(tree_impl, id, provider_client_impl, video_rotation)); 41 new VideoLayerImpl(tree_impl, id, provider_client_impl, video_rotation));
41 } 42 }
42 43
43 VideoLayerImpl::VideoLayerImpl( 44 VideoLayerImpl::VideoLayerImpl(
44 LayerTreeImpl* tree_impl, 45 LayerTreeImpl* tree_impl,
45 int id, 46 int id,
46 const scoped_refptr<VideoFrameProviderClientImpl>& provider_client_impl, 47 const scoped_refptr<VideoFrameProviderClientImpl>& provider_client_impl,
47 media::VideoRotation video_rotation) 48 media::VideoRotation video_rotation)
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 void VideoLayerImpl::SetNeedsRedraw() { 394 void VideoLayerImpl::SetNeedsRedraw() {
394 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); 395 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds())));
395 layer_tree_impl()->SetNeedsRedraw(); 396 layer_tree_impl()->SetNeedsRedraw();
396 } 397 }
397 398
398 const char* VideoLayerImpl::LayerTypeAsString() const { 399 const char* VideoLayerImpl::LayerTypeAsString() const {
399 return "cc::VideoLayerImpl"; 400 return "cc::VideoLayerImpl";
400 } 401 }
401 402
402 } // namespace cc 403 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_frame_provider_client_impl.cc ('k') | cc/scheduler/scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698