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

Unified Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.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/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 090e79bfb45f8228a55f39f06322b97d51bc46c5..c88437b3286236ae10439425dfeb48339eae7bc6 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
@@ -32,9 +32,8 @@
#include "ui/gfx/skia_util.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
-#include "wtf/PtrUtil.h"
+#include "wtf/PassOwnPtr.h"
#include <algorithm>
-#include <memory>
#include <utility>
namespace blink {
@@ -69,7 +68,7 @@ PaintArtifactCompositor::PaintArtifactCompositor()
if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
return;
m_rootLayer = cc::Layer::Create();
- m_webLayer = wrapUnique(Platform::current()->compositorSupport()->createLayerFromCCLayer(m_rootLayer.get()));
+ m_webLayer = adoptPtr(Platform::current()->compositorSupport()->createLayerFromCCLayer(m_rootLayer.get()));
}
PaintArtifactCompositor::~PaintArtifactCompositor()
@@ -374,7 +373,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);
- std::unique_ptr<ContentLayerClientImpl> contentLayerClient = wrapUnique(
+ OwnPtr<ContentLayerClientImpl> contentLayerClient = adoptPtr(
new ContentLayerClientImpl(std::move(displayList), gfx::Rect(combinedBounds.size())));
layerOffset = combinedBounds.OffsetFromOrigin();

Powered by Google App Engine
This is Rietveld 408576698