rename XHelper members to onX
authorbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 12 Apr 2011 15:40:00 +0000 (15:40 +0000)
committerbsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 12 Apr 2011 15:40:00 +0000 (15:40 +0000)
Review URL: http://codereview.appspot.com/4380056/

git-svn-id: http://skia.googlecode.com/svn/trunk@1113 2bbb7eff-a529-9590-31e7-b0007b416f81

13 files changed:
gpu/include/GrDrawTarget.h
gpu/include/GrGpu.h
gpu/include/GrInOrderDrawBuffer.h
gpu/include/GrPathRenderer.h
gpu/src/GrDrawTarget.cpp
gpu/src/GrGpu.cpp
gpu/src/GrGpuGL.cpp
gpu/src/GrGpuGL.h
gpu/src/GrGpuGLShaders.cpp
gpu/src/GrGpuGLShaders.h
gpu/src/GrInOrderDrawBuffer.cpp
gpu/src/GrPathRenderer.cpp
gpu/src/GrRedBlackTree.h

index 33469a3..349cafd 100644 (file)
@@ -1003,20 +1003,20 @@ protected:
                                                         { 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.
index 705bf3c..61dae2c 100644 (file)
@@ -464,16 +464,16 @@ protected:
     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 @@ protected:
     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,
index 79ec458..9d3f91a 100644 (file)
@@ -115,17 +115,17 @@ private:
         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;
index 25bb748..91d9086 100644 (file)
@@ -147,12 +147,12 @@ public:
                                    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;
index bf4b91d..1413c6d 100644 (file)
@@ -402,9 +402,9 @@ bool GrDrawTarget::reserveAndLockGeometry(GrVertexLayout    vertexLayout,
     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 @@ bool GrDrawTarget::geometryHints(GrVertexLayout vertexLayout,
 
 void GrDrawTarget::releaseReservedGeometry() {
     GrAssert(fReservedGeometry.fLocked);
-    releaseGeometryHelper();
+    this->onReleaseGeometry();
     fReservedGeometry.fLocked = false;
 }
 
@@ -441,13 +441,13 @@ void GrDrawTarget::setVertexSourceToArray(GrVertexLayout vertexLayout,
                                           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,
index 2407cdf..43fe648 100644 (file)
@@ -139,7 +139,7 @@ void GrGpu::unimpl(const char msg[]) {
 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 @@ GrRenderTarget* GrGpu::createPlatformRenderTarget(intptr_t platformRenderTarget,
                                                   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::createPlatformRenderTarget(intptr_t platformRenderTarget,
 
 GrRenderTarget* GrGpu::createRenderTargetFrom3DApiState() {
     this->handleDirtyContext();
-    return this->createRenderTargetFrom3DApiStateHelper();
+    return this->onCreateRenderTargetFrom3DApiState();
 }
 
 GrResource* GrGpu::createPlatformSurface(const GrPlatformSurfaceDesc& desc) {
@@ -165,22 +165,22 @@ GrResource* GrGpu::createPlatformSurface(const GrPlatformSurfaceDesc& desc) {
 
 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 @@ void GrGpu::drawIndexed(GrPrimitiveType type,
     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 @@ void GrGpu::drawNonIndexed(GrPrimitiveType type,
     int sVertex = startVertex;
     setupGeometry(&sVertex, NULL, vertexCount, 0);
 
-    drawNonIndexedHelper(type, sVertex, vertexCount);
+    this->onDrawNonIndexed(type, sVertex, vertexCount);
 }
 
 void GrGpu::finalizeReservedVertices() {
@@ -656,9 +656,9 @@ void GrGpu::prepareIndexPool() {
     }
 }
 
-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 @@ bool GrGpu::acquireGeometryHelper(GrVertexLayout vertexLayout,
     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 @@ void GrGpu::setVertexSourceToArrayHelper(const void* vertexArray, int vertexCoun
     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
index 7e88ede..fe461cc 100644 (file)
@@ -602,7 +602,7 @@ GrResource* GrGpuGL::onCreatePlatformSurface(const GrPlatformSurfaceDesc& desc)
     }
 }
 
-GrRenderTarget* GrGpuGL::createPlatformRenderTargetHelper(
+GrRenderTarget* GrGpuGL::onCreatePlatformRenderTarget(
                                                 intptr_t platformRenderTarget,
                                                 int stencilBits,
                                                 bool isMultisampled,
@@ -628,7 +628,7 @@ GrRenderTarget* GrGpuGL::createPlatformRenderTargetHelper(
                                 isMultisampled, viewport, NULL);
 }
 
-GrRenderTarget* GrGpuGL::createRenderTargetFrom3DApiStateHelper() {
+GrRenderTarget* GrGpuGL::onCreateRenderTargetFrom3DApiState() {
 
     GrGLRenderTarget::GLRenderTargetIDs rtIDs;
 
@@ -699,15 +699,15 @@ static size_t as_size_t(int x) {
 }
 #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 @@ GrTexture* GrGpuGL::createTextureHelper(const TextureDesc& desc,
     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 @@ GrVertexBuffer* GrGpuGL::createVertexBufferHelper(uint32_t size, bool dynamic) {
     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::flushScissor(const GrIRect* rect) {
     }
 }
 
-void GrGpuGL::eraseColorHelper(GrColor color) {
+void GrGpuGL::onEraseColor(GrColor color) {
     if (NULL == fCurrDrawState.fRenderTarget) {
         return;
     }
@@ -1220,7 +1220,7 @@ void GrGpuGL::eraseStencilClip(const GrIRect& rect) {
     fHWDrawState.fStencilSettings.invalidate();
 }
 
-void GrGpuGL::forceRenderTargetFlushHelper() {
+void GrGpuGL::onForceRenderTargetFlush() {
     flushRenderTarget();
 }
 
@@ -1339,11 +1339,11 @@ GrGLenum gPrimitiveType2GLMode[] = {
     #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 @@ void GrGpuGL::drawIndexedHelper(GrPrimitiveType type,
 #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);
index cffa671..eaeec5e 100644 (file)
@@ -72,35 +72,35 @@ protected:
     // 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);
index 37931e3..b34fc33 100644 (file)
@@ -146,7 +146,7 @@ void GrGpuGLShaders::DeleteProgram(GrGLProgram::CachedData* programData) {
 
 GrGpuGLShaders::GrGpuGLShaders() {
 
-    resetContextHelper();
+    resetContext();
 
     fProgramData = NULL;
     fProgramCache = new ProgramCache();
@@ -176,10 +176,7 @@ void GrGpuGLShaders::recordHWSamplerMatrix(int stage, const GrMatrix& matrix) {
 
 void GrGpuGLShaders::resetContext() {
     INHERITED::resetContext();
-    resetContextHelper();
-}
 
-void GrGpuGLShaders::resetContextHelper() {
     fHWGeometryState.fVertexLayout = 0;
     fHWGeometryState.fVertexOffset = ~0;
     GR_GL(DisableVertexAttribArray(COL_ATTR_LOCATION));
index dd6ea5d..ee29533 100644 (file)
@@ -44,8 +44,6 @@ private:
 
     class ProgramCache;
 
-    void resetContextHelper();
-
     // Helpers to make code more readable
     const GrMatrix& getHWSamplerMatrix(int stage);
     void recordHWSamplerMatrix(int stage, const GrMatrix& matrix);
index 8191814..be4db99 100644 (file)
@@ -398,9 +398,9 @@ bool GrInOrderDrawBuffer::geometryHints(GrVertexLayout vertexLayout,
     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 @@ bool GrInOrderDrawBuffer::acquireGeometryHelper(GrVertexLayout vertexLayout,
     return true;
 }
 
-void GrInOrderDrawBuffer::releaseGeometryHelper() {
+void GrInOrderDrawBuffer::onReleaseGeometry() {
     GrAssert(fUsedReservedVertexBytes <= fReservedVertexBytes);
     GrAssert(fUsedReservedIndexBytes <= fReservedIndexBytes);
 
@@ -454,8 +454,8 @@ void GrInOrderDrawBuffer::releaseGeometryHelper() {
 
 }
 
-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 @@ void GrInOrderDrawBuffer::setVertexSourceToArrayHelper(const void* vertexArray,
     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 =
index f226a99..317b7d3 100644 (file)
@@ -177,12 +177,12 @@ bool GrDefaultPathRenderer::requiresStencilPass(const GrDrawTarget* target,
     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 @@ void GrDefaultPathRenderer::drawPath(GrDrawTarget* target,
                                      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 @@ void GrDefaultPathRenderer::drawPathToStencil(GrDrawTarget* target,
                                               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);
 }
index 7ba326f..b57ce9e 100644 (file)
@@ -163,7 +163,7 @@ private:
     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 @@ typename GrRedBlackTree<T,C>::Iter GrRedBlackTree<T,C>::findLast(const T& t) {
 
 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 @@ int GrRedBlackTree<T,C>::countOfHelper(const Node* n, const T& t) const {
         } 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];