Reverted due to Chromium compilation failures. Please see:
authorrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Sun, 20 Oct 2013 13:34:21 +0000 (13:34 +0000)
committerrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Sun, 20 Oct 2013 13:34:21 +0000 (13:34 +0000)
https://codereview.chromium.org/30973002/

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

include/core/SkFlattenable.h
include/core/SkFlattenableBuffers.h
include/effects/SkDashPathEffect.h
src/core/SkFlattenableBuffers.cpp
src/core/SkOrderedWriteBuffer.cpp
src/core/SkOrderedWriteBuffer.h
src/effects/SkColorFilters.cpp
src/effects/SkDashPathEffect.cpp

index 6cc76db..58e69fd 100644 (file)
@@ -27,10 +27,10 @@ class SkFlattenableWriteBuffer;
     }
 
 #define SK_DECLARE_UNFLATTENABLE_OBJECT() \
-    virtual Factory getFactory() const SK_OVERRIDE { return NULL; }
+    virtual Factory getFactory() SK_OVERRIDE { return NULL; }
 
 #define SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(flattenable) \
-    virtual Factory getFactory() const SK_OVERRIDE { return CreateProc; } \
+    virtual Factory getFactory() SK_OVERRIDE { return CreateProc; } \
     static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) { \
         return SkNEW_ARGS(flattenable, (buffer)); \
     }
@@ -53,7 +53,7 @@ public:
      to recreate your class given a buffer (previously written to by your
      override of flatten().
      */
-    virtual Factory getFactory() const = 0;
+    virtual Factory getFactory() = 0;
 
     static Factory NameToFactory(const char name[]);
     static const char* FactoryToName(Factory);
index d71f7c0..51016c7 100644 (file)
@@ -182,7 +182,7 @@ public:
                                     SkPaint::TextEncoding encoding) = 0;
 
     // common data structures
-    virtual void writeFlattenable(const SkFlattenable* flattenable) = 0;
+    virtual void writeFlattenable(SkFlattenable* flattenable) = 0;
     virtual void writeColor(const SkColor& color) = 0;
     virtual void writeColorArray(const SkColor* color, uint32_t count) = 0;
     virtual void writePoint(const SkPoint& point) = 0;
@@ -222,7 +222,7 @@ public:
 
 protected:
     // A helper function so that each subclass does not have to be a friend of SkFlattenable
-    void flattenObject(const SkFlattenable* obj, SkFlattenableWriteBuffer& buffer);
+    void flattenObject(SkFlattenable* obj, SkFlattenableWriteBuffer& buffer);
 
     uint32_t fFlags;
 };
index 4e83f45..9c0775d 100644 (file)
@@ -47,7 +47,7 @@ public:
                           const SkStrokeRec&, const SkMatrix&,
                           const SkRect*) const SK_OVERRIDE;
 
-    virtual Factory getFactory() const SK_OVERRIDE;
+    virtual Factory getFactory() SK_OVERRIDE;
 
     static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
 
index 5167c2e..50a47d5 100644 (file)
@@ -51,7 +51,6 @@ void SkFlattenableWriteBuffer::writePaint(const SkPaint& paint) {
     paint.flatten(*this);
 }
 
-void SkFlattenableWriteBuffer::flattenObject(const SkFlattenable* obj,
-                                             SkFlattenableWriteBuffer& buffer) {
+void SkFlattenableWriteBuffer::flattenObject(SkFlattenable* obj, SkFlattenableWriteBuffer& buffer) {
     obj->flatten(buffer);
 }
index 9c31b4c..64f5219 100644 (file)
@@ -253,7 +253,7 @@ void SkOrderedWriteBuffer::setBitmapEncoder(SkPicture::EncodeBitmap bitmapEncode
     }
 }
 
-void SkOrderedWriteBuffer::writeFlattenable(const SkFlattenable* flattenable) {
+void SkOrderedWriteBuffer::writeFlattenable(SkFlattenable* flattenable) {
     /*
      *  If we have a factoryset, then the first 32bits tell us...
      *       0: failure to write the flattenable
index f3b414e..277b7bf 100644 (file)
@@ -59,7 +59,7 @@ public:
     virtual void writeEncodedString(const void* value, size_t byteLength,
                                     SkPaint::TextEncoding encoding) SK_OVERRIDE;
 
-    virtual void writeFlattenable(const SkFlattenable* flattenable) SK_OVERRIDE;
+    virtual void writeFlattenable(SkFlattenable* flattenable) SK_OVERRIDE;
     virtual void writeColor(const SkColor& color) SK_OVERRIDE;
     virtual void writeColorArray(const SkColor* color, uint32_t count) SK_OVERRIDE;
     virtual void writePoint(const SkPoint& point) SK_OVERRIDE;
index a821129..41a201e 100644 (file)
@@ -498,7 +498,7 @@ protected:
 
     virtual void flatten(SkFlattenableWriteBuffer& buffer) const SK_OVERRIDE {}
 
-    virtual Factory getFactory() const {
+    virtual Factory getFactory() {
         return CreateProc;
     }
 
index 4aa46ab..be06591 100644 (file)
@@ -528,7 +528,7 @@ bool SkDashPathEffect::asPoints(PointData* results,
     return true;
 }
 
-SkFlattenable::Factory SkDashPathEffect::getFactory() const {
+SkFlattenable::Factory SkDashPathEffect::getFactory() {
     return fInitialDashLength < 0 ? NULL : CreateProc;
 }