simple cl to cleanup friends in GrGpu

BUG=skia:

Review URL: https://codereview.chromium.org/709003006
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 89300f7..82f1e60 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -687,7 +687,6 @@
     if (this->caps()->gpuTracingSupport()) {
         SkASSERT(fGpuTraceMarkerCount >= 0);
         this->fActiveTraceMarkers.add(*marker);
-        this->didAddGpuTraceMarker();
         ++fGpuTraceMarkerCount;
     }
 }
@@ -696,7 +695,6 @@
     if (this->caps()->gpuTracingSupport()) {
         SkASSERT(fGpuTraceMarkerCount >= 1);
         this->fActiveTraceMarkers.remove(*marker);
-        this->didRemoveGpuTraceMarker();
         --fGpuTraceMarkerCount;
     }
 }
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 74be646..41f9b36 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -885,9 +885,6 @@
                          GrRenderTarget* renderTarget) = 0;
 
 
-    virtual void didAddGpuTraceMarker() = 0;
-    virtual void didRemoveGpuTraceMarker() = 0;
-
     // helpers for reserving vertex and index space.
     bool reserveVertexSpace(size_t vertexSize,
                             int vertexCount,
@@ -926,10 +923,6 @@
     GrTraceMarkerSet                                                fActiveTraceMarkers;
     GrTraceMarkerSet                                                fStoredTraceMarkers;
 
-    // TODO fix this
-    friend class GrGpu;
-    friend class GrGpuGL;
-
     typedef SkRefCnt INHERITED;
 };
 
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index e9bf000..64ee29b 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -184,7 +184,7 @@
                   GrRenderTarget* renderTarget) {
     SkASSERT(renderTarget);
     this->handleDirtyContext();
-    this->onGpuClear(renderTarget, rect, color, canIgnoreRect);
+    this->onClear(renderTarget, rect, color, canIgnoreRect);
 }
 
 void GrGpu::clearStencilClip(const SkIRect& rect,
@@ -323,7 +323,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 
-void GrGpu::onDraw(const GrDrawTarget::DrawInfo& info,
+void GrGpu::draw(const GrDrawTarget::DrawInfo& info,
                    const GrClipMaskManager::ScissorState& scissorState) {
     this->handleDirtyContext();
     if (!this->flushGraphicsState(PrimTypeToDrawType(info.primitiveType()),
@@ -331,10 +331,10 @@
                                   info.getDstCopy())) {
         return;
     }
-    this->onGpuDraw(info);
+    this->onDraw(info);
 }
 
-void GrGpu::onStencilPath(const GrPath* path,
+void GrGpu::stencilPath(const GrPath* path,
                           const GrClipMaskManager::ScissorState& scissorState,
                           const GrStencilSettings& stencilSettings) {
     this->handleDirtyContext();
@@ -347,7 +347,7 @@
 }
 
 
-void GrGpu::onDrawPath(const GrPath* path,
+void GrGpu::drawPath(const GrPath* path,
                        const GrClipMaskManager::ScissorState& scissorState,
                        const GrStencilSettings& stencilSettings,
                        const GrDeviceCoordTexture* dstCopy) {
@@ -360,7 +360,7 @@
     this->pathRendering()->drawPath(path, stencilSettings);
 }
 
-void GrGpu::onDrawPaths(const GrPathRange* pathRange,
+void GrGpu::drawPaths(const GrPathRange* pathRange,
                         const uint32_t indices[],
                         int count,
                         const float transforms[],
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index af3502a..5279ce8 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -412,6 +412,24 @@
      */
     void setIndexSourceToBuffer(const GrIndexBuffer* buffer);
 
+    virtual void draw(const GrDrawTarget::DrawInfo&,
+                      const GrClipMaskManager::ScissorState&);
+    virtual void stencilPath(const GrPath*,
+                             const GrClipMaskManager::ScissorState&,
+                             const GrStencilSettings&);
+    virtual void drawPath(const GrPath*,
+                          const GrClipMaskManager::ScissorState&,
+                          const GrStencilSettings&,
+                          const GrDeviceCoordTexture* dstCopy);
+    virtual void drawPaths(const GrPathRange*,
+                           const uint32_t indices[],
+                           int count,
+                           const float transforms[],
+                           GrDrawTarget::PathTransformType,
+                           const GrClipMaskManager::ScissorState&,
+                           const GrStencilSettings&,
+                           const GrDeviceCoordTexture*);
+
 protected:
     DrawType PrimTypeToDrawType(GrPrimitiveType type) {
         switch (type) {
@@ -484,8 +502,8 @@
     virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) = 0;
 
     // overridden by backend-specific derived class to perform the clear.
-    virtual void onGpuClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
-                            bool canIgnoreRect) = 0;
+    virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
+                         bool canIgnoreRect) = 0;
 
 
     // Overridden by backend specific classes to perform a clear of the stencil clip bits.  This is
@@ -495,7 +513,7 @@
                                     bool insideClip) = 0;
 
     // overridden by backend-specific derived class to perform the draw call.
-    virtual void onGpuDraw(const GrDrawTarget::DrawInfo&) = 0;
+    virtual void onDraw(const GrDrawTarget::DrawInfo&) = 0;
 
     // overridden by backend-specific derived class to perform the read pixels.
     virtual bool onReadPixels(GrRenderTarget* target,
@@ -535,25 +553,6 @@
     // Given a rt, find or create a stencil buffer and attach it
     bool attachStencilBufferToRenderTarget(GrRenderTarget* target);
 
-    // GrDrawTarget overrides
-    virtual void onDraw(const GrDrawTarget::DrawInfo&,
-                        const GrClipMaskManager::ScissorState&);
-    virtual void onStencilPath(const GrPath*,
-                               const GrClipMaskManager::ScissorState&,
-                               const GrStencilSettings&);
-    virtual void onDrawPath(const GrPath*,
-                            const GrClipMaskManager::ScissorState&,
-                            const GrStencilSettings&,
-                            const GrDeviceCoordTexture* dstCopy);
-    virtual void onDrawPaths(const GrPathRange*,
-                             const uint32_t indices[],
-                             int count,
-                             const float transforms[],
-                             GrDrawTarget::PathTransformType,
-                             const GrClipMaskManager::ScissorState&,
-                             const GrStencilSettings&,
-                             const GrDeviceCoordTexture*);
-
     virtual void didAddGpuTraceMarker() = 0;
     virtual void didRemoveGpuTraceMarker() = 0;
 
@@ -583,9 +582,6 @@
     // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu.
     GrContext*                                                          fContext;
 
-    // TODO fix this
-    friend class GrInOrderDrawBuffer;
-
     typedef SkRefCnt INHERITED;
 };
 
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 875734d..9835200 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -473,20 +473,20 @@
     if (fInfo.isIndexed()) {
         gpu->setIndexSourceToBuffer(this->indexBuffer());
     }
-    gpu->onDraw(fInfo, fScissorState);
+    gpu->draw(fInfo, fScissorState);
 }
 
 void GrInOrderDrawBuffer::StencilPath::execute(GrGpu* gpu) {
-    gpu->onStencilPath(this->path(), fScissorState, fStencilSettings);
+    gpu->stencilPath(this->path(), fScissorState, fStencilSettings);
 }
 
 void GrInOrderDrawBuffer::DrawPath::execute(GrGpu* gpu) {
-    gpu->onDrawPath(this->path(), fScissorState, fStencilSettings,
+    gpu->drawPath(this->path(), fScissorState, fStencilSettings,
                          fDstCopy.texture() ? &fDstCopy : NULL);
 }
 
 void GrInOrderDrawBuffer::DrawPaths::execute(GrGpu* gpu) {
-    gpu->onDrawPaths(this->pathRange(), this->indices(), fCount, this->transforms(),
+    gpu->drawPaths(this->pathRange(), this->indices(), fCount, this->transforms(),
                           fTransformsType, fScissorState, fStencilSettings,
                           fDstCopy.texture() ? &fDstCopy : NULL);
 }
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index 61bd513..ed62a93 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -283,9 +283,6 @@
     virtual void willReserveVertexAndIndexSpace(int vertexCount,
                                                 int indexCount) SK_OVERRIDE;
 
-    virtual void didAddGpuTraceMarker() SK_OVERRIDE {}
-    virtual void didRemoveGpuTraceMarker() SK_OVERRIDE {}
-
     // Attempts to concat instances from info onto the previous draw. info must represent an
     // instanced draw. The caller must have already recorded a new draw state and clip if necessary.
     int concatInstancedDraw(const DrawInfo& info, const GrClipMaskManager::ScissorState&);
diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp
index 5d31c15..b176d3c 100644
--- a/src/gpu/GrTest.cpp
+++ b/src/gpu/GrTest.cpp
@@ -111,14 +111,14 @@
         return NULL;
     }
 
-    virtual void onGpuClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
-                            bool canIgnoreRect)  SK_OVERRIDE { }
+    virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
+                         bool canIgnoreRect)  SK_OVERRIDE { }
 
     virtual void onClearStencilClip(GrRenderTarget*,
                                     const SkIRect& rect,
                                     bool insideClip)  SK_OVERRIDE { }
 
-    virtual void onGpuDraw(const GrDrawTarget::DrawInfo&)  SK_OVERRIDE { }
+    virtual void onDraw(const GrDrawTarget::DrawInfo&)  SK_OVERRIDE { }
     virtual bool onReadPixels(GrRenderTarget* target,
                               int left, int top, int width, int height,
                               GrPixelConfig,
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 3fc5543..888f818 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -1354,8 +1354,8 @@
     }
 }
 
-void GrGpuGL::onGpuClear(GrRenderTarget* target, const SkIRect* rect, GrColor color,
-                         bool canIgnoreRect) {
+void GrGpuGL::onClear(GrRenderTarget* target, const SkIRect* rect, GrColor color,
+                      bool canIgnoreRect) {
     // parent class should never let us get here with no RT
     SkASSERT(target);
     GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(target);
@@ -1729,7 +1729,7 @@
     #endif
 #endif
 
-void GrGpuGL::onGpuDraw(const GrDrawTarget::DrawInfo& info) {
+void GrGpuGL::onDraw(const GrDrawTarget::DrawInfo& info) {
     size_t indexOffsetInBytes;
     this->setupGeometry(info, &indexOffsetInBytes);
 
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index bba6400..fc7ad4e 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -132,8 +132,8 @@
         GrStencilBuffer* sb,
         GrRenderTarget* rt) SK_OVERRIDE;
 
-    virtual void onGpuClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
-                            bool canIgnoreRect) SK_OVERRIDE;
+    virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color,
+                         bool canIgnoreRect) SK_OVERRIDE;
 
     virtual void onClearStencilClip(GrRenderTarget*,
                                     const SkIRect& rect,
@@ -153,7 +153,7 @@
 
     virtual void onResolveRenderTarget(GrRenderTarget* target) SK_OVERRIDE;
 
-    virtual void onGpuDraw(const GrDrawTarget::DrawInfo&) SK_OVERRIDE;
+    virtual void onDraw(const GrDrawTarget::DrawInfo&) SK_OVERRIDE;
 
 
     virtual void clearStencil(GrRenderTarget*) SK_OVERRIDE;