diff options
author | 2016-03-25 04:55:58 -0700 | |
---|---|---|
committer | 2016-03-25 04:55:59 -0700 | |
commit | f8c3ba40cf4f42b2c2ba1b473c28d7733383223e (patch) | |
tree | 00c671765311aaa35c8a9d6fa0a6b84907c871b9 /src/gpu/batches/GrAAHairLinePathRenderer.cpp | |
parent | f299e7105435829c47e94f4cf6e408cad675bc77 (diff) |
Revert of Consolidate GPU buffer implementations (patchset #10 id:180001 of https://codereview.chromium.org/1825393002/ )
Reason for revert:
Lots of Android redness
Original issue's description:
> Consolidate GPU buffer implementations
>
> Consolidates all the different buffer implementations into a single
> GrBuffer class. This will allow us to add new buffer types, use DSA in
> OpenGL, track buffer bindings by unique ID, cache buffers without
> respect to the type of data they have been used for previously, etc.
> This change is strictly a refactor; it introduces no change in
> functionality.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002
>
> Committed: https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f
TBR=bsalomon@google.com,egdaniel@google.com,jvanverth@google.com,cdalton@nvidia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1831133004
Diffstat (limited to 'src/gpu/batches/GrAAHairLinePathRenderer.cpp')
-rw-r--r-- | src/gpu/batches/GrAAHairLinePathRenderer.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gpu/batches/GrAAHairLinePathRenderer.cpp b/src/gpu/batches/GrAAHairLinePathRenderer.cpp index 2cc91f9740..7d45ed71f9 100644 --- a/src/gpu/batches/GrAAHairLinePathRenderer.cpp +++ b/src/gpu/batches/GrAAHairLinePathRenderer.cpp @@ -9,14 +9,15 @@ #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" @@ -64,7 +65,7 @@ static const int kQuadNumVertices = 5; static const int kQuadsNumInIdxBuffer = 256; GR_DECLARE_STATIC_UNIQUE_KEY(gQuadsIndexBufferKey); -static const GrBuffer* ref_quads_index_buffer(GrResourceProvider* resourceProvider) { +static const GrIndexBuffer* ref_quads_index_buffer(GrResourceProvider* resourceProvider) { GR_DEFINE_STATIC_UNIQUE_KEY(gQuadsIndexBufferKey); return resourceProvider->findOrCreateInstancedIndexBuffer( kQuadIdxBufPattern, kIdxsPerQuad, kQuadsNumInIdxBuffer, kQuadNumVertices, @@ -98,7 +99,7 @@ static const int kLineSegsNumInIdxBuffer = 256; GR_DECLARE_STATIC_UNIQUE_KEY(gLinesIndexBufferKey); -static const GrBuffer* ref_lines_index_buffer(GrResourceProvider* resourceProvider) { +static const GrIndexBuffer* ref_lines_index_buffer(GrResourceProvider* resourceProvider) { GR_DEFINE_STATIC_UNIQUE_KEY(gLinesIndexBufferKey); return resourceProvider->findOrCreateInstancedIndexBuffer( kLineSegIdxBufPattern, kIdxsPerLineSeg, kLineSegsNumInIdxBuffer, kLineSegNumVertices, @@ -857,11 +858,11 @@ void AAHairlineBatch::onPrepareDraws(Target* target) const { // do lines first if (lineCount) { - SkAutoTUnref<const GrBuffer> linesIndexBuffer( + SkAutoTUnref<const GrIndexBuffer> linesIndexBuffer( ref_lines_index_buffer(target->resourceProvider())); target->initDraw(lineGP); - const GrBuffer* vertexBuffer; + const GrVertexBuffer* vertexBuffer; int firstVertex; size_t vertexStride = lineGP->getVertexStride(); @@ -890,10 +891,10 @@ void AAHairlineBatch::onPrepareDraws(Target* target) const { } if (quadCount || conicCount) { - const GrBuffer* vertexBuffer; + const GrVertexBuffer* vertexBuffer; int firstVertex; - SkAutoTUnref<const GrBuffer> quadsIndexBuffer( + SkAutoTUnref<const GrIndexBuffer> quadsIndexBuffer( ref_quads_index_buffer(target->resourceProvider())); size_t vertexStride = sizeof(BezierVertex); |