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

Side by Side Diff: third_party/WebKit/Source/platform/testing/TestPaintArtifact.cpp

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/testing/TestPaintArtifact.h" 5 #include "platform/testing/TestPaintArtifact.h"
6 6
7 #include "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "platform/graphics/paint/DisplayItemClient.h" 8 #include "platform/graphics/paint/DisplayItemClient.h"
9 #include "platform/graphics/paint/DrawingDisplayItem.h" 9 #include "platform/graphics/paint/DrawingDisplayItem.h"
10 #include "platform/graphics/paint/ForeignLayerDisplayItem.h" 10 #include "platform/graphics/paint/ForeignLayerDisplayItem.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 PaintChunk chunk; 67 PaintChunk chunk;
68 chunk.beginIndex = m_displayItemList.size(); 68 chunk.beginIndex = m_displayItemList.size();
69 chunk.properties = properties; 69 chunk.properties = properties;
70 m_paintChunks.append(chunk); 70 m_paintChunks.append(chunk);
71 return *this; 71 return *this;
72 } 72 }
73 73
74 TestPaintArtifact& TestPaintArtifact::rectDrawing(const FloatRect& bounds, 74 TestPaintArtifact& TestPaintArtifact::rectDrawing(const FloatRect& bounds,
75 Color color) { 75 Color color) {
76 std::unique_ptr<DummyRectClient> client = 76 std::unique_ptr<DummyRectClient> client =
77 wrapUnique(new DummyRectClient(bounds, color)); 77 makeUnique<DummyRectClient>(bounds, color);
78 m_displayItemList.allocateAndConstruct<DrawingDisplayItem>( 78 m_displayItemList.allocateAndConstruct<DrawingDisplayItem>(
79 *client, DisplayItem::kDrawingFirst, client->makePicture()); 79 *client, DisplayItem::kDrawingFirst, client->makePicture());
80 m_dummyClients.append(std::move(client)); 80 m_dummyClients.append(std::move(client));
81 return *this; 81 return *this;
82 } 82 }
83 83
84 TestPaintArtifact& TestPaintArtifact::foreignLayer( 84 TestPaintArtifact& TestPaintArtifact::foreignLayer(
85 const FloatPoint& location, 85 const FloatPoint& location,
86 const IntSize& size, 86 const IntSize& size,
87 scoped_refptr<cc::Layer> layer) { 87 scoped_refptr<cc::Layer> layer) {
(...skipping 13 matching lines...) Expand all
101 101
102 if (!m_paintChunks.isEmpty()) 102 if (!m_paintChunks.isEmpty())
103 m_paintChunks.last().endIndex = m_displayItemList.size(); 103 m_paintChunks.last().endIndex = m_displayItemList.size();
104 m_paintArtifact = PaintArtifact(std::move(m_displayItemList), 104 m_paintArtifact = PaintArtifact(std::move(m_displayItemList),
105 std::move(m_paintChunks), true); 105 std::move(m_paintChunks), true);
106 m_built = true; 106 m_built = true;
107 return m_paintArtifact; 107 return m_paintArtifact;
108 } 108 }
109 109
110 } // namespace blink 110 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698