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

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

Issue 12965007: Fix cpplint errors in cc/(animation|input|layers|trees|test)/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/video_frame_provider.h ('k') | cc/output/delegating_renderer_unittest.cc » ('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/logging.h" 7 #include "base/logging.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 #include "cc/layers/quad_sink.h" 9 #include "cc/layers/quad_sink.h"
10 #include "cc/layers/video_frame_provider_client_impl.h" 10 #include "cc/layers/video_frame_provider_client_impl.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 gfx::Vector2d()); 445 gfx::Vector2d());
446 } 446 }
447 return true; 447 return true;
448 } 448 }
449 449
450 void VideoLayerImpl::FreeFramePlanes(ResourceProvider* resource_provider) { 450 void VideoLayerImpl::FreeFramePlanes(ResourceProvider* resource_provider) {
451 for (size_t i = 0; i < media::VideoFrame::kMaxPlanes; ++i) 451 for (size_t i = 0; i < media::VideoFrame::kMaxPlanes; ++i)
452 frame_planes_[i].FreeData(resource_provider); 452 frame_planes_[i].FreeData(resource_provider);
453 } 453 }
454 454
455 void VideoLayerImpl::FreeUnusedFramePlanes(ResourceProvider* resource_provider) { 455 void VideoLayerImpl::FreeUnusedFramePlanes(
456 ResourceProvider* resource_provider) {
456 size_t first_unused_plane = (frame_ ? media::VideoFrame::NumPlanes(format_) 457 size_t first_unused_plane = (frame_ ? media::VideoFrame::NumPlanes(format_)
457 : 0); 458 : 0);
458 for (size_t i = first_unused_plane; i < media::VideoFrame::kMaxPlanes; ++i) 459 for (size_t i = first_unused_plane; i < media::VideoFrame::kMaxPlanes; ++i)
459 frame_planes_[i].FreeData(resource_provider); 460 frame_planes_[i].FreeData(resource_provider);
460 } 461 }
461 462
462 void VideoLayerImpl::DidLoseOutputSurface() { 463 void VideoLayerImpl::DidLoseOutputSurface() {
463 FreeFramePlanes(layer_tree_impl()->resource_provider()); 464 FreeFramePlanes(layer_tree_impl()->resource_provider());
464 } 465 }
465 466
466 void VideoLayerImpl::SetNeedsRedraw() { 467 void VideoLayerImpl::SetNeedsRedraw() {
467 layer_tree_impl()->SetNeedsRedraw(); 468 layer_tree_impl()->SetNeedsRedraw();
468 } 469 }
469 470
470 void VideoLayerImpl::SetProviderClientImpl( 471 void VideoLayerImpl::SetProviderClientImpl(
471 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) { 472 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) {
472 provider_client_impl_ = provider_client_impl; 473 provider_client_impl_ = provider_client_impl;
473 } 474 }
474 475
475 const char* VideoLayerImpl::LayerTypeAsString() const { 476 const char* VideoLayerImpl::LayerTypeAsString() const {
476 return "VideoLayer"; 477 return "VideoLayer";
477 } 478 }
478 479
479 } // namespace cc 480 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_frame_provider.h ('k') | cc/output/delegating_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698