aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrDrawVerticesOp.h
diff options
context:
space:
mode:
authorGravatar Ruiqi Mao <ruiqimao@google.com>2018-07-03 21:18:07 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-03 21:18:18 +0000
commitc05aa7d163fd0b930fa450d2e4c7f2497f036254 (patch)
treed741730ca4b88ade1f73f4f2c20dec0ad1789464 /src/gpu/ops/GrDrawVerticesOp.h
parent5ffcb4d20e3f9798daa013f2b4d00bfb4a9a01da (diff)
Revert "added skeletal animation support to GPU backend"
This reverts commit b6307340e8a6a9d3a7517def7f5eaaadffd07d14. Reason for revert: patch/atlas failing in gold Original change's description: > added skeletal animation support to GPU backend > > added caching of SkVertices > > Docs-Preview: https://skia.org/?cl=138596 > Bug: skia: > Change-Id: Ia750f55f5f6d0de250d9e9c5619f4d1ac856f9f5 > Reviewed-on: https://skia-review.googlesource.com/138596 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Ruiqi Mao <ruiqimao@google.com> TBR=robertphillips@google.com,brianosman@google.com,reed@google.com,ruiqimao@google.com Change-Id: Idfaf016a7ff4cdd8af2543d510706f489d04417a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/139281 Reviewed-by: Ruiqi Mao <ruiqimao@google.com> Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
Diffstat (limited to 'src/gpu/ops/GrDrawVerticesOp.h')
-rw-r--r--src/gpu/ops/GrDrawVerticesOp.h47
1 files changed, 8 insertions, 39 deletions
diff --git a/src/gpu/ops/GrDrawVerticesOp.h b/src/gpu/ops/GrDrawVerticesOp.h
index 2e10fefe94..6d35c0d0e9 100644
--- a/src/gpu/ops/GrDrawVerticesOp.h
+++ b/src/gpu/ops/GrDrawVerticesOp.h
@@ -38,15 +38,13 @@ public:
static std::unique_ptr<GrDrawOp> Make(GrContext* context,
GrPaint&&,
sk_sp<SkVertices>,
- const SkMatrix bones[],
- int boneCount,
const SkMatrix& viewMatrix,
GrAAType,
sk_sp<GrColorSpaceXform>,
GrPrimitiveType* overridePrimType = nullptr);
- GrDrawVerticesOp(const Helper::MakeArgs&, GrColor, sk_sp<SkVertices>, const SkMatrix bones[],
- int boneCount, GrPrimitiveType, GrAAType, sk_sp<GrColorSpaceXform>,
+ GrDrawVerticesOp(const Helper::MakeArgs& helperArgs, GrColor, sk_sp<SkVertices>,
+ GrPrimitiveType, GrAAType, sk_sp<GrColorSpaceXform>,
const SkMatrix& viewMatrix);
const char* name() const override { return "DrawVerticesOp"; }
@@ -70,26 +68,7 @@ private:
void onPrepareDraws(Target*) override;
- void drawVolatile(Target*);
- void drawNonVolatile(Target*);
-
- void fillBuffers(bool hasColorAttribute,
- bool hasLocalCoordsAttribute,
- bool hasBoneAttribute,
- size_t vertexStride,
- void* verts,
- uint16_t* indices) const;
-
- void drawVertices(Target*,
- GrGeometryProcessor*,
- const GrBuffer* vertexBuffer,
- int firstVertex,
- const GrBuffer* indexBuffer,
- int firstIndex);
-
- sk_sp<GrGeometryProcessor> makeGP(bool* hasColorAttribute,
- bool* hasLocalCoordAttribute,
- bool* hasBoneAttribute) const;
+ sk_sp<GrGeometryProcessor> makeGP(bool* hasColorAttribute, bool* hasLocalCoordAttribute) const;
GrPrimitiveType primitiveType() const { return fPrimitiveType; }
bool combinablePrimitive() const {
@@ -103,11 +82,9 @@ private:
struct Mesh {
GrColor fColor; // Used if this->hasPerVertexColors() is false.
sk_sp<SkVertices> fVertices;
- std::vector<SkMatrix> fBones;
SkMatrix fViewMatrix;
bool fIgnoreTexCoords;
bool fIgnoreColors;
- bool fIgnoreBones;
bool hasExplicitLocalCoords() const {
return fVertices->hasTexCoords() && !fIgnoreTexCoords;
@@ -116,10 +93,6 @@ private:
bool hasPerVertexColors() const {
return fVertices->hasColors() && !fIgnoreColors;
}
-
- bool hasBones() const {
- return fVertices->hasBones() && fBones.size() && !fIgnoreBones;
- }
};
bool isIndexed() const {
@@ -132,22 +105,18 @@ private:
}
bool anyMeshHasExplicitLocalCoords() const {
- return SkToBool(kAnyMeshHasExplicitLocalCoords_Flag & fFlags);
+ return SkToBool(kAnyMeshHasExplicitLocalCoords & fFlags);
}
bool hasMultipleViewMatrices() const {
return SkToBool(kHasMultipleViewMatrices_Flag & fFlags);
}
- bool hasBones() const {
- return SkToBool(kHasBones_Flag & fFlags);
- }
-
enum Flags {
- kRequiresPerVertexColors_Flag = 0x1,
- kAnyMeshHasExplicitLocalCoords_Flag = 0x2,
- kHasMultipleViewMatrices_Flag = 0x4,
- kHasBones_Flag = 0x8,
+ kRequiresPerVertexColors_Flag = 0x1,
+ kAnyMeshHasExplicitLocalCoords = 0x2,
+ kHasMultipleViewMatrices_Flag = 0x4
+
};
Helper fHelper;