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

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

Issue 1039783002: cc: Use const ref to avoid extra ref count of VideoProviderClientImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « cc/layers/video_layer_impl.h ('k') | no next file » | 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 25 matching lines...) Expand all
36 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl = 36 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl =
37 VideoFrameProviderClientImpl::Create(provider); 37 VideoFrameProviderClientImpl::Create(provider);
38 38
39 return make_scoped_ptr( 39 return make_scoped_ptr(
40 new VideoLayerImpl(tree_impl, id, provider_client_impl, video_rotation)); 40 new VideoLayerImpl(tree_impl, id, provider_client_impl, video_rotation));
41 } 41 }
42 42
43 VideoLayerImpl::VideoLayerImpl( 43 VideoLayerImpl::VideoLayerImpl(
44 LayerTreeImpl* tree_impl, 44 LayerTreeImpl* tree_impl,
45 int id, 45 int id,
46 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl, 46 const scoped_refptr<VideoFrameProviderClientImpl>& provider_client_impl,
47 media::VideoRotation video_rotation) 47 media::VideoRotation video_rotation)
48 : LayerImpl(tree_impl, id), 48 : LayerImpl(tree_impl, id),
49 provider_client_impl_(provider_client_impl), 49 provider_client_impl_(provider_client_impl),
50 frame_(nullptr), 50 frame_(nullptr),
51 video_rotation_(video_rotation) { 51 video_rotation_(video_rotation) {
52 } 52 }
53 53
54 VideoLayerImpl::~VideoLayerImpl() { 54 VideoLayerImpl::~VideoLayerImpl() {
55 if (!provider_client_impl_->Stopped()) { 55 if (!provider_client_impl_->Stopped()) {
56 // In impl side painting, we may have a pending and active layer 56 // In impl side painting, we may have a pending and active layer
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 void VideoLayerImpl::SetNeedsRedraw() { 370 void VideoLayerImpl::SetNeedsRedraw() {
371 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); 371 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds())));
372 layer_tree_impl()->SetNeedsRedraw(); 372 layer_tree_impl()->SetNeedsRedraw();
373 } 373 }
374 374
375 const char* VideoLayerImpl::LayerTypeAsString() const { 375 const char* VideoLayerImpl::LayerTypeAsString() const {
376 return "cc::VideoLayerImpl"; 376 return "cc::VideoLayerImpl";
377 } 377 }
378 378
379 } // namespace cc 379 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698