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

Unified Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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/compositing/PaintArtifactCompositor.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
index c88437b3286236ae10439425dfeb48339eae7bc6..090e79bfb45f8228a55f39f06322b97d51bc46c5 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
@@ -32,8 +32,9 @@
#include "ui/gfx/skia_util.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
-#include "wtf/PassOwnPtr.h"
+#include "wtf/PtrUtil.h"
#include <algorithm>
+#include <memory>
#include <utility>
namespace blink {
@@ -68,7 +69,7 @@ PaintArtifactCompositor::PaintArtifactCompositor()
if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
return;
m_rootLayer = cc::Layer::Create();
- m_webLayer = adoptPtr(Platform::current()->compositorSupport()->createLayerFromCCLayer(m_rootLayer.get()));
+ m_webLayer = wrapUnique(Platform::current()->compositorSupport()->createLayerFromCCLayer(m_rootLayer.get()));
}
PaintArtifactCompositor::~PaintArtifactCompositor()
@@ -373,7 +374,7 @@ scoped_refptr<cc::Layer> PaintArtifactCompositor::layerForPaintChunk(const Paint
// The common case: create a layer for painted content.
gfx::Rect combinedBounds = enclosingIntRect(paintChunk.bounds);
scoped_refptr<cc::DisplayItemList> displayList = recordPaintChunk(paintArtifact, paintChunk, combinedBounds);
- OwnPtr<ContentLayerClientImpl> contentLayerClient = adoptPtr(
+ std::unique_ptr<ContentLayerClientImpl> contentLayerClient = wrapUnique(
new ContentLayerClientImpl(std::move(displayList), gfx::Rect(combinedBounds.size())));
layerOffset = combinedBounds.OffsetFromOrigin();

Powered by Google App Engine
This is Rietveld 408576698