aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-02-06 15:30:06 -0500
committerGravatar Brian Salomon <bsalomon@google.com>2017-02-06 20:34:55 +0000
commit3a97054456cd89cc885a7ce774523577dbe9164e (patch)
tree51daf588af748f3a7d5512a6b4ea6ac6c4f48076 /src
parent604c9890cc55a150591ae52fe0c34e759d6a5ebb (diff)
Make workaround for std::unique_ptr<const T[]> bug in old libstdc++ work.
BUG=skia: Change-Id: I58a07d4ce35bdd03e7edcf50e88d9982b3885546 Reviewed-on: https://skia-review.googlesource.com/8101 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/ops/GrDrawVerticesOp.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gpu/ops/GrDrawVerticesOp.cpp b/src/gpu/ops/GrDrawVerticesOp.cpp
index fd49face0e..faef239f43 100644
--- a/src/gpu/ops/GrDrawVerticesOp.cpp
+++ b/src/gpu/ops/GrDrawVerticesOp.cpp
@@ -44,14 +44,16 @@ std::unique_ptr<GrDrawOp> GrDrawVerticesOp::Make(
if (indices) {
vertices = SkVertices::MakeIndexed(
kIgnoredMode, std::unique_ptr<const SkPoint[]>((const SkPoint*)pos.release()),
- std::unique_ptr<const SkColor[]>(col.release()),
- std::unique_ptr<const SkPoint[]>(lc.release()), vertexCount,
- std::unique_ptr<const uint16_t[]>(idx.release()), indexCount, bounds);
+ std::unique_ptr<const SkColor[]>((const SkColor*)col.release()),
+ std::unique_ptr<const SkPoint[]>((const SkPoint*)lc.release()), vertexCount,
+ std::unique_ptr<const uint16_t[]>((const uint16_t*)idx.release()), indexCount,
+ bounds);
} else {
- vertices = SkVertices::Make(kIgnoredMode, std::unique_ptr<const SkPoint[]>(pos.release()),
- std::unique_ptr<const SkColor[]>(col.release()),
- std::unique_ptr<const SkPoint[]>(lc.release()), vertexCount,
- bounds);
+ vertices = SkVertices::Make(kIgnoredMode,
+ std::unique_ptr<const SkPoint[]>((const SkPoint*)pos.release()),
+ std::unique_ptr<const SkColor[]>((const SkColor*)col.release()),
+ std::unique_ptr<const SkPoint[]>((const SkPoint*)lc.release()),
+ vertexCount, bounds);
}
if (!vertices) {
return nullptr;