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

Unified Diff: third_party/WebKit/Source/platform/testing/TestPaintArtifact.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/testing/TestPaintArtifact.cpp
diff --git a/third_party/WebKit/Source/platform/testing/TestPaintArtifact.cpp b/third_party/WebKit/Source/platform/testing/TestPaintArtifact.cpp
index a805e0194c8e97971b3475b6080b82e65f6bdecb..07878a947bcb003170a01f518ee8226c57f40e7b 100644
--- a/third_party/WebKit/Source/platform/testing/TestPaintArtifact.cpp
+++ b/third_party/WebKit/Source/platform/testing/TestPaintArtifact.cpp
@@ -14,6 +14,8 @@
#include "third_party/skia/include/core/SkPicture.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
#include "wtf/Assertions.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -74,7 +76,7 @@ TestPaintArtifact& TestPaintArtifact::chunk(const PaintChunkProperties& properti
TestPaintArtifact& TestPaintArtifact::rectDrawing(const FloatRect& bounds, Color color)
{
- OwnPtr<DummyRectClient> client = adoptPtr(new DummyRectClient(bounds, color));
+ std::unique_ptr<DummyRectClient> client = wrapUnique(new DummyRectClient(bounds, color));
m_displayItemList.allocateAndConstruct<DrawingDisplayItem>(
*client, DisplayItem::DrawingFirst, client->makePicture());
m_dummyClients.append(std::move(client));
@@ -84,7 +86,7 @@ TestPaintArtifact& TestPaintArtifact::rectDrawing(const FloatRect& bounds, Color
TestPaintArtifact& TestPaintArtifact::foreignLayer(const FloatPoint& location, const IntSize& size, scoped_refptr<cc::Layer> layer)
{
FloatRect floatBounds(location, FloatSize(size));
- OwnPtr<DummyRectClient> client = adoptPtr(new DummyRectClient(floatBounds, Color::transparent));
+ std::unique_ptr<DummyRectClient> client = wrapUnique(new DummyRectClient(floatBounds, Color::transparent));
m_displayItemList.allocateAndConstruct<ForeignLayerDisplayItem>(
*client, DisplayItem::ForeignLayerFirst, std::move(layer), location, size);
m_dummyClients.append(std::move(client));

Powered by Google App Engine
This is Rietveld 408576698