OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrBatch.h" | 8 #include "GrBatch.h" |
9 #include "GrBatchTarget.h" | 9 #include "GrBatchTarget.h" |
10 #include "GrResourceProvider.h" | 10 #include "GrResourceProvider.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 void* GrBatch::QuadHelper::init(GrBatchTarget* batchTarget, size_t vertexStride,
int quadsToDraw) { | 78 void* GrBatch::QuadHelper::init(GrBatchTarget* batchTarget, size_t vertexStride,
int quadsToDraw) { |
79 SkAutoTUnref<const GrIndexBuffer> quadIndexBuffer( | 79 SkAutoTUnref<const GrIndexBuffer> quadIndexBuffer( |
80 batchTarget->resourceProvider()->refQuadIndexBuffer()); | 80 batchTarget->resourceProvider()->refQuadIndexBuffer()); |
81 if (!quadIndexBuffer) { | 81 if (!quadIndexBuffer) { |
82 SkDebugf("Could not get quad index buffer."); | 82 SkDebugf("Could not get quad index buffer."); |
83 return NULL; | 83 return NULL; |
84 } | 84 } |
85 return this->INHERITED::init(batchTarget, kTriangles_GrPrimitiveType, vertex
Stride, | 85 return this->INHERITED::init(batchTarget, kTriangles_GrPrimitiveType, vertex
Stride, |
86 quadIndexBuffer, kVerticesPerQuad, kIndicesPerQ
uad, quadsToDraw); | 86 quadIndexBuffer, kVerticesPerQuad, kIndicesPerQ
uad, quadsToDraw); |
87 } | 87 } |
OLD | NEW |