diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrAllocPool.cpp | 8 | ||||
-rwxr-xr-x | src/gpu/GrAllocator.h | 2 | ||||
-rw-r--r-- | src/gpu/GrBlend.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrContext.cpp | 4 | ||||
-rw-r--r-- | src/gpu/GrDrawState.cpp | 8 | ||||
-rw-r--r-- | src/gpu/GrDrawState.h | 20 | ||||
-rw-r--r-- | src/gpu/GrMemoryPool.cpp | 6 | ||||
-rw-r--r-- | src/gpu/gl/GrGLPath.cpp | 4 | ||||
-rw-r--r-- | src/gpu/gl/GrGLShaderBuilder.cpp | 2 | ||||
-rw-r--r-- | src/gpu/gr_unittests.cpp | 2 |
10 files changed, 29 insertions, 29 deletions
diff --git a/src/gpu/GrAllocPool.cpp b/src/gpu/GrAllocPool.cpp index 1d8dc45b97..dc81ee2d47 100644 --- a/src/gpu/GrAllocPool.cpp +++ b/src/gpu/GrAllocPool.cpp @@ -57,7 +57,7 @@ struct GrAllocPool::Block { GrAllocPool::GrAllocPool(size_t blockSize) { fBlock = NULL; fMinBlockSize = GrMax(blockSize, GrAllocPool_MIN_BLOCK_SIZE); - GR_DEBUGCODE(fBlocksAllocated = 0;) + SkDEBUGCODE(fBlocksAllocated = 0;) } GrAllocPool::~GrAllocPool() { @@ -74,7 +74,7 @@ void GrAllocPool::reset() { block = next; } fBlock = NULL; - GR_DEBUGCODE(fBlocksAllocated = 0;) + SkDEBUGCODE(fBlocksAllocated = 0;) } void* GrAllocPool::alloc(size_t size) { @@ -83,7 +83,7 @@ void* GrAllocPool::alloc(size_t size) { if (!fBlock || !fBlock->canAlloc(size)) { size_t blockSize = GrMax(fMinBlockSize, size); fBlock = Block::Create(blockSize, fBlock); - GR_DEBUGCODE(fBlocksAllocated += 1;) + SkDEBUGCODE(fBlocksAllocated += 1;) } return fBlock->alloc(size); } @@ -97,7 +97,7 @@ void GrAllocPool::release(size_t bytes) { Block* next = fBlock->fNext; GrFree(fBlock); fBlock = next; - GR_DEBUGCODE(fBlocksAllocated -= 1;) + SkDEBUGCODE(fBlocksAllocated -= 1;) } } } diff --git a/src/gpu/GrAllocator.h b/src/gpu/GrAllocator.h index 4b81f25915..c37b119700 100755 --- a/src/gpu/GrAllocator.h +++ b/src/gpu/GrAllocator.h @@ -38,7 +38,7 @@ public: SkASSERT(itemsPerBlock > 0); fBlockSize = fItemSize * fItemsPerBlock; fBlocks.push_back() = initialBlock; - GR_DEBUGCODE(if (!fOwnFirstBlock) {*((char*)initialBlock+fBlockSize-1)='a';} ); + SkDEBUGCODE(if (!fOwnFirstBlock) {*((char*)initialBlock+fBlockSize-1)='a';} ); } /** diff --git a/src/gpu/GrBlend.cpp b/src/gpu/GrBlend.cpp index 31e45fa579..c8631c42ef 100644 --- a/src/gpu/GrBlend.cpp +++ b/src/gpu/GrBlend.cpp @@ -113,7 +113,7 @@ static GrColor simplify_blend_term(GrBlendCoeff* srcCoeff, break; } // We may have invalidated these above and shouldn't read them again. - GR_DEBUGCODE(dstColor = constantColor = GrColor_ILLEGAL;) + SkDEBUGCODE(dstColor = constantColor = GrColor_ILLEGAL;) if (kZero_GrBlendCoeff == *srcCoeff || (valid_color(srcCompFlags) && 0 == srcColor)) { *srcCoeff = kZero_GrBlendCoeff; diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index b6555c47ca..5145b29373 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -1536,10 +1536,10 @@ bool GrContext::writeRenderTargetPixels(GrRenderTarget* target, // handle the unpremul step on the CPU if we couldn't create an effect to do it. if (NULL == effect) { SkCanvas::Config8888 srcConfig8888, dstConfig8888; - GR_DEBUGCODE(bool success = ) + SkDEBUGCODE(bool success = ) grconfig_to_config8888(srcConfig, true, &srcConfig8888); SkASSERT(success); - GR_DEBUGCODE(success = ) + SkDEBUGCODE(success = ) grconfig_to_config8888(srcConfig, false, &dstConfig8888); SkASSERT(success); const uint32_t* src = reinterpret_cast<const uint32_t*>(buffer); diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp index 0aa4215d0d..d1d6c5813e 100644 --- a/src/gpu/GrDrawState.cpp +++ b/src/gpu/GrDrawState.cpp @@ -400,7 +400,7 @@ GrDrawState::BlendOptFlags GrDrawState::getBlendOpts(bool forceCoverage, void GrDrawState::AutoViewMatrixRestore::restore() { if (NULL != fDrawState) { - GR_DEBUGCODE(--fDrawState->fBlockEffectRemovalCnt;) + SkDEBUGCODE(--fDrawState->fBlockEffectRemovalCnt;) fDrawState->fCommon.fViewMatrix = fViewMatrix; SkASSERT(fDrawState->numColorStages() >= fNumColorStages); int numCoverageStages = fSavedCoordChanges.count() - fNumColorStages; @@ -431,7 +431,7 @@ void GrDrawState::AutoViewMatrixRestore::set(GrDrawState* drawState, drawState->fCommon.fViewMatrix.preConcat(preconcatMatrix); this->doEffectCoordChanges(preconcatMatrix); - GR_DEBUGCODE(++fDrawState->fBlockEffectRemovalCnt;) + SkDEBUGCODE(++fDrawState->fBlockEffectRemovalCnt;) } bool GrDrawState::AutoViewMatrixRestore::setIdentity(GrDrawState* drawState) { @@ -451,7 +451,7 @@ bool GrDrawState::AutoViewMatrixRestore::setIdentity(GrDrawState* drawState) { fDrawState = drawState; fNumColorStages = 0; fSavedCoordChanges.reset(0); - GR_DEBUGCODE(++fDrawState->fBlockEffectRemovalCnt;) + SkDEBUGCODE(++fDrawState->fBlockEffectRemovalCnt;) return true; } else { SkMatrix inv; @@ -461,7 +461,7 @@ bool GrDrawState::AutoViewMatrixRestore::setIdentity(GrDrawState* drawState) { drawState->fCommon.fViewMatrix.reset(); fDrawState = drawState; this->doEffectCoordChanges(inv); - GR_DEBUGCODE(++fDrawState->fBlockEffectRemovalCnt;) + SkDEBUGCODE(++fDrawState->fBlockEffectRemovalCnt;) return true; } } diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h index 25c8cb1d2a..ef6cc46497 100644 --- a/src/gpu/GrDrawState.h +++ b/src/gpu/GrDrawState.h @@ -30,12 +30,12 @@ public: SK_DECLARE_INST_COUNT(GrDrawState) GrDrawState() { - GR_DEBUGCODE(fBlockEffectRemovalCnt = 0;) + SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) this->reset(); } GrDrawState(const SkMatrix& initialViewMatrix) { - GR_DEBUGCODE(fBlockEffectRemovalCnt = 0;) + SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) this->reset(initialViewMatrix); } @@ -43,7 +43,7 @@ public: * Copies another draw state. **/ GrDrawState(const GrDrawState& state) : INHERITED() { - GR_DEBUGCODE(fBlockEffectRemovalCnt = 0;) + SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) *this = state; } @@ -51,7 +51,7 @@ public: * Copies another draw state with a preconcat to the view matrix. **/ GrDrawState(const GrDrawState& state, const SkMatrix& preConcatMatrix) { - GR_DEBUGCODE(fBlockEffectRemovalCnt = 0;) + SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) *this = state; if (!preConcatMatrix.isIdentity()) { for (int i = 0; i < fColorStages.count(); ++i) { @@ -419,13 +419,13 @@ public: n = fDrawState->fCoverageStages.count() - fCoverageEffectCnt; SkASSERT(n >= 0); fDrawState->fCoverageStages.pop_back_n(n); - GR_DEBUGCODE(--fDrawState->fBlockEffectRemovalCnt;) + SkDEBUGCODE(--fDrawState->fBlockEffectRemovalCnt;) } fDrawState = ds; if (NULL != ds) { fColorEffectCnt = ds->fColorStages.count(); fCoverageEffectCnt = ds->fCoverageStages.count(); - GR_DEBUGCODE(++ds->fBlockEffectRemovalCnt;) + SkDEBUGCODE(++ds->fBlockEffectRemovalCnt;) } } @@ -981,7 +981,7 @@ public: class DeferredState { public: DeferredState() : fRenderTarget(NULL) { - GR_DEBUGCODE(fInitialized = false;) + SkDEBUGCODE(fInitialized = false;) } // TODO: Remove this when DeferredState no longer holds a ref to the RT ~DeferredState() { SkSafeUnref(fRenderTarget); } @@ -1002,7 +1002,7 @@ public: for (int i = 0; i < drawState.fCoverageStages.count(); ++i) { fStages[i + fColorStageCnt].saveFrom(drawState.fCoverageStages[i]); } - GR_DEBUGCODE(fInitialized = true;) + SkDEBUGCODE(fInitialized = true;) } void restoreTo(GrDrawState* drawState) { @@ -1053,7 +1053,7 @@ public: int fColorStageCnt; DeferredStageArray fStages; - GR_DEBUGCODE(bool fInitialized;) + SkDEBUGCODE(bool fInitialized;) }; private: @@ -1067,7 +1067,7 @@ private: // Some of the auto restore objects assume that no effects are removed during their lifetime. // This is used to assert that this condition holds. - GR_DEBUGCODE(int fBlockEffectRemovalCnt;) + SkDEBUGCODE(int fBlockEffectRemovalCnt;) /** * Sets vertex attributes for next draw. diff --git a/src/gpu/GrMemoryPool.cpp b/src/gpu/GrMemoryPool.cpp index 83119db98e..83b02bd9e5 100644 --- a/src/gpu/GrMemoryPool.cpp +++ b/src/gpu/GrMemoryPool.cpp @@ -14,7 +14,7 @@ #endif GrMemoryPool::GrMemoryPool(size_t preallocSize, size_t minAllocSize) { - GR_DEBUGCODE(fAllocationCnt = 0); + SkDEBUGCODE(fAllocationCnt = 0); minAllocSize = GrMax<size_t>(minAllocSize, 1 << 10); fMinAllocSize = GrSizeAlignUp(minAllocSize + kPerAllocPad, kAlignment), @@ -61,7 +61,7 @@ void* GrMemoryPool::allocate(size_t size) { fTail->fCurrPtr += size; fTail->fFreeSize -= size; fTail->fLiveCount += 1; - GR_DEBUGCODE(++fAllocationCnt); + SkDEBUGCODE(++fAllocationCnt); VALIDATE; return reinterpret_cast<void*>(ptr); } @@ -98,7 +98,7 @@ void GrMemoryPool::release(void* p) { block->fCurrPtr = block->fPrevPtr; } } - GR_DEBUGCODE(--fAllocationCnt); + SkDEBUGCODE(--fAllocationCnt); VALIDATE; } diff --git a/src/gpu/gl/GrGLPath.cpp b/src/gpu/gl/GrGLPath.cpp index 7bf7df0741..c5a4425dcd 100644 --- a/src/gpu/gl/GrGLPath.cpp +++ b/src/gpu/gl/GrGLPath.cpp @@ -78,11 +78,11 @@ GrGLPath::GrGLPath(GrGpuGL* gpu, const SkPath& path) : INHERITED(gpu, kIsWrapped path.getPoints(&pathPoints[0], pointCnt); path.getVerbs(&pathCommands[0], verbCnt); - GR_DEBUGCODE(int numPts = 0); + SkDEBUGCODE(int numPts = 0); for (int i = 0; i < verbCnt; ++i) { SkPath::Verb v = static_cast<SkPath::Verb>(pathCommands[i]); pathCommands[i] = verb_to_gl_path_cmd(v); - GR_DEBUGCODE(numPts += num_pts(v)); + SkDEBUGCODE(numPts += num_pts(v)); } SkASSERT(pathPoints.count() == numPts); diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp index 5e00d7f1bb..f73520c363 100644 --- a/src/gpu/gl/GrGLShaderBuilder.cpp +++ b/src/gpu/gl/GrGLShaderBuilder.cpp @@ -334,7 +334,7 @@ GrGLUniformManager::UniformHandle GrGLShaderBuilder::addUniformArray(uint32_t vi BuilderUniform& uni = fUniforms.push_back(); UniformHandle h = GrGLUniformManager::UniformHandle::CreateFromUniformIndex(fUniforms.count() - 1); - GR_DEBUGCODE(UniformHandle h2 =) + SkDEBUGCODE(UniformHandle h2 =) fUniformManager.appendUniform(type, count); // We expect the uniform manager to initially have no uniforms and that all uniforms are added // by this function. Therefore, the handles should match. diff --git a/src/gpu/gr_unittests.cpp b/src/gpu/gr_unittests.cpp index f586a94be7..cf298cc199 100644 --- a/src/gpu/gr_unittests.cpp +++ b/src/gpu/gr_unittests.cpp @@ -74,7 +74,7 @@ static void test_binHashKey() void gr_run_unittests() { - GR_DEBUGCODE(test_bsearch();) + SkDEBUGCODE(test_bsearch();) test_binHashKey(); GrRedBlackTree<int>::UnitTest(); } |