aboutsummaryrefslogtreecommitdiff
path: root/bench/DDLRecorderBench.cpp
diff options
context:
space:
mode:
authorJohn Stiles <johnstiles@google.com>2020-08-03 13:21:46 -0400
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2020-08-03 17:53:52 +0000
commitfbd050bd0b58fa701fe3458927d9f3639d27ee71 (patch)
treec64c96c00fda25cec09c6cef604514ca21324d5d /bench/DDLRecorderBench.cpp
parent1788380a97ac44278a38ac9c474c74887abe085b (diff)
downloadskia-fbd050bd0b58fa701fe3458927d9f3639d27ee71.tar.gz
Enable ClangTidy check modernize-make-unique.
The majority of existing call sites were automatically updated using clang-tidy -fix. A small handful required a manual update, e.g. CppCodeGen. This check is a bit lenient, and in particular will not flag cases like `std::unique_ptr<Base>(new Derived())` which is still pretty common throughout our codebase. This CL does not attempt to replace all the cases that ClangTidy does not flag. Change-Id: I5eba48ef880e25d22de80f321a68c389ba769e36 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307459 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'bench/DDLRecorderBench.cpp')
-rw-r--r--bench/DDLRecorderBench.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/bench/DDLRecorderBench.cpp b/bench/DDLRecorderBench.cpp
index 20e4d417e9..cf342b84f9 100644
--- a/bench/DDLRecorderBench.cpp
+++ b/bench/DDLRecorderBench.cpp
@@ -5,6 +5,8 @@
* found in the LICENSE file.
*/
+#include <memory>
+
#include "bench/Benchmark.h"
#include "include/core/SkCanvas.h"
@@ -75,7 +77,7 @@ private:
SkSurfaceCharacterization c = create_characterization(context);
- fRecorder.reset(new SkDeferredDisplayListRecorder(c));
+ fRecorder = std::make_unique<SkDeferredDisplayListRecorder>(c);
}
// We defer the clean up of the DDLs so it is done outside of the timing loop