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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 8c47f77d05a251c4d9672b3ac8c0578f4840f96b..b3d04d81d9e7cb1bb941976c90c27ccaa002fb22 100644
--- a/third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.cpp
+++ b/third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.cpp
@@ -12,8 +12,6 @@
#include "platform/graphics/CompositorMutation.h"
#include "platform/graphics/CompositorMutationsTarget.h"
#include "platform/graphics/CompositorMutator.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
namespace blink {
@@ -38,7 +36,7 @@ bool CompositorMutatorClient::Mutate(
TRACE_EVENT0("compositor-worker", "CompositorMutatorClient::Mutate");
double monotonicTimeNow = (monotonicTime - base::TimeTicks()).InSecondsF();
if (!m_mutations)
- m_mutations = wrapUnique(new CompositorMutations);
+ m_mutations = adoptPtr(new CompositorMutations);
CompositorMutableStateProvider compositorState(treeImpl, m_mutations.get());
bool shouldReinvoke = m_mutator->mutate(monotonicTimeNow, &compositorState);
return shouldReinvoke;
@@ -59,7 +57,7 @@ base::Closure CompositorMutatorClient::TakeMutations()
return base::Bind(&CompositorMutationsTarget::applyMutations,
base::Unretained(m_mutationsTarget),
- base::Owned(m_mutations.release()));
+ base::Owned(m_mutations.leakPtr()));
}
void CompositorMutatorClient::setNeedsMutate()
@@ -68,7 +66,7 @@ void CompositorMutatorClient::setNeedsMutate()
m_client->SetNeedsMutate();
}
-void CompositorMutatorClient::setMutationsForTesting(std::unique_ptr<CompositorMutations> mutations)
+void CompositorMutatorClient::setMutationsForTesting(PassOwnPtr<CompositorMutations> mutations)
{
m_mutations = std::move(mutations);
}

Powered by Google App Engine
This is Rietveld 408576698