make skpaint2grpaint functions be local to skgpudevice.cpp

Review URL: http://codereview.appspot.com/5726061/



git-svn-id: http://skia.googlecode.com/svn/trunk@3322 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h
index 6663ed5..46c15d6 100644
--- a/include/gpu/SkGpuDevice.h
+++ b/include/gpu/SkGpuDevice.h
@@ -114,6 +114,8 @@
                              const SkMatrix& ctm,
                              SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
 
+    class SkAutoCachedTexture; // used internally
+
 protected:
     typedef GrContext::TextureCacheEntry TexCache;
     enum TexType {
@@ -128,29 +130,11 @@
                                 const GrSamplerState& sampler) const;
     void unlockCachedTexture(TexCache);
 
-    class SkAutoCachedTexture {
-    public:
-        SkAutoCachedTexture();
-        SkAutoCachedTexture(SkGpuDevice* device,
-                            const SkBitmap& bitmap,
-                            const GrSamplerState* sampler,
-                            GrTexture** texture);
-        ~SkAutoCachedTexture();
-
-        GrTexture* set(SkGpuDevice*, const SkBitmap&, const GrSamplerState*);
-
-    private:
-        SkGpuDevice*    fDevice;
-        TexCache        fTex;
-    };
-    friend class SkAutoTexCache;
-
     // overrides from SkDevice
     virtual bool onReadPixels(const SkBitmap& bitmap,
                               int x, int y,
                               SkCanvas::Config8888 config8888) SK_OVERRIDE;
 
-
 private:
     GrContext*      fContext;
 
@@ -166,30 +150,6 @@
     // called from rt and tex cons
     void initFromRenderTarget(GrContext*, GrRenderTarget*);
 
-    // doesn't set the texture/sampler/matrix state
-    // caller needs to null out GrPaint's texture if
-    // non-textured drawing is desired.
-    // Set constantColor to true if a constant color
-    // will be used.  This is an optimization, and can
-    // always be set to false. constantColor should
-    // never be true if justAlpha is true.
-    bool skPaint2GrPaintNoShader(const SkPaint& skPaint,
-                                 bool justAlpha,
-                                 GrPaint* grPaint,
-                                 bool constantColor);
-
-    // uses the SkShader to setup paint, act used to
-    // hold lock on cached texture and free it when
-    // destroyed.
-    // If there is no shader, constantColor will
-    // be passed to skPaint2GrPaintNoShader.  Otherwise
-    // it is ignored.
-    bool skPaint2GrPaintShader(const SkPaint& skPaint,
-                               SkAutoCachedTexture* act,
-                               const SkMatrix& ctm,
-                               GrPaint* grPaint,
-                               bool constantColor);
-
     // override from SkDevice
     virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config config,
                                                int width, int height,