| Index: src/gpu/GrBatch.h
|
| diff --git a/src/gpu/GrBatch.h b/src/gpu/GrBatch.h
|
| index b77011268b5a23489deb55b76278a5f0e5620efd..21dc3d21c88fd75f3f33afaa184f1be78ba206cf 100644
|
| --- a/src/gpu/GrBatch.h
|
| +++ b/src/gpu/GrBatch.h
|
| @@ -11,9 +11,9 @@
|
| #include <new>
|
| #include "GrBatchTarget.h"
|
| #include "GrGeometryProcessor.h"
|
| -#include "GrNonAtomicRef.h"
|
| #include "GrVertices.h"
|
| #include "SkAtomics.h"
|
| +#include "SkRefCnt.h"
|
| #include "SkTypes.h"
|
|
|
| class GrGpu;
|
| @@ -37,8 +37,9 @@
|
| * information will be communicated to the GrBatch prior to geometry generation.
|
| */
|
|
|
| -class GrBatch : public GrNonAtomicRef {
|
| +class GrBatch : public SkRefCnt {
|
| public:
|
| +
|
| GrBatch() : fClassID(kIllegalBatchClassID), fNumberOfDraws(0) { SkDEBUGCODE(fUsed = false;) }
|
| virtual ~GrBatch() {}
|
|
|
| @@ -54,10 +55,6 @@
|
|
|
| bool combineIfPossible(GrBatch* that) {
|
| if (this->classID() != that->classID()) {
|
| - return false;
|
| - }
|
| -
|
| - if (!this->pipeline()->isEqual(*that->pipeline())) {
|
| return false;
|
| }
|
|
|
| @@ -97,13 +94,13 @@
|
|
|
| SkDEBUGCODE(bool isUsed() const { return fUsed; })
|
|
|
| - void setPipeline(const GrPipeline* pipeline) { fPipeline.reset(SkRef(pipeline)); }
|
| -
|
| protected:
|
| template <typename PROC_SUBCLASS> void initClassID() {
|
| static uint32_t kClassID = GenClassID();
|
| fClassID = kClassID;
|
| }
|
| +
|
| + uint32_t fClassID;
|
|
|
| // NOTE, compute some bounds, even if extremely conservative. Do *NOT* setLargest on the bounds
|
| // rect because we outset it for dst copy textures
|
| @@ -112,8 +109,6 @@
|
| void joinBounds(const SkRect& otherBounds) {
|
| return fBounds.joinPossiblyEmptyRect(otherBounds);
|
| }
|
| -
|
| - const GrPipeline* pipeline() const { return fPipeline; }
|
|
|
| /** Helper for rendering instances using an instanced index index buffer. This class creates the
|
| space for the vertices and flushes the draws to the batch target.*/
|
| @@ -153,7 +148,6 @@
|
| typedef InstancedHelper INHERITED;
|
| };
|
|
|
| - uint32_t fClassID;
|
| SkRect fBounds;
|
|
|
| private:
|
| @@ -172,10 +166,11 @@
|
| enum {
|
| kIllegalBatchClassID = 0,
|
| };
|
| - SkAutoTUnref<const GrPipeline> fPipeline;
|
| static int32_t gCurrBatchClassID;
|
| +
|
| + SkDEBUGCODE(bool fUsed;)
|
| +
|
| int fNumberOfDraws;
|
| - SkDEBUGCODE(bool fUsed;)
|
|
|
| typedef SkRefCnt INHERITED;
|
| };
|
|
|