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

Unified Diff: cc/layers/ui_resource_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/tiled_layer_unittest.cc ('k') | cc/layers/ui_resource_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/ui_resource_layer.cc
diff --git a/cc/layers/ui_resource_layer.cc b/cc/layers/ui_resource_layer.cc
index 59fbe8307b2097186e9dd97dfee238fcedcfb7cc..498ba335bae49cf99004fd616cd13fe4f9c5deb6 100644
--- a/cc/layers/ui_resource_layer.cc
+++ b/cc/layers/ui_resource_layer.cc
@@ -69,7 +69,7 @@ UIResourceLayer::~UIResourceLayer() {}
scoped_ptr<LayerImpl> UIResourceLayer::CreateLayerImpl(
LayerTreeImpl* tree_impl) {
- return UIResourceLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
+ return UIResourceLayerImpl::Create(tree_impl, id());
}
void UIResourceLayer::SetUV(const gfx::PointF& top_left,
@@ -112,7 +112,7 @@ void UIResourceLayer::SetLayerTreeHost(LayerTreeHost* host) {
}
void UIResourceLayer::RecreateUIResourceHolder() {
- ui_resource_holder_.reset();
+ ui_resource_holder_ = nullptr;
if (layer_tree_host() && !bitmap_.empty()) {
ui_resource_holder_ =
ScopedUIResourceHolder::Create(layer_tree_host(), bitmap_);
@@ -131,11 +131,10 @@ void UIResourceLayer::SetUIResourceId(UIResourceId resource_id) {
if (ui_resource_holder_ && ui_resource_holder_->id() == resource_id)
return;
- if (resource_id) {
+ if (resource_id)
ui_resource_holder_ = SharedUIResourceHolder::Create(resource_id);
- } else {
- ui_resource_holder_.reset();
- }
+ else
+ ui_resource_holder_ = nullptr;
UpdateDrawsContent(HasDrawableContent());
SetNeedsCommit();
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/layers/ui_resource_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698