aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DM.cpp
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2016-11-03 14:40:50 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-03 19:03:40 +0000
commit145dbcd165d9d27298eb8888bc240e2d06a95464 (patch)
tree461ac2a3fe607bdf1d72fd72ae9451a58490a1bc /dm/DM.cpp
parentb1c7f88df9ec40b4efb52d314304adfbaf95697c (diff)
Remove SkAutoTDelete.
Replace with std::unique_ptr. Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176 Reviewed-on: https://skia-review.googlesource.com/4381 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'dm/DM.cpp')
-rw-r--r--dm/DM.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 150b9942ae..5f4203c962 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -334,12 +334,12 @@ static void gather_uninteresting_hashes() {
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-struct TaggedSrc : public SkAutoTDelete<Src> {
+struct TaggedSrc : public std::unique_ptr<Src> {
SkString tag;
SkString options;
};
-struct TaggedSink : public SkAutoTDelete<Sink> {
+struct TaggedSink : public std::unique_ptr<Sink> {
SkString tag;
};
@@ -354,7 +354,7 @@ static bool in_shard() {
}
static void push_src(const char* tag, ImplicitString options, Src* s) {
- SkAutoTDelete<Src> src(s);
+ std::unique_ptr<Src> src(s);
if (in_shard() &&
FLAGS_src.contains(tag) &&
!SkCommandLineFlags::ShouldSkip(FLAGS_match, src->name().c_str())) {
@@ -510,7 +510,7 @@ static void push_codec_srcs(Path path) {
info("Couldn't read %s.", path.c_str());
return;
}
- SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded));
+ std::unique_ptr<SkCodec> codec(SkCodec::NewFromData(encoded));
if (nullptr == codec.get()) {
info("Couldn't create codec for %s.", path.c_str());
return;
@@ -803,7 +803,7 @@ static bool gather_srcs() {
}
static void push_sink(const SkCommandLineConfig& config, Sink* s) {
- SkAutoTDelete<Sink> sink(s);
+ std::unique_ptr<Sink> sink(s);
// Try a simple Src as a canary. If it fails, skip this sink.
struct : public Src {
@@ -1079,7 +1079,7 @@ struct Task {
// We're likely switching threads here, so we must capture by value, [=] or [foo,bar].
SkStreamAsset* data = stream.detachAsStream();
gDefinitelyThreadSafeWork.add([task,name,bitmap,data]{
- SkAutoTDelete<SkStreamAsset> ownedData(data);
+ std::unique_ptr<SkStreamAsset> ownedData(data);
// Why doesn't the copy constructor do this when we have pre-locked pixels?
bitmap.lockPixels();
@@ -1331,7 +1331,7 @@ int dm_main() {
gPending = gSrcs.count() * gSinks.count() + gParallelTests.count() + gSerialTests.count();
info("%d srcs * %d sinks + %d tests == %d tasks",
gSrcs.count(), gSinks.count(), gParallelTests.count() + gSerialTests.count(), gPending);
- SkAutoTDelete<SkThread> statusThread(start_status_thread());
+ std::unique_ptr<SkThread> statusThread(start_status_thread());
// Kick off as much parallel work as we can, making note of any serial work we'll need to do.
SkTaskGroup parallel;