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

Unified Diff: cc/layers/painted_scrollbar_layer.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, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/nine_patch_layer_impl.cc ('k') | cc/layers/painted_scrollbar_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/painted_scrollbar_layer.cc
diff --git a/cc/layers/painted_scrollbar_layer.cc b/cc/layers/painted_scrollbar_layer.cc
index 65fb78d373bba77174dd9c5087b73396e34629be..83c12e8650950cb7448415eac3724b5a4cf90e66 100644
--- a/cc/layers/painted_scrollbar_layer.cc
+++ b/cc/layers/painted_scrollbar_layer.cc
@@ -23,7 +23,7 @@ namespace cc {
scoped_ptr<LayerImpl> PaintedScrollbarLayer::CreateLayerImpl(
LayerTreeImpl* tree_impl) {
return PaintedScrollbarLayerImpl::Create(
- tree_impl, id(), scrollbar_->Orientation()).PassAs<LayerImpl>();
+ tree_impl, id(), scrollbar_->Orientation());
}
scoped_refptr<PaintedScrollbarLayer> PaintedScrollbarLayer::Create(
@@ -156,8 +156,8 @@ void PaintedScrollbarLayer::SetLayerTreeHost(LayerTreeHost* host) {
// When the LTH is set to null or has changed, then this layer should remove
// all of its associated resources.
if (!host || host != layer_tree_host()) {
- track_resource_.reset();
- thumb_resource_.reset();
+ track_resource_ = nullptr;
+ thumb_resource_ = nullptr;
}
ContentsScalingLayer::SetLayerTreeHost(host);
@@ -214,9 +214,8 @@ bool PaintedScrollbarLayer::Update(ResourceUpdateQueue* queue,
if (track_rect_.IsEmpty() || scaled_track_rect.IsEmpty()) {
if (track_resource_) {
- track_resource_.reset();
- if (thumb_resource_)
- thumb_resource_.reset();
+ track_resource_ = nullptr;
+ thumb_resource_ = nullptr;
SetNeedsPushProperties();
updated = true;
}
@@ -224,7 +223,7 @@ bool PaintedScrollbarLayer::Update(ResourceUpdateQueue* queue,
}
if (!has_thumb_ && thumb_resource_) {
- thumb_resource_.reset();
+ thumb_resource_ = nullptr;
SetNeedsPushProperties();
}
« no previous file with comments | « cc/layers/nine_patch_layer_impl.cc ('k') | cc/layers/painted_scrollbar_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698