diff options
-rw-r--r-- | include/gpu/GrBackendProcessorFactory.h | 16 | ||||
-rw-r--r-- | include/gpu/GrCoordTransform.h | 18 | ||||
-rw-r--r-- | src/gpu/GrProcessor.cpp | 6 | ||||
-rw-r--r-- | src/gpu/gl/GrGLProgramDesc.cpp | 2 |
4 files changed, 21 insertions, 21 deletions
diff --git a/include/gpu/GrBackendProcessorFactory.h b/include/gpu/GrBackendProcessorFactory.h index 6544b307a7..3e4f133147 100644 --- a/include/gpu/GrBackendProcessorFactory.h +++ b/include/gpu/GrBackendProcessorFactory.h @@ -111,22 +111,22 @@ public: * processor's key. This allows keys generated by getGLProcessorKey() to only be unique within a * GrProcessor subclass and not necessarily across subclasses. */ - uint32_t effectClassID() const { return fEffectClassID; } + uint32_t classID() const { return fProcessorClassID; } protected: - GrBackendProcessorFactory() : fEffectClassID(GenID()) {} + GrBackendProcessorFactory() : fProcessorClassID(GenClassID()) {} virtual ~GrBackendProcessorFactory() {} private: enum { - kIllegalEffectClassID = 0, + kIllegalProcessorClassID = 0, }; - static uint32_t GenID() { - // fCurrEffectClassID has been initialized to kIllegalEffectClassID. The + static uint32_t GenClassID() { + // fCurrProcessorClassID has been initialized to kIllegalProcessorClassID. The // atomic inc returns the old value not the incremented value. So we add // 1 to the returned value. - uint32_t id = static_cast<uint32_t>(sk_atomic_inc(&fCurrEffectClassID)) + 1; + uint32_t id = static_cast<uint32_t>(sk_atomic_inc(&fCurrProcessorClassID)) + 1; if (!id) { SkFAIL("This should never wrap as it should only be called once for each GrProcessor " "subclass."); @@ -134,8 +134,8 @@ private: return id; } - const uint32_t fEffectClassID; - static int32_t fCurrEffectClassID; + const uint32_t fProcessorClassID; + static int32_t fCurrProcessorClassID; }; class GrFragmentProcessor; diff --git a/include/gpu/GrCoordTransform.h b/include/gpu/GrCoordTransform.h index 718bbe774f..db71ff1158 100644 --- a/include/gpu/GrCoordTransform.h +++ b/include/gpu/GrCoordTransform.h @@ -41,13 +41,13 @@ enum GrCoordSet { */ class GrCoordTransform : SkNoncopyable { public: - GrCoordTransform() { SkDEBUGCODE(fInEffect = false); } + GrCoordTransform() { SkDEBUGCODE(fInProcessor = false); } /** * Create a transformation that maps [0, 1] to a texture's boundaries. */ GrCoordTransform(GrCoordSet sourceCoords, const GrTexture* texture) { - SkDEBUGCODE(fInEffect = false); + SkDEBUGCODE(fInProcessor = false); this->reset(sourceCoords, texture); } @@ -57,25 +57,25 @@ public: * coord convention. */ GrCoordTransform(GrCoordSet sourceCoords, const SkMatrix& m, const GrTexture* texture = NULL) { - SkDEBUGCODE(fInEffect = false); + SkDEBUGCODE(fInProcessor = false); this->reset(sourceCoords, m, texture); } void reset(GrCoordSet sourceCoords, const GrTexture* texture) { - SkASSERT(!fInEffect); + SkASSERT(!fInProcessor); SkASSERT(texture); this->reset(sourceCoords, MakeDivByTextureWHMatrix(texture), texture); } void reset(GrCoordSet sourceCoords, const SkMatrix& m, const GrTexture* texture = NULL) { - SkASSERT(!fInEffect); + SkASSERT(!fInProcessor); fSourceCoords = sourceCoords; fMatrix = m; fReverseY = texture && kBottomLeft_GrSurfaceOrigin == texture->origin(); } GrCoordTransform& operator= (const GrCoordTransform& other) { - SkASSERT(!fInEffect); + SkASSERT(!fInProcessor); fSourceCoords = other.fSourceCoords; fMatrix = other.fMatrix; fReverseY = other.fReverseY; @@ -87,7 +87,7 @@ public: * effect, since effects are immutable. */ SkMatrix* accessMatrix() { - SkASSERT(!fInEffect); + SkASSERT(!fInProcessor); return &fMatrix; } @@ -119,9 +119,9 @@ private: #ifdef SK_DEBUG public: - void setInEffect() const { fInEffect = true; } + void setInProcessor() const { fInProcessor = true; } private: - mutable bool fInEffect; + mutable bool fInProcessor; #endif }; diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp index 04401c8adf..fbcd0f334b 100644 --- a/src/gpu/GrProcessor.cpp +++ b/src/gpu/GrProcessor.cpp @@ -92,8 +92,8 @@ private: } }; -int32_t GrBackendProcessorFactory::fCurrEffectClassID = - GrBackendProcessorFactory::kIllegalEffectClassID; +int32_t GrBackendProcessorFactory::fCurrProcessorClassID = + GrBackendProcessorFactory::kIllegalProcessorClassID; /////////////////////////////////////////////////////////////////////////////// @@ -173,5 +173,5 @@ bool GrProcessor::InvariantOutput::validPreMulColor() const { void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) { fCoordTransforms.push_back(transform); - SkDEBUGCODE(transform->setInEffect();) + SkDEBUGCODE(transform->setInProcessor();) } diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp index 224411e51c..79088137ca 100644 --- a/src/gpu/gl/GrGLProgramDesc.cpp +++ b/src/gpu/gl/GrGLProgramDesc.cpp @@ -133,7 +133,7 @@ static bool get_meta_key(const GrProcessor& proc, } *processorKeySize = SkToU16(size); uint32_t textureKey = gen_texture_key(proc, caps); - uint32_t classID = proc.getFactory().effectClassID(); + uint32_t classID = proc.getFactory().classID(); // Currently we allow 16 bits for each of the above portions of the meta-key. Fail if they // don't fit. |