Remove SkAutoTDeleteArray
This class is already just an alias for std::unique_ptr<T[]>, so replace
all uses with that and delete the class.
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot,Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN-Trybot
Change-Id: I40668d398356a22da071ee791666c7f728b59266
Reviewed-on: https://skia-review.googlesource.com/4362
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTessellator.cpp
index 7d8db23..e75e1bb 100644
--- a/src/gpu/GrTessellator.cpp
+++ b/src/gpu/GrTessellator.cpp
@@ -1699,7 +1699,7 @@
if (SkPath::IsInverseFillType(fillType)) {
contourCnt++;
}
- SkAutoTDeleteArray<Vertex*> contours(new Vertex* [contourCnt]);
+ std::unique_ptr<Vertex*[]> contours(new Vertex* [contourCnt]);
path_to_contours(path, tolerance, clipBounds, contours.get(), alloc, isLinear);
return contours_to_polys(contours.get(), contourCnt, path.getFillType(), path.getBounds(),
diff --git a/src/gpu/GrTestUtils.cpp b/src/gpu/GrTestUtils.cpp
index 20f92f0..704b128 100644
--- a/src/gpu/GrTestUtils.cpp
+++ b/src/gpu/GrTestUtils.cpp
@@ -253,7 +253,7 @@
sk_sp<SkPathEffect> pe;
if (random->nextBool()) {
int cnt = random->nextRangeU(1, 50) * 2;
- SkAutoTDeleteArray<SkScalar> intervals(new SkScalar[cnt]);
+ std::unique_ptr<SkScalar[]> intervals(new SkScalar[cnt]);
SkScalar sum = 0;
for (int i = 0; i < cnt; i++) {
intervals[i] = random->nextRangeScalar(SkDoubleToScalar(0.01),
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index b49687f..a65d6e8 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1605,7 +1605,7 @@
//number of indices for lines per triangle with kLines
indexCount = triangleCount * 6;
- SkAutoTDeleteArray<uint16_t> lineIndices(new uint16_t[indexCount]);
+ std::unique_ptr<uint16_t[]> lineIndices(new uint16_t[indexCount]);
int i = 0;
while (vertProc(&state)) {
lineIndices[i] = state.f0;
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 270be46..d0a35b5 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -391,7 +391,7 @@
const bool isMipMapped = mipLevelCount > 1;
desc.fIsMipMapped = isMipMapped;
- SkAutoTDeleteArray<GrMipLevel> texels(new GrMipLevel[mipLevelCount]);
+ std::unique_ptr<GrMipLevel[]> texels(new GrMipLevel[mipLevelCount]);
texels[0].fPixels = pixmap.addr();
texels[0].fRowBytes = pixmap.rowBytes();
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index a07b671..5617497 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -241,7 +241,7 @@
int width = d->fRandom->nextRangeU(1, MAX_KERNEL_SIZE);
int height = d->fRandom->nextRangeU(1, MAX_KERNEL_SIZE / width);
SkISize kernelSize = SkISize::Make(width, height);
- SkAutoTDeleteArray<SkScalar> kernel(new SkScalar[width * height]);
+ std::unique_ptr<SkScalar[]> kernel(new SkScalar[width * height]);
for (int i = 0; i < width * height; i++) {
kernel.get()[i] = d->fRandom->nextSScalar1();
}
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 6d50ee2..e1ea965 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2484,7 +2484,7 @@
}
if (kAlpha_8_GrPixelConfig == config &&
this->readPixelsSupported(renderTarget, tempConfig)) {
- SkAutoTDeleteArray<uint32_t> temp(new uint32_t[width * height * 4]);
+ std::unique_ptr<uint32_t[]> temp(new uint32_t[width * height * 4]);
if (this->onReadPixels(renderTarget, left, top, width, height, tempConfig, temp.get(),
width*4)) {
uint8_t* dst = reinterpret_cast<uint8_t*>(buffer);
diff --git a/src/gpu/vk/GrVkDescriptorSetManager.cpp b/src/gpu/vk/GrVkDescriptorSetManager.cpp
index 868a5ce..d05a11c 100644
--- a/src/gpu/vk/GrVkDescriptorSetManager.cpp
+++ b/src/gpu/vk/GrVkDescriptorSetManager.cpp
@@ -180,7 +180,7 @@
numSamplers = (uint32_t)visibilities->count();
}
- SkAutoTDeleteArray<VkDescriptorSetLayoutBinding> dsSamplerBindings(
+ std::unique_ptr<VkDescriptorSetLayoutBinding[]> dsSamplerBindings(
new VkDescriptorSetLayoutBinding[numSamplers]);
for (uint32_t i = 0; i < numSamplers; ++i) {
uint32_t visibility;