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

Unified Diff: third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from Kent; merge. Created 4 years, 6 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
Index: third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.cpp b/third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.cpp
index 84ad1b0c3adafd0a269af67b8322fde43aa7bbde..c79b1426f4b49cadaefb63f3bf0a43c258e99688 100644
--- a/third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.cpp
+++ b/third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.cpp
@@ -10,6 +10,8 @@
#include "platform/graphics/CompositorMutation.h"
#include "platform/graphics/CompositorMutationsTarget.h"
#include "platform/graphics/CompositorMutator.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -33,7 +35,7 @@ bool CompositorMutatorClient::Mutate(
TRACE_EVENT0("compositor-worker", "CompositorMutatorClient::Mutate");
double monotonicTimeNow = (monotonicTime - base::TimeTicks()).InSecondsF();
if (!m_mutations)
- m_mutations = adoptPtr(new CompositorMutations);
+ m_mutations = wrapUnique(new CompositorMutations);
bool shouldReinvoke = m_mutator->mutate(monotonicTimeNow);
return shouldReinvoke;
}
@@ -53,7 +55,7 @@ base::Closure CompositorMutatorClient::TakeMutations()
return base::Bind(&CompositorMutationsTarget::applyMutations,
base::Unretained(m_mutationsTarget),
- base::Owned(m_mutations.leakPtr()));
+ base::Owned(m_mutations.release()));
}
void CompositorMutatorClient::setNeedsMutate()
@@ -62,7 +64,7 @@ void CompositorMutatorClient::setNeedsMutate()
m_client->SetNeedsMutate();
}
-void CompositorMutatorClient::setMutationsForTesting(PassOwnPtr<CompositorMutations> mutations)
+void CompositorMutatorClient::setMutationsForTesting(std::unique_ptr<CompositorMutations> mutations)
{
m_mutations = std::move(mutations);
}

Powered by Google App Engine
This is Rietveld 408576698