Allow GrSurfaceProxy-derived classes to use flags when instantiating (take 2)
In some instances proxies must be created that, when instantiated, have no pending IO.
This is split out of:
https://skia-review.googlesource.com/c/8679/ (Add per-Flush callback to GrDrawingManager)
and is a reland of:
https://skia-review.googlesource.com/c/8988/ ( Allow GrSurfaceProxy-derived classes to use flags when instantiating)
Change-Id: I36f52a6d249e762bdfc1f0d7528aba6d4071e492
Reviewed-on: https://skia-review.googlesource.com/9070
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp
index e3f30b0..38bde0d 100644
--- a/src/gpu/GrBufferAllocPool.cpp
+++ b/src/gpu/GrBufferAllocPool.cpp
@@ -334,7 +334,7 @@
SkASSERT(buffer);
SkASSERT(startVertex);
- size_t offset = 0; // assign to suppress warning
+ size_t offset SK_INIT_TO_AVOID_WARNING;
void* ptr = INHERITED::makeSpace(vertexSize * vertexCount,
vertexSize,
buffer,
@@ -359,7 +359,7 @@
SkASSERT(buffer);
SkASSERT(startIndex);
- size_t offset = 0; // assign to suppress warning
+ size_t offset SK_INIT_TO_AVOID_WARNING;
void* ptr = INHERITED::makeSpace(indexCount * sizeof(uint16_t),
sizeof(uint16_t),
buffer,