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

Unified Diff: cc/output/texture_mailbox_deleter.cc

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/output/texture_mailbox_deleter.h ('k') | cc/quads/render_pass.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/texture_mailbox_deleter.cc
diff --git a/cc/output/texture_mailbox_deleter.cc b/cc/output/texture_mailbox_deleter.cc
index 642495fc063840b808d1cddc36616dcfa56b02b2..27154c7394e0476a679c95b5881d4746b87f8971 100644
--- a/cc/output/texture_mailbox_deleter.cc
+++ b/cc/output/texture_mailbox_deleter.cc
@@ -63,8 +63,7 @@ scoped_ptr<SingleReleaseCallback> TextureMailboxDeleter::GetReleaseCallback(
// class is alive. So we guard it with a WeakPtr.
ReleaseCallback run_impl_callback(
base::Bind(&TextureMailboxDeleter::RunDeleteTextureOnImplThread,
- weak_ptr_factory_.GetWeakPtr(),
- impl_callbacks_.back()));
+ weak_ptr_factory_.GetWeakPtr(), impl_callbacks_.back().get()));
// Provide a callback for the main thread that posts back to the impl
// thread.
@@ -84,9 +83,9 @@ void TextureMailboxDeleter::RunDeleteTextureOnImplThread(
const gpu::SyncToken& sync_token,
bool is_lost) {
for (size_t i = 0; i < impl_callbacks_.size(); ++i) {
- if (impl_callbacks_.at(i) == impl_callback) {
+ if (impl_callbacks_[i].get() == impl_callback) {
// Run the callback, then destroy it here on the impl thread.
- impl_callbacks_.at(i)->Run(sync_token, is_lost);
+ impl_callbacks_[i]->Run(sync_token, is_lost);
impl_callbacks_.erase(impl_callbacks_.begin() + i);
return;
}
« no previous file with comments | « cc/output/texture_mailbox_deleter.h ('k') | cc/quads/render_pass.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698