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

Unified Diff: cc/layers/texture_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/surface_layer_impl.cc ('k') | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/texture_layer.cc
diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc
index 3bccc7eada63af84e219946b0e2ad64f0b9e0307..d8634ea1f136a7cbdf2bc38b4fc4b5088d2be47a 100644
--- a/cc/layers/texture_layer.cc
+++ b/cc/layers/texture_layer.cc
@@ -55,7 +55,7 @@ void TextureLayer::ClearTexture() {
}
scoped_ptr<LayerImpl> TextureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
- return TextureLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
+ return TextureLayerImpl::Create(tree_impl, id());
}
void TextureLayer::SetFlipped(bool flipped) {
@@ -130,7 +130,7 @@ void TextureLayer::SetTextureMailboxInternal(
holder_ref_ =
TextureMailboxHolder::Create(mailbox, release_callback.Pass());
} else {
- holder_ref_.reset();
+ holder_ref_ = nullptr;
}
needs_set_mailbox_ = true;
// If we are within a commit, no need to do it again immediately after.
@@ -296,7 +296,7 @@ scoped_ptr<TextureLayer::TextureMailboxHolder::MainThreadReference>
TextureLayer::TextureMailboxHolder::Create(
const TextureMailbox& mailbox,
scoped_ptr<SingleReleaseCallback> release_callback) {
- return scoped_ptr<MainThreadReference>(new MainThreadReference(
+ return make_scoped_ptr(new MainThreadReference(
new TextureMailboxHolder(mailbox, release_callback.Pass())));
}
@@ -326,7 +326,7 @@ void TextureLayer::TextureMailboxHolder::InternalRelease() {
if (!--internal_references_) {
release_callback_->Run(sync_point_, is_lost_);
mailbox_ = TextureMailbox();
- release_callback_.reset();
+ release_callback_ = nullptr;
}
}
« no previous file with comments | « cc/layers/surface_layer_impl.cc ('k') | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698