can't make the compute-bounds methods private yet :(
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 16 May 2012 14:15:02 +0000 (14:15 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 16 May 2012 14:15:02 +0000 (14:15 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@3969 2bbb7eff-a529-9590-31e7-b0007b416f81

include/core/SkPaint.h

index 8fcfda2..134d4bf 100644 (file)
@@ -829,47 +829,9 @@ public:
     // mean that we need not draw at all (e.g. SrcOver + 0-alpha)
     bool nothingToDraw() const;
 
-private:
-    SkTypeface*     fTypeface;
-    SkScalar        fTextSize;
-    SkScalar        fTextScaleX;
-    SkScalar        fTextSkewX;
-
-    SkPathEffect*   fPathEffect;
-    SkShader*       fShader;
-    SkXfermode*     fXfermode;
-    SkMaskFilter*   fMaskFilter;
-    SkColorFilter*  fColorFilter;
-    SkRasterizer*   fRasterizer;
-    SkDrawLooper*   fLooper;
-    SkImageFilter*  fImageFilter;
-
-    SkColor         fColor;
-    SkScalar        fWidth;
-    SkScalar        fMiterLimit;
-    unsigned        fFlags : 15;
-    unsigned        fTextAlign : 2;
-    unsigned        fCapType : 2;
-    unsigned        fJoinType : 2;
-    unsigned        fStyle : 2;
-    unsigned        fTextEncoding : 2;  // 3 values
-    unsigned        fHinting : 2;
-
-    SkDrawCacheProc    getDrawCacheProc() const;
-    SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir,
-                                           bool needFullMetrics) const;
-
-    SkScalar measure_text(SkGlyphCache*, const char* text, size_t length,
-                          int* count, SkRect* bounds) const;
-
-    SkGlyphCache*   detachCache(const SkMatrix*) const;
-
-    void descriptorProc(const SkMatrix* deviceMatrix,
-                        void (*proc)(const SkDescriptor*, void*),
-                        void* context, bool ignoreGamma = false) const;
-
     ///////////////////////////////////////////////////////////////////////////
-    
+    // would prefer to make these private...
+
     /** Returns true if the current paint settings allow for fast computation of
      bounds (i.e. there is nothing complex like a patheffect that would make
      the bounds computation expensive.
@@ -926,8 +888,45 @@ private:
     // without having to make a copy of the paint just to change that field.
     const SkRect& doComputeFastBounds(const SkRect& orig, SkRect* storage,
                                       Style) const;
+    
+private:
+    SkTypeface*     fTypeface;
+    SkScalar        fTextSize;
+    SkScalar        fTextScaleX;
+    SkScalar        fTextSkewX;
 
-    ///////////////////////////////////////////////////////////////////////////
+    SkPathEffect*   fPathEffect;
+    SkShader*       fShader;
+    SkXfermode*     fXfermode;
+    SkMaskFilter*   fMaskFilter;
+    SkColorFilter*  fColorFilter;
+    SkRasterizer*   fRasterizer;
+    SkDrawLooper*   fLooper;
+    SkImageFilter*  fImageFilter;
+
+    SkColor         fColor;
+    SkScalar        fWidth;
+    SkScalar        fMiterLimit;
+    unsigned        fFlags : 15;
+    unsigned        fTextAlign : 2;
+    unsigned        fCapType : 2;
+    unsigned        fJoinType : 2;
+    unsigned        fStyle : 2;
+    unsigned        fTextEncoding : 2;  // 3 values
+    unsigned        fHinting : 2;
+
+    SkDrawCacheProc    getDrawCacheProc() const;
+    SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir,
+                                           bool needFullMetrics) const;
+
+    SkScalar measure_text(SkGlyphCache*, const char* text, size_t length,
+                          int* count, SkRect* bounds) const;
+
+    SkGlyphCache*   detachCache(const SkMatrix*) const;
+
+    void descriptorProc(const SkMatrix* deviceMatrix,
+                        void (*proc)(const SkDescriptor*, void*),
+                        void* context, bool ignoreGamma = false) const;
 
     enum {
         kCanonicalTextSizeForPaths = 64
@@ -935,8 +934,6 @@ private:
     friend class SkAutoGlyphCache;
     friend class SkCanvas;
     friend class SkDraw;
-    friend class SkDrawLooper;      // computeFastBounds
-    friend class SkPictureRecord;   // computeFastBounds
     friend class SkPDFDevice;
     friend class SkTextToPathIter;