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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.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) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 m_context->skColorSpace(), m_context->colorType())); 935 m_context->skColorSpace(), m_context->colorType()));
936 if (surface->isValid()) { 936 if (surface->isValid()) {
937 CanvasMetrics::countCanvasContextUsage( 937 CanvasMetrics::countCanvasContextUsage(
938 CanvasMetrics::DisplayList2DCanvasImageBufferCreated); 938 CanvasMetrics::DisplayList2DCanvasImageBufferCreated);
939 return std::move(surface); 939 return std::move(surface);
940 } 940 }
941 // We fallback to a non-display-list surface without recording a metric 941 // We fallback to a non-display-list surface without recording a metric
942 // here. 942 // here.
943 } 943 }
944 944
945 auto surfaceFactory = wrapUnique(new UnacceleratedSurfaceFactory()); 945 auto surfaceFactory = makeUnique<UnacceleratedSurfaceFactory>();
946 auto surface = surfaceFactory->createSurface(deviceSize, opacityMode, 946 auto surface = surfaceFactory->createSurface(deviceSize, opacityMode,
947 m_context->skColorSpace(), 947 m_context->skColorSpace(),
948 m_context->colorType()); 948 m_context->colorType());
949 if (surface->isValid()) { 949 if (surface->isValid()) {
950 CanvasMetrics::countCanvasContextUsage( 950 CanvasMetrics::countCanvasContextUsage(
951 CanvasMetrics::Unaccelerated2DCanvasImageBufferCreated); 951 CanvasMetrics::Unaccelerated2DCanvasImageBufferCreated);
952 return surface; 952 return surface;
953 } 953 }
954 954
955 CanvasMetrics::countCanvasContextUsage( 955 CanvasMetrics::countCanvasContextUsage(
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 mojom::blink::OffscreenCanvasSurfacePtr service; 1357 mojom::blink::OffscreenCanvasSurfacePtr service;
1358 Platform::current()->interfaceProvider()->getInterface( 1358 Platform::current()->interfaceProvider()->getInterface(
1359 mojo::GetProxy(&service)); 1359 mojo::GetProxy(&service));
1360 m_surfaceLayerBridge = 1360 m_surfaceLayerBridge =
1361 wrapUnique(new CanvasSurfaceLayerBridge(std::move(service))); 1361 wrapUnique(new CanvasSurfaceLayerBridge(std::move(service)));
1362 return m_surfaceLayerBridge->createSurfaceLayer(this->width(), 1362 return m_surfaceLayerBridge->createSurfaceLayer(this->width(),
1363 this->height()); 1363 this->height());
1364 } 1364 }
1365 1365
1366 } // namespace blink 1366 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLAreaElement.cpp ('k') | third_party/WebKit/Source/core/html/parser/AtomicHTMLToken.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698