rename XHelper members to onX
Review URL: http://codereview.appspot.com/4380056/
git-svn-id: http://skia.googlecode.com/svn/trunk@1113 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/include/GrDrawTarget.h b/gpu/include/GrDrawTarget.h
index 33469a3..349cafd 100644
--- a/gpu/include/GrDrawTarget.h
+++ b/gpu/include/GrDrawTarget.h
@@ -1003,20 +1003,20 @@
{ return sds.fState; }
// implemented by subclass
- virtual bool acquireGeometryHelper(GrVertexLayout vertexLayout,
- void** vertices,
- void** indices) = 0;
+ virtual bool onAcquireGeometry(GrVertexLayout vertexLayout,
+ void** vertices,
+ void** indices) = 0;
- virtual void releaseGeometryHelper() = 0;
+ virtual void onReleaseGeometry() = 0;
// subclass overrides to be notified when clip is set.
virtual void clipWillBeSet(const GrClip& clip) = 0;
- virtual void setVertexSourceToArrayHelper(const void* vertexArray,
- int vertexCount) = 0;
+ virtual void onSetVertexSourceToArray(const void* vertexArray,
+ int vertexCount) = 0;
- virtual void setIndexSourceToArrayHelper(const void* indexArray,
- int indexCount) = 0;
+ virtual void onSetIndexSourceToArray(const void* indexArray,
+ int indexCount) = 0;
// Helpers for drawRect, protected so subclasses that override drawRect
// can use them.
diff --git a/gpu/include/GrGpu.h b/gpu/include/GrGpu.h
index 705bf3c..61dae2c 100644
--- a/gpu/include/GrGpu.h
+++ b/gpu/include/GrGpu.h
@@ -464,16 +464,16 @@
int fCurrPoolStartIndex;
// GrDrawTarget overrides
- virtual bool acquireGeometryHelper(GrVertexLayout vertexLayout,
- void** vertices,
- void** indices);
- virtual void releaseGeometryHelper();
+ virtual bool onAcquireGeometry(GrVertexLayout vertexLayout,
+ void** vertices,
+ void** indices);
+ virtual void onReleaseGeometry();
- virtual void setVertexSourceToArrayHelper(const void* vertexArray,
- int vertexCount);
+ virtual void onSetVertexSourceToArray(const void* vertexArray,
+ int vertexCount);
- virtual void setIndexSourceToArrayHelper(const void* indexArray,
- int indexCount);
+ virtual void onSetIndexSourceToArray(const void* indexArray,
+ int indexCount);
// Helpers for setting up geometry state
void finalizeReservedVertices();
void finalizeReservedIndices();
@@ -483,37 +483,37 @@
virtual void resetContext() = 0;
// overridden by API-specific derived class to create objects.
- virtual GrTexture* createTextureHelper(const TextureDesc& desc,
- const void* srcData,
- size_t rowBytes) = 0;
+ virtual GrTexture* onCreateTexture(const TextureDesc& desc,
+ const void* srcData,
+ size_t rowBytes) = 0;
virtual GrResource* onCreatePlatformSurface(const GrPlatformSurfaceDesc& desc) = 0;
- virtual GrRenderTarget* createPlatformRenderTargetHelper(
+ virtual GrRenderTarget* onCreatePlatformRenderTarget(
intptr_t platformRenderTarget,
int stencilBits,
bool isMultisampled,
int width, int height) = 0;
- virtual GrRenderTarget* createRenderTargetFrom3DApiStateHelper() = 0;
- virtual GrVertexBuffer* createVertexBufferHelper(uint32_t size,
- bool dynamic) = 0;
- virtual GrIndexBuffer* createIndexBufferHelper(uint32_t size,
- bool dynamic) = 0;
+ virtual GrRenderTarget* onCreateRenderTargetFrom3DApiState() = 0;
+ virtual GrVertexBuffer* onCreateVertexBuffer(uint32_t size,
+ bool dynamic) = 0;
+ virtual GrIndexBuffer* onCreateIndexBuffer(uint32_t size,
+ bool dynamic) = 0;
// overridden by API-specific derivated class to perform the erase.
- virtual void eraseColorHelper(GrColor color) = 0;
+ virtual void onEraseColor(GrColor color) = 0;
// overridden by API-specific derived class to perform the draw call.
- virtual void drawIndexedHelper(GrPrimitiveType type,
- uint32_t startVertex,
- uint32_t startIndex,
- uint32_t vertexCount,
- uint32_t indexCount) = 0;
+ virtual void onDrawIndexed(GrPrimitiveType type,
+ uint32_t startVertex,
+ uint32_t startIndex,
+ uint32_t vertexCount,
+ uint32_t indexCount) = 0;
- virtual void drawNonIndexedHelper(GrPrimitiveType type,
- uint32_t vertexCount,
- uint32_t numVertices) = 0;
+ virtual void onDrawNonIndexed(GrPrimitiveType type,
+ uint32_t vertexCount,
+ uint32_t numVertices) = 0;
// overridden by API-specific derived class to perform flush
- virtual void forceRenderTargetFlushHelper() = 0;
+ virtual void onForceRenderTargetFlush() = 0;
// overridden by API-specific derived class to perform the read pixels.
virtual bool onReadPixels(GrRenderTarget* target,
diff --git a/gpu/include/GrInOrderDrawBuffer.h b/gpu/include/GrInOrderDrawBuffer.h
index 79ec458..9d3f91a 100644
--- a/gpu/include/GrInOrderDrawBuffer.h
+++ b/gpu/include/GrInOrderDrawBuffer.h
@@ -115,17 +115,17 @@
const GrIndexBuffer* fIndexBuffer;
};
- virtual bool acquireGeometryHelper(GrVertexLayout vertexLayout,
- void** vertices,
- void** indices);
- virtual void releaseGeometryHelper();
+ virtual bool onAcquireGeometry(GrVertexLayout vertexLayout,
+ void** vertices,
+ void** indices);
+ virtual void onReleaseGeometry();
virtual void clipWillBeSet(const GrClip& newClip);
- virtual void setVertexSourceToArrayHelper(const void* vertexArray,
- int vertexCount);
+ virtual void onSetVertexSourceToArray(const void* vertexArray,
+ int vertexCount);
- virtual void setIndexSourceToArrayHelper(const void* indexArray,
- int indexCount);
+ virtual void onSetIndexSourceToArray(const void* indexArray,
+ int indexCount);
bool needsNewState() const;
bool needsNewClip() const;
diff --git a/gpu/include/GrPathRenderer.h b/gpu/include/GrPathRenderer.h
index 25bb748..91d9086 100644
--- a/gpu/include/GrPathRenderer.h
+++ b/gpu/include/GrPathRenderer.h
@@ -147,12 +147,12 @@
const GrPoint* translate);
private:
- void drawPathHelper(GrDrawTarget* target,
- GrDrawTarget::StageBitfield stages,
- GrPathIter* path,
- GrPathFill fill,
- const GrPoint* translate,
- bool stencilOnly);
+ void onDrawPath(GrDrawTarget* target,
+ GrDrawTarget::StageBitfield stages,
+ GrPathIter* path,
+ GrPathFill fill,
+ const GrPoint* translate,
+ bool stencilOnly);
bool fSeparateStencil;
bool fStencilWrapOps;
diff --git a/gpu/src/GrDrawTarget.cpp b/gpu/src/GrDrawTarget.cpp
index bf4b91d..1413c6d 100644
--- a/gpu/src/GrDrawTarget.cpp
+++ b/gpu/src/GrDrawTarget.cpp
@@ -402,9 +402,9 @@
fReservedGeometry.fVertexCount = vertexCount;
fReservedGeometry.fIndexCount = indexCount;
- fReservedGeometry.fLocked = acquireGeometryHelper(vertexLayout,
- vertices,
- indices);
+ fReservedGeometry.fLocked = this->onAcquireGeometry(vertexLayout,
+ vertices,
+ indices);
if (fReservedGeometry.fLocked) {
if (vertexCount) {
fGeometrySrc.fVertexSrc = kReserved_GeometrySrcType;
@@ -432,7 +432,7 @@
void GrDrawTarget::releaseReservedGeometry() {
GrAssert(fReservedGeometry.fLocked);
- releaseGeometryHelper();
+ this->onReleaseGeometry();
fReservedGeometry.fLocked = false;
}
@@ -441,13 +441,13 @@
int vertexCount) {
fGeometrySrc.fVertexSrc = kArray_GeometrySrcType;
fGeometrySrc.fVertexLayout = vertexLayout;
- setVertexSourceToArrayHelper(vertexArray, vertexCount);
+ this->onSetVertexSourceToArray(vertexArray, vertexCount);
}
void GrDrawTarget::setIndexSourceToArray(const void* indexArray,
int indexCount) {
fGeometrySrc.fIndexSrc = kArray_GeometrySrcType;
- setIndexSourceToArrayHelper(indexArray, indexCount);
+ this->onSetIndexSourceToArray(indexArray, indexCount);
}
void GrDrawTarget::setVertexSourceToBuffer(GrVertexLayout vertexLayout,
diff --git a/gpu/src/GrGpu.cpp b/gpu/src/GrGpu.cpp
index 2407cdf..43fe648 100644
--- a/gpu/src/GrGpu.cpp
+++ b/gpu/src/GrGpu.cpp
@@ -139,7 +139,7 @@
GrTexture* GrGpu::createTexture(const TextureDesc& desc,
const void* srcData, size_t rowBytes) {
this->handleDirtyContext();
- return this->createTextureHelper(desc, srcData, rowBytes);
+ return this->onCreateTexture(desc, srcData, rowBytes);
}
GrRenderTarget* GrGpu::createPlatformRenderTarget(intptr_t platformRenderTarget,
@@ -147,7 +147,7 @@
bool isMultisampled,
int width, int height) {
this->handleDirtyContext();
- return this->createPlatformRenderTargetHelper(platformRenderTarget,
+ return this->onCreatePlatformRenderTarget(platformRenderTarget,
stencilBits,
isMultisampled,
width, height);
@@ -155,7 +155,7 @@
GrRenderTarget* GrGpu::createRenderTargetFrom3DApiState() {
this->handleDirtyContext();
- return this->createRenderTargetFrom3DApiStateHelper();
+ return this->onCreateRenderTargetFrom3DApiState();
}
GrResource* GrGpu::createPlatformSurface(const GrPlatformSurfaceDesc& desc) {
@@ -165,22 +165,22 @@
GrVertexBuffer* GrGpu::createVertexBuffer(uint32_t size, bool dynamic) {
this->handleDirtyContext();
- return this->createVertexBufferHelper(size, dynamic);
+ return this->onCreateVertexBuffer(size, dynamic);
}
GrIndexBuffer* GrGpu::createIndexBuffer(uint32_t size, bool dynamic) {
this->handleDirtyContext();
- return this->createIndexBufferHelper(size, dynamic);
+ return this->onCreateIndexBuffer(size, dynamic);
}
void GrGpu::eraseColor(GrColor color) {
this->handleDirtyContext();
- this->eraseColorHelper(color);
+ this->onEraseColor(color);
}
void GrGpu::forceRenderTargetFlush() {
this->handleDirtyContext();
- this->forceRenderTargetFlushHelper();
+ this->onForceRenderTargetFlush();
}
bool GrGpu::readPixels(GrRenderTarget* target,
@@ -598,8 +598,8 @@
int sIndex = startIndex;
setupGeometry(&sVertex, &sIndex, vertexCount, indexCount);
- drawIndexedHelper(type, sVertex, sIndex,
- vertexCount, indexCount);
+ this->onDrawIndexed(type, sVertex, sIndex,
+ vertexCount, indexCount);
}
void GrGpu::drawNonIndexed(GrPrimitiveType type,
@@ -621,7 +621,7 @@
int sVertex = startVertex;
setupGeometry(&sVertex, NULL, vertexCount, 0);
- drawNonIndexedHelper(type, sVertex, vertexCount);
+ this->onDrawNonIndexed(type, sVertex, vertexCount);
}
void GrGpu::finalizeReservedVertices() {
@@ -656,9 +656,9 @@
}
}
-bool GrGpu::acquireGeometryHelper(GrVertexLayout vertexLayout,
- void** vertices,
- void** indices) {
+bool GrGpu::onAcquireGeometry(GrVertexLayout vertexLayout,
+ void** vertices,
+ void** indices) {
GrAssert(!fReservedGeometry.fLocked);
size_t reservedVertexSpace = 0;
@@ -694,11 +694,11 @@
return true;
}
-void GrGpu::releaseGeometryHelper() {}
+void GrGpu::onReleaseGeometry() {}
-void GrGpu::setVertexSourceToArrayHelper(const void* vertexArray, int vertexCount) {
+void GrGpu::onSetVertexSourceToArray(const void* vertexArray, int vertexCount) {
GrAssert(!fReservedGeometry.fLocked || !fReservedGeometry.fVertexCount);
- prepareVertexPool();
+ this->prepareVertexPool();
#if GR_DEBUG
bool success =
#endif
@@ -710,9 +710,9 @@
GR_DEBUGASSERT(success);
}
-void GrGpu::setIndexSourceToArrayHelper(const void* indexArray, int indexCount) {
+void GrGpu::onSetIndexSourceToArray(const void* indexArray, int indexCount) {
GrAssert(!fReservedGeometry.fLocked || !fReservedGeometry.fIndexCount);
- prepareIndexPool();
+ this->prepareIndexPool();
#if GR_DEBUG
bool success =
#endif
diff --git a/gpu/src/GrGpuGL.cpp b/gpu/src/GrGpuGL.cpp
index 7e88ede..fe461cc 100644
--- a/gpu/src/GrGpuGL.cpp
+++ b/gpu/src/GrGpuGL.cpp
@@ -602,7 +602,7 @@
}
}
-GrRenderTarget* GrGpuGL::createPlatformRenderTargetHelper(
+GrRenderTarget* GrGpuGL::onCreatePlatformRenderTarget(
intptr_t platformRenderTarget,
int stencilBits,
bool isMultisampled,
@@ -628,7 +628,7 @@
isMultisampled, viewport, NULL);
}
-GrRenderTarget* GrGpuGL::createRenderTargetFrom3DApiStateHelper() {
+GrRenderTarget* GrGpuGL::onCreateRenderTargetFrom3DApiState() {
GrGLRenderTarget::GLRenderTargetIDs rtIDs;
@@ -699,15 +699,15 @@
}
#endif
-GrTexture* GrGpuGL::createTextureHelper(const TextureDesc& desc,
- const void* srcData,
- size_t rowBytes) {
+GrTexture* GrGpuGL::onCreateTexture(const TextureDesc& desc,
+ const void* srcData,
+ size_t rowBytes) {
#if GR_COLLECT_STATS
++fStats.fTextureCreateCnt;
#endif
- setSpareTextureUnit();
+ this->setSpareTextureUnit();
static const GrGLTexture::TexParams DEFAULT_PARAMS = {
GR_GL_NEAREST,
@@ -1087,7 +1087,7 @@
return tex;
}
-GrVertexBuffer* GrGpuGL::createVertexBufferHelper(uint32_t size, bool dynamic) {
+GrVertexBuffer* GrGpuGL::onCreateVertexBuffer(uint32_t size, bool dynamic) {
GrGLuint id;
GR_GL(GenBuffers(1, &id));
if (id) {
@@ -1111,7 +1111,7 @@
return NULL;
}
-GrIndexBuffer* GrGpuGL::createIndexBufferHelper(uint32_t size, bool dynamic) {
+GrIndexBuffer* GrGpuGL::onCreateIndexBuffer(uint32_t size, bool dynamic) {
GrGLuint id;
GR_GL(GenBuffers(1, &id));
if (id) {
@@ -1165,7 +1165,7 @@
}
}
-void GrGpuGL::eraseColorHelper(GrColor color) {
+void GrGpuGL::onEraseColor(GrColor color) {
if (NULL == fCurrDrawState.fRenderTarget) {
return;
}
@@ -1220,7 +1220,7 @@
fHWDrawState.fStencilSettings.invalidate();
}
-void GrGpuGL::forceRenderTargetFlushHelper() {
+void GrGpuGL::onForceRenderTargetFlush() {
flushRenderTarget();
}
@@ -1339,11 +1339,11 @@
#endif
#endif
-void GrGpuGL::drawIndexedHelper(GrPrimitiveType type,
- uint32_t startVertex,
- uint32_t startIndex,
- uint32_t vertexCount,
- uint32_t indexCount) {
+void GrGpuGL::onDrawIndexed(GrPrimitiveType type,
+ uint32_t startVertex,
+ uint32_t startIndex,
+ uint32_t vertexCount,
+ uint32_t indexCount) {
GrAssert((size_t)type < GR_ARRAY_COUNT(gPrimitiveType2GLMode));
GrGLvoid* indices = (GrGLvoid*)(sizeof(uint16_t) * startIndex);
@@ -1371,9 +1371,9 @@
#endif
}
-void GrGpuGL::drawNonIndexedHelper(GrPrimitiveType type,
- uint32_t startVertex,
- uint32_t vertexCount) {
+void GrGpuGL::onDrawNonIndexed(GrPrimitiveType type,
+ uint32_t startVertex,
+ uint32_t vertexCount) {
GrAssert((size_t)type < GR_ARRAY_COUNT(gPrimitiveType2GLMode));
GrAssert(NULL != fHWGeometryState.fVertexBuffer);
diff --git a/gpu/src/GrGpuGL.h b/gpu/src/GrGpuGL.h
index cffa671..eaeec5e 100644
--- a/gpu/src/GrGpuGL.h
+++ b/gpu/src/GrGpuGL.h
@@ -72,35 +72,35 @@
// overrides from GrGpu
virtual void resetContext();
- virtual GrTexture* createTextureHelper(const TextureDesc& desc,
- const void* srcData,
- size_t rowBytes);
- virtual GrVertexBuffer* createVertexBufferHelper(uint32_t size,
- bool dynamic);
- virtual GrIndexBuffer* createIndexBufferHelper(uint32_t size,
- bool dynamic);
+ virtual GrTexture* onCreateTexture(const TextureDesc& desc,
+ const void* srcData,
+ size_t rowBytes);
+ virtual GrVertexBuffer* onCreateVertexBuffer(uint32_t size,
+ bool dynamic);
+ virtual GrIndexBuffer* onCreateIndexBuffer(uint32_t size,
+ bool dynamic);
virtual GrResource* onCreatePlatformSurface(const GrPlatformSurfaceDesc& desc);
- virtual GrRenderTarget* createPlatformRenderTargetHelper(
+ virtual GrRenderTarget* onCreatePlatformRenderTarget(
intptr_t platformRenderTarget,
int stencilBits,
bool isMultisampled,
int width, int height);
- virtual GrRenderTarget* createRenderTargetFrom3DApiStateHelper();
+ virtual GrRenderTarget* onCreateRenderTargetFrom3DApiState();
- virtual void eraseColorHelper(GrColor color);
+ virtual void onEraseColor(GrColor color);
- virtual void forceRenderTargetFlushHelper();
+ virtual void onForceRenderTargetFlush();
virtual bool onReadPixels(GrRenderTarget* target,
int left, int top, int width, int height,
GrPixelConfig, void* buffer);
- virtual void drawIndexedHelper(GrPrimitiveType type,
+ virtual void onDrawIndexed(GrPrimitiveType type,
uint32_t startVertex,
uint32_t startIndex,
uint32_t vertexCount,
uint32_t indexCount);
- virtual void drawNonIndexedHelper(GrPrimitiveType type,
+ virtual void onDrawNonIndexed(GrPrimitiveType type,
uint32_t vertexCount,
uint32_t numVertices);
virtual void flushScissor(const GrIRect* rect);
diff --git a/gpu/src/GrGpuGLShaders.cpp b/gpu/src/GrGpuGLShaders.cpp
index 37931e3..b34fc33 100644
--- a/gpu/src/GrGpuGLShaders.cpp
+++ b/gpu/src/GrGpuGLShaders.cpp
@@ -146,7 +146,7 @@
GrGpuGLShaders::GrGpuGLShaders() {
- resetContextHelper();
+ resetContext();
fProgramData = NULL;
fProgramCache = new ProgramCache();
@@ -176,10 +176,7 @@
void GrGpuGLShaders::resetContext() {
INHERITED::resetContext();
- resetContextHelper();
-}
-void GrGpuGLShaders::resetContextHelper() {
fHWGeometryState.fVertexLayout = 0;
fHWGeometryState.fVertexOffset = ~0;
GR_GL(DisableVertexAttribArray(COL_ATTR_LOCATION));
diff --git a/gpu/src/GrGpuGLShaders.h b/gpu/src/GrGpuGLShaders.h
index dd6ea5d..ee29533 100644
--- a/gpu/src/GrGpuGLShaders.h
+++ b/gpu/src/GrGpuGLShaders.h
@@ -44,8 +44,6 @@
class ProgramCache;
- void resetContextHelper();
-
// Helpers to make code more readable
const GrMatrix& getHWSamplerMatrix(int stage);
void recordHWSamplerMatrix(int stage, const GrMatrix& matrix);
diff --git a/gpu/src/GrInOrderDrawBuffer.cpp b/gpu/src/GrInOrderDrawBuffer.cpp
index 8191814..be4db99 100644
--- a/gpu/src/GrInOrderDrawBuffer.cpp
+++ b/gpu/src/GrInOrderDrawBuffer.cpp
@@ -398,9 +398,9 @@
return flush;
}
-bool GrInOrderDrawBuffer::acquireGeometryHelper(GrVertexLayout vertexLayout,
- void** vertices,
- void** indices) {
+bool GrInOrderDrawBuffer::onAcquireGeometry(GrVertexLayout vertexLayout,
+ void** vertices,
+ void** indices) {
GrAssert(!fReservedGeometry.fLocked);
if (fReservedGeometry.fVertexCount) {
GrAssert(NULL != vertices);
@@ -435,7 +435,7 @@
return true;
}
-void GrInOrderDrawBuffer::releaseGeometryHelper() {
+void GrInOrderDrawBuffer::onReleaseGeometry() {
GrAssert(fUsedReservedVertexBytes <= fReservedVertexBytes);
GrAssert(fUsedReservedIndexBytes <= fReservedIndexBytes);
@@ -454,8 +454,8 @@
}
-void GrInOrderDrawBuffer::setVertexSourceToArrayHelper(const void* vertexArray,
- int vertexCount) {
+void GrInOrderDrawBuffer::onSetVertexSourceToArray(const void* vertexArray,
+ int vertexCount) {
GrAssert(!fReservedGeometry.fLocked || !fReservedGeometry.fVertexCount);
#if GR_DEBUG
bool success =
@@ -468,8 +468,8 @@
GR_DEBUGASSERT(success);
}
-void GrInOrderDrawBuffer::setIndexSourceToArrayHelper(const void* indexArray,
- int indexCount) {
+void GrInOrderDrawBuffer::onSetIndexSourceToArray(const void* indexArray,
+ int indexCount) {
GrAssert(!fReservedGeometry.fLocked || !fReservedGeometry.fIndexCount);
#if GR_DEBUG
bool success =
diff --git a/gpu/src/GrPathRenderer.cpp b/gpu/src/GrPathRenderer.cpp
index f226a99..317b7d3 100644
--- a/gpu/src/GrPathRenderer.cpp
+++ b/gpu/src/GrPathRenderer.cpp
@@ -177,12 +177,12 @@
return !single_pass_path(*target, *path, fill);
}
-void GrDefaultPathRenderer::drawPathHelper(GrDrawTarget* target,
- GrDrawTarget::StageBitfield stages,
- GrPathIter* path,
- GrPathFill fill,
- const GrPoint* translate,
- bool stencilOnly) {
+void GrDefaultPathRenderer::onDrawPath(GrDrawTarget* target,
+ GrDrawTarget::StageBitfield stages,
+ GrPathIter* path,
+ GrPathFill fill,
+ const GrPoint* translate,
+ bool stencilOnly) {
GrDrawTarget::AutoStateRestore asr(target);
bool colorWritesWereDisabled = target->isColorWriteDisabled();
@@ -434,7 +434,7 @@
GrPathIter* path,
GrPathFill fill,
const GrPoint* translate) {
- this->drawPathHelper(target, stages, path, fill, translate, false);
+ this->onDrawPath(target, stages, path, fill, translate, false);
}
void GrDefaultPathRenderer::drawPathToStencil(GrDrawTarget* target,
@@ -443,5 +443,5 @@
const GrPoint* translate) {
GrAssert(kInverseEvenOdd_PathFill != fill);
GrAssert(kInverseWinding_PathFill != fill);
- this->drawPathHelper(target, 0, path, fill, translate, true);
+ this->onDrawPath(target, 0, path, fill, translate, true);
}
diff --git a/gpu/src/GrRedBlackTree.h b/gpu/src/GrRedBlackTree.h
index 7ba326f..b57ce9e 100644
--- a/gpu/src/GrRedBlackTree.h
+++ b/gpu/src/GrRedBlackTree.h
@@ -163,7 +163,7 @@
void deleteAtNode(Node* x);
static void RecursiveDelete(Node* x);
- int countOfHelper(const Node* n, const T& t) const;
+ int onCountOf(const Node* n, const T& t) const;
#if GR_DEBUG
void validate() const;
@@ -312,11 +312,11 @@
template <typename T, typename C>
int GrRedBlackTree<T,C>::countOf(const T& t) const {
- return countOfHelper(fRoot, t);
+ return onCountOf(fRoot, t);
}
template <typename T, typename C>
-int GrRedBlackTree<T,C>::countOfHelper(const Node* n, const T& t) const {
+int GrRedBlackTree<T,C>::onCountOf(const Node* n, const T& t) const {
// this is count*log(n) :(
while (NULL != n) {
if (fComp(t, n->fItem)) {
@@ -324,8 +324,8 @@
} else {
if (!fComp(n->fItem, t)) {
int count = 1;
- count += countOfHelper(n->fChildren[kLeft_Child], t);
- count += countOfHelper(n->fChildren[kRight_Child], t);
+ count += onCountOf(n->fChildren[kLeft_Child], t);
+ count += onCountOf(n->fChildren[kRight_Child], t);
return count;
}
n = n->fChildren[kRight_Child];