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

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

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 2 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/picture_layer.cc ('k') | cc/layers/picture_layer_impl_perftest.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 PictureLayerImpl::~PictureLayerImpl() { 82 PictureLayerImpl::~PictureLayerImpl() {
83 layer_tree_impl()->UnregisterPictureLayerImpl(this); 83 layer_tree_impl()->UnregisterPictureLayerImpl(this);
84 } 84 }
85 85
86 const char* PictureLayerImpl::LayerTypeAsString() const { 86 const char* PictureLayerImpl::LayerTypeAsString() const {
87 return "cc::PictureLayerImpl"; 87 return "cc::PictureLayerImpl";
88 } 88 }
89 89
90 scoped_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl( 90 scoped_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl(
91 LayerTreeImpl* tree_impl) { 91 LayerTreeImpl* tree_impl) {
92 return PictureLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>(); 92 return PictureLayerImpl::Create(tree_impl, id());
93 } 93 }
94 94
95 void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) { 95 void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
96 // It's possible this layer was never drawn or updated (e.g. because it was 96 // It's possible this layer was never drawn or updated (e.g. because it was
97 // a descendant of an opacity 0 layer). 97 // a descendant of an opacity 0 layer).
98 DoPostCommitInitializationIfNeeded(); 98 DoPostCommitInitializationIfNeeded();
99 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); 99 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
100 100
101 // We have already synced the important bits from the the active layer, and 101 // We have already synced the important bits from the the active layer, and
102 // we will soon swap out its tilings and use them for recycling. However, 102 // we will soon swap out its tilings and use them for recycling. However,
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); 1787 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange();
1788 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; 1788 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start;
1789 return tiling_range.end - 1 - current_tiling_range_offset; 1789 return tiling_range.end - 1 - current_tiling_range_offset;
1790 } 1790 }
1791 } 1791 }
1792 NOTREACHED(); 1792 NOTREACHED();
1793 return 0; 1793 return 0;
1794 } 1794 }
1795 1795
1796 } // namespace cc 1796 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/layers/picture_layer_impl_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698