Reverted due to Chromium compilation failures. Please see:

https://codereview.chromium.org/30973002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11871 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
robertphillips@google.com 2013-10-20 13:34:21 +00:00
parent 123671901a
commit b5e391025e
8 changed files with 11 additions and 12 deletions

View 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);

View 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;
};

View 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&);

View 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);
}

View 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

View 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;

View File

@ -498,7 +498,7 @@ protected:
virtual void flatten(SkFlattenableWriteBuffer& buffer) const SK_OVERRIDE {}
virtual Factory getFactory() const {
virtual Factory getFactory() {
return CreateProc;
}

View 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;
}