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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.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 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 m_contentsLayer(0), 109 m_contentsLayer(0),
110 m_contentsLayerId(0), 110 m_contentsLayerId(0),
111 m_scrollableArea(nullptr), 111 m_scrollableArea(nullptr),
112 m_renderingContext3d(0), 112 m_renderingContext3d(0),
113 m_hasPreferredRasterBounds(false) { 113 m_hasPreferredRasterBounds(false) {
114 #if ENABLE(ASSERT) 114 #if ENABLE(ASSERT)
115 if (m_client) 115 if (m_client)
116 m_client->verifyNotPainting(); 116 m_client->verifyNotPainting();
117 #endif 117 #endif
118 118
119 m_contentLayerDelegate = wrapUnique(new ContentLayerDelegate(this)); 119 m_contentLayerDelegate = makeUnique<ContentLayerDelegate>(this);
120 m_layer = Platform::current()->compositorSupport()->createContentLayer( 120 m_layer = Platform::current()->compositorSupport()->createContentLayer(
121 m_contentLayerDelegate.get()); 121 m_contentLayerDelegate.get());
122 m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible); 122 m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible);
123 m_layer->layer()->setLayerClient(this); 123 m_layer->layer()->setLayerClient(this);
124 } 124 }
125 125
126 GraphicsLayer::~GraphicsLayer() { 126 GraphicsLayer::~GraphicsLayer() {
127 for (size_t i = 0; i < m_linkHighlights.size(); ++i) 127 for (size_t i = 0; i < m_linkHighlights.size(); ++i)
128 m_linkHighlights[i]->clearCurrentGraphicsLayer(); 128 m_linkHighlights[i]->clearCurrentGraphicsLayer();
129 m_linkHighlights.clear(); 129 m_linkHighlights.clear();
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { 1308 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) {
1309 if (!layer) { 1309 if (!layer) {
1310 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); 1310 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n");
1311 return; 1311 return;
1312 } 1312 }
1313 1313
1314 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1314 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1315 fprintf(stderr, "%s\n", output.utf8().data()); 1315 fprintf(stderr, "%s\n", output.utf8().data());
1316 } 1316 }
1317 #endif 1317 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698