Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: src/gpu/batches/GrAAHairLinePathRenderer.cpp

Issue 1825393002: Consolidate GPU buffer implementations (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: asserts Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrAAFillRectBatch.cpp ('k') | src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAAHairLinePathRenderer.cpp
diff --git a/src/gpu/batches/GrAAHairLinePathRenderer.cpp b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
index 7d45ed71f9fc255d490a5c8c36bfe3192ef8f535..2cc91f9740ec263a00142de292ae2c68ba5c184c 100644
--- a/src/gpu/batches/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
@@ -9,15 +9,14 @@
#include "GrBatchFlushState.h"
#include "GrBatchTest.h"
+#include "GrBuffer.h"
#include "GrCaps.h"
#include "GrContext.h"
#include "GrDefaultGeoProcFactory.h"
-#include "GrIndexBuffer.h"
#include "GrPathUtils.h"
#include "GrPipelineBuilder.h"
#include "GrProcessor.h"
#include "GrResourceProvider.h"
-#include "GrVertexBuffer.h"
#include "SkGeometry.h"
#include "SkStroke.h"
#include "SkTemplates.h"
@@ -65,7 +64,7 @@ static const int kQuadNumVertices = 5;
static const int kQuadsNumInIdxBuffer = 256;
GR_DECLARE_STATIC_UNIQUE_KEY(gQuadsIndexBufferKey);
-static const GrIndexBuffer* ref_quads_index_buffer(GrResourceProvider* resourceProvider) {
+static const GrBuffer* ref_quads_index_buffer(GrResourceProvider* resourceProvider) {
GR_DEFINE_STATIC_UNIQUE_KEY(gQuadsIndexBufferKey);
return resourceProvider->findOrCreateInstancedIndexBuffer(
kQuadIdxBufPattern, kIdxsPerQuad, kQuadsNumInIdxBuffer, kQuadNumVertices,
@@ -99,7 +98,7 @@ static const int kLineSegsNumInIdxBuffer = 256;
GR_DECLARE_STATIC_UNIQUE_KEY(gLinesIndexBufferKey);
-static const GrIndexBuffer* ref_lines_index_buffer(GrResourceProvider* resourceProvider) {
+static const GrBuffer* ref_lines_index_buffer(GrResourceProvider* resourceProvider) {
GR_DEFINE_STATIC_UNIQUE_KEY(gLinesIndexBufferKey);
return resourceProvider->findOrCreateInstancedIndexBuffer(
kLineSegIdxBufPattern, kIdxsPerLineSeg, kLineSegsNumInIdxBuffer, kLineSegNumVertices,
@@ -858,11 +857,11 @@ void AAHairlineBatch::onPrepareDraws(Target* target) const {
// do lines first
if (lineCount) {
- SkAutoTUnref<const GrIndexBuffer> linesIndexBuffer(
+ SkAutoTUnref<const GrBuffer> linesIndexBuffer(
ref_lines_index_buffer(target->resourceProvider()));
target->initDraw(lineGP);
- const GrVertexBuffer* vertexBuffer;
+ const GrBuffer* vertexBuffer;
int firstVertex;
size_t vertexStride = lineGP->getVertexStride();
@@ -891,10 +890,10 @@ void AAHairlineBatch::onPrepareDraws(Target* target) const {
}
if (quadCount || conicCount) {
- const GrVertexBuffer* vertexBuffer;
+ const GrBuffer* vertexBuffer;
int firstVertex;
- SkAutoTUnref<const GrIndexBuffer> quadsIndexBuffer(
+ SkAutoTUnref<const GrBuffer> quadsIndexBuffer(
ref_quads_index_buffer(target->resourceProvider()));
size_t vertexStride = sizeof(BezierVertex);
« no previous file with comments | « src/gpu/batches/GrAAFillRectBatch.cpp ('k') | src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698