diff options
author | 2015-01-27 06:41:33 -0800 | |
---|---|---|
committer | 2015-01-27 06:41:33 -0800 | |
commit | ca0a1799ffdceb4ccd998468566f39abac2f0b55 (patch) | |
tree | 5524b2cd3024f8ddfd076d21d05237562518800e /src/gpu/GrDrawTarget.h | |
parent | 7defaa6c4a7577742d1b42bc869a84bd9a96e5a7 (diff) |
Revert of GrBatchPrototype (patchset #30 id:570001 of https://codereview.chromium.org/845103005/)
Reason for revert:
creates large performance regression
Original issue's description:
> GrBatchPrototype
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d15e4e45374275c045572b304c229237c4a82be4
TBR=bsalomon@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/862823004
Diffstat (limited to 'src/gpu/GrDrawTarget.h')
-rw-r--r-- | src/gpu/GrDrawTarget.h | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h index 18265c8fb7..b66f1c6bd3 100644 --- a/src/gpu/GrDrawTarget.h +++ b/src/gpu/GrDrawTarget.h @@ -26,7 +26,6 @@ #include "SkTypes.h" #include "SkXfermode.h" -class GrBatch; class GrClipData; class GrDrawTargetCaps; class GrPath; @@ -260,11 +259,6 @@ public: int vertexCount, const SkRect* devBounds = NULL); - // TODO devbounds should live on the batch - void drawBatch(GrPipelineBuilder*, - GrBatch*, - const SkRect* devBounds = NULL); - /** * Draws path into the stencil buffer. The fill must be either even/odd or * winding (not inverse or hairline). It will respect the HW antialias flag @@ -316,14 +310,14 @@ public: * that rectangle before it is input to GrCoordTransforms that read local * coordinates */ - void drawRect(GrPipelineBuilder* pipelineBuilder, + void drawRect(GrPipelineBuilder* ds, GrColor color, const SkMatrix& viewMatrix, const SkRect& rect, const SkRect* localRect, const SkMatrix* localMatrix) { AutoGeometryPush agp(this); - this->onDrawRect(pipelineBuilder, color, viewMatrix, rect, localRect, localMatrix); + this->onDrawRect(ds, color, viewMatrix, rect, localRect, localMatrix); } /** @@ -533,7 +527,6 @@ public: */ class DrawInfo { public: - DrawInfo() { fDevBounds = NULL; } DrawInfo(const DrawInfo& di) { (*this) = di; } DrawInfo& operator =(const DrawInfo& di); @@ -546,15 +539,6 @@ public: int indicesPerInstance() const { return fIndicesPerInstance; } int instanceCount() const { return fInstanceCount; } - void setPrimitiveType(GrPrimitiveType type) { fPrimitiveType = type; } - void setStartVertex(int startVertex) { fStartVertex = startVertex; } - void setStartIndex(int startIndex) { fStartIndex = startIndex; } - void setVertexCount(int vertexCount) { fVertexCount = vertexCount; } - void setIndexCount(int indexCount) { fIndexCount = indexCount; } - void setVerticesPerInstance(int verticesPerI) { fVerticesPerInstance = verticesPerI; } - void setIndicesPerInstance(int indicesPerI) { fIndicesPerInstance = indicesPerI; } - void setInstanceCount(int instanceCount) { fInstanceCount = instanceCount; } - bool isIndexed() const { return fIndexCount > 0; } #ifdef SK_DEBUG bool isInstanced() const; // this version is longer because of asserts @@ -584,6 +568,8 @@ public: const SkRect* getDevBounds() const { return fDevBounds; } private: + DrawInfo() { fDevBounds = NULL; } + friend class GrDrawTarget; GrPrimitiveType fPrimitiveType; @@ -722,10 +708,6 @@ private: const DrawInfo&, const GrScissorState&, const GrDeviceCoordTexture* dstCopy) = 0; - virtual void onDrawBatch(GrBatch*, - const GrPipelineBuilder&, - const GrScissorState&, - const GrDeviceCoordTexture* dstCopy) = 0; // TODO copy in order drawbuffer onDrawRect to here virtual void onDrawRect(GrPipelineBuilder*, GrColor color, |