diff options
43 files changed, 3 insertions, 157 deletions
diff --git a/debugger/make_debugger.sh b/debugger/make_debugger.sh deleted file mode 100755 index 86a7ff9884..0000000000 --- a/debugger/make_debugger.sh +++ /dev/null @@ -1,12 +0,0 @@ -# Used to recompile required skia libraries with static initializers turned -# off. This fixes a bug in which the linux compiler was incorrectly stripping -# required global static methods in an optimization effort. - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -CWD=$SCRIPT_DIR/../ - -DEFINES="skia_static_initializers=0" -export GYP_DEFINES="$DEFINES" - -make clean -C $CWD -make -C $CWD debugger -j diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h index 6df9f9b068..0b21abcc76 100644 --- a/include/core/SkFlattenable.h +++ b/include/core/SkFlattenable.h @@ -15,22 +15,6 @@ class SkFlattenableReadBuffer; class SkFlattenableWriteBuffer; -#if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS - -#define SK_DEFINE_FLATTENABLE_REGISTRAR(flattenable) \ - static SkFlattenable::Registrar g##flattenable##Reg(#flattenable, \ - flattenable::CreateProc); -#define SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(flattenable) \ - static SkFlattenable::Registrar g##flattenable##Reg(#flattenable, \ - flattenable::CreateProc); - -#define SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() -#define SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(flattenable) -#define SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END - -#else - -#define SK_DEFINE_FLATTENABLE_REGISTRAR(flattenable) #define SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(flattenable) \ SkFlattenable::Registrar(#flattenable, flattenable::CreateProc); @@ -42,8 +26,6 @@ class SkFlattenableWriteBuffer; #define SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END \ } -#endif - #define SK_DECLARE_UNFLATTENABLE_OBJECT() \ virtual Factory getFactory() SK_OVERRIDE { return NULL; }; \ @@ -93,9 +75,7 @@ protected: virtual void flatten(SkFlattenableWriteBuffer&) const; private: -#if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS static void InitializeFlattenables(); -#endif friend class SkGraphics; friend class SkFlattenableWriteBuffer; diff --git a/src/core/SkAnnotation.cpp b/src/core/SkAnnotation.cpp index 62f865d15f..81767611b3 100644 --- a/src/core/SkAnnotation.cpp +++ b/src/core/SkAnnotation.cpp @@ -38,8 +38,6 @@ void SkAnnotation::flatten(SkFlattenableWriteBuffer& buffer) const { buffer.writeFlattenable(fDataSet); } -SK_DEFINE_FLATTENABLE_REGISTRAR(SkAnnotation) - const char* SkAnnotationKeys::URL_Key() { return "SkAnnotationKey_URL"; }; diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp index dc669ccf4c..43a6b0a7b9 100644 --- a/src/core/SkBitmapProcShader.cpp +++ b/src/core/SkBitmapProcShader.cpp @@ -299,8 +299,6 @@ SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, return shader; } -SK_DEFINE_FLATTENABLE_REGISTRAR(SkBitmapProcShader) - /////////////////////////////////////////////////////////////////////////////// static const char* gTileModeName[] = { diff --git a/src/core/SkColorTable.cpp b/src/core/SkColorTable.cpp index 2a27906a9f..1375c5838c 100644 --- a/src/core/SkColorTable.cpp +++ b/src/core/SkColorTable.cpp @@ -155,5 +155,3 @@ void SkColorTable::flatten(SkFlattenableWriteBuffer& buffer) const { buffer.writeUInt(fFlags); buffer.writeColorArray(fColors, fCount); } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkColorTable) diff --git a/src/core/SkComposeShader.cpp b/src/core/SkComposeShader.cpp index af3f3a5f20..e925ab5627 100644 --- a/src/core/SkComposeShader.cpp +++ b/src/core/SkComposeShader.cpp @@ -165,6 +165,3 @@ void SkComposeShader::shadeSpan(int x, int y, SkPMColor result[], int count) { } while (count > 0); } } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkComposeShader) - diff --git a/src/core/SkData.cpp b/src/core/SkData.cpp index 4274f2b8e2..3e0c71a0e8 100644 --- a/src/core/SkData.cpp +++ b/src/core/SkData.cpp @@ -141,8 +141,6 @@ SkData::SkData(SkFlattenableReadBuffer& buffer) { buffer.readByteArray(const_cast<void*>(fPtr)); } -SK_DEFINE_FLATTENABLE_REGISTRAR(SkData) - /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -302,5 +300,3 @@ SkDataSet* SkDataSet::NewEmpty() { gEmptySet->ref(); return gEmptySet; } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkDataSet) diff --git a/src/core/SkFlattenable.cpp b/src/core/SkFlattenable.cpp index 52377c7d66..b4efe91004 100644 --- a/src/core/SkFlattenable.cpp +++ b/src/core/SkFlattenable.cpp @@ -90,7 +90,7 @@ void SkFlattenable::Register(const char name[], Factory factory) { gCount += 1; } -#if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS && defined(SK_DEBUG) +#ifdef SK_DEBUG static void report_no_entries(const char* functionName) { if (!gCount) { SkDebugf("%s has no registered name/factory pairs." @@ -101,7 +101,7 @@ static void report_no_entries(const char* functionName) { #endif SkFlattenable::Factory SkFlattenable::NameToFactory(const char name[]) { -#if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS && defined(SK_DEBUG) +#ifdef SK_DEBUG report_no_entries(__FUNCTION__); #endif const Pair* pairs = gPairs; @@ -114,7 +114,7 @@ SkFlattenable::Factory SkFlattenable::NameToFactory(const char name[]) { } const char* SkFlattenable::FactoryToName(Factory fact) { -#if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS && defined(SK_DEBUG) +#ifdef SK_DEBUG report_no_entries(__FUNCTION__); #endif const Pair* pairs = gPairs; diff --git a/src/core/SkGraphics.cpp b/src/core/SkGraphics.cpp index 64f92646ca..53d0318251 100644 --- a/src/core/SkGraphics.cpp +++ b/src/core/SkGraphics.cpp @@ -52,9 +52,7 @@ void SkGraphics::GetVersion(int32_t* major, int32_t* minor, int32_t* patch) { #endif void SkGraphics::Init() { -#if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS SkFlattenable::InitializeFlattenables(); -#endif #ifdef BUILD_EMBOSS_TABLE SkEmbossMask_BuildTable(); #endif diff --git a/src/core/SkMallocPixelRef.cpp b/src/core/SkMallocPixelRef.cpp index 71e672b841..d700983961 100644 --- a/src/core/SkMallocPixelRef.cpp +++ b/src/core/SkMallocPixelRef.cpp @@ -64,5 +64,3 @@ SkMallocPixelRef::SkMallocPixelRef(SkFlattenableReadBuffer& buffer) this->setPreLocked(fStorage, fCTable); } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkMallocPixelRef) diff --git a/src/core/SkPathEffect.cpp b/src/core/SkPathEffect.cpp index 84b590d4f8..d706e8dabe 100644 --- a/src/core/SkPathEffect.cpp +++ b/src/core/SkPathEffect.cpp @@ -171,9 +171,3 @@ bool SkSumPathEffect::filterPath(SkPath* dst, const SkPath& src, // use bit-or so that we always call both, even if the first one succeeds return fPE0->filterPath(dst, src, rec) | fPE1->filterPath(dst, src, rec); } - -/////////////////////////////////////////////////////////////////////////////// - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkComposePathEffect) -SK_DEFINE_FLATTENABLE_REGISTRAR(SkSumPathEffect) - diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp index 40fe838f98..97cca5f81c 100644 --- a/src/core/SkShader.cpp +++ b/src/core/SkShader.cpp @@ -332,8 +332,6 @@ SkShader::GradientType SkColorShader::asAGradient(GradientInfo* info) const { return kColor_GradientType; } -SK_DEFINE_FLATTENABLE_REGISTRAR(SkColorShader) - /////////////////////////////////////////////////////////////////////////////// #include "SkEmptyShader.h" @@ -355,5 +353,3 @@ void SkEmptyShader::shadeSpan16(int x, int y, uint16_t span[], int count) { void SkEmptyShader::shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) { SkDEBUGFAIL("should never get called, since setContext() returned false"); } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkEmptyShader) diff --git a/src/effects/Sk1DPathEffect.cpp b/src/effects/Sk1DPathEffect.cpp index 6536826d61..98345d0f09 100644 --- a/src/effects/Sk1DPathEffect.cpp +++ b/src/effects/Sk1DPathEffect.cpp @@ -197,8 +197,3 @@ SkScalar SkPath1DPathEffect::next(SkPath* dst, SkScalar distance, } return fAdvance; } - -/////////////////////////////////////////////////////////////////////////////// - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkPath1DPathEffect) - diff --git a/src/effects/Sk2DPathEffect.cpp b/src/effects/Sk2DPathEffect.cpp index 1f1dce4803..e4d782173a 100644 --- a/src/effects/Sk2DPathEffect.cpp +++ b/src/effects/Sk2DPathEffect.cpp @@ -76,8 +76,6 @@ Sk2DPathEffect::Sk2DPathEffect(SkFlattenableReadBuffer& buffer) { fMatrixIsInvertible = fMatrix.invert(&fInverse); } -SK_DEFINE_FLATTENABLE_REGISTRAR(Sk2DPathEffect) - /////////////////////////////////////////////////////////////////////////////// bool SkLine2DPathEffect::filterPath(SkPath *dst, const SkPath &src, SkStrokeRec *rec) { @@ -110,8 +108,6 @@ void SkLine2DPathEffect::flatten(SkFlattenableWriteBuffer &buffer) const { buffer.writeScalar(fWidth); } -SK_DEFINE_FLATTENABLE_REGISTRAR(SkLine2DPathEffect) - /////////////////////////////////////////////////////////////////////////////// SkPath2DPathEffect::SkPath2DPathEffect(const SkMatrix& m, const SkPath& p) @@ -131,7 +127,3 @@ void SkPath2DPathEffect::flatten(SkFlattenableWriteBuffer& buffer) const { void SkPath2DPathEffect::next(const SkPoint& loc, int u, int v, SkPath* dst) { dst->addPath(fPath, loc.fX, loc.fY); } - -/////////////////////////////////////////////////////////////////////////////// - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkPath2DPathEffect) diff --git a/src/effects/SkAvoidXfermode.cpp b/src/effects/SkAvoidXfermode.cpp index f828cca860..89ae1f9c8c 100644 --- a/src/effects/SkAvoidXfermode.cpp +++ b/src/effects/SkAvoidXfermode.cpp @@ -230,5 +230,3 @@ void SkAvoidXfermode::xferA8(SkAlpha dst[], const SkPMColor src[], int count, co { // override in subclass } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkAvoidXfermode) diff --git a/src/effects/SkBitmapSource.cpp b/src/effects/SkBitmapSource.cpp index 3092b93c9d..8aa0433bca 100644 --- a/src/effects/SkBitmapSource.cpp +++ b/src/effects/SkBitmapSource.cpp @@ -25,5 +25,3 @@ bool SkBitmapSource::onFilterImage(Proxy*, const SkBitmap&, const SkMatrix&, *result = fBitmap; return true; } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkBitmapSource) diff --git a/src/effects/SkBlendImageFilter.cpp b/src/effects/SkBlendImageFilter.cpp index 94896a87ed..2328d95aec 100644 --- a/src/effects/SkBlendImageFilter.cpp +++ b/src/effects/SkBlendImageFilter.cpp @@ -289,5 +289,3 @@ GrGLProgramStage::StageKey GrGLBlendEffect::GenKey(const GrCustomStage& s, const return static_cast<const GrBlendEffect&>(s).mode(); } #endif - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkBlendImageFilter) diff --git a/src/effects/SkBlurDrawLooper.cpp b/src/effects/SkBlurDrawLooper.cpp index 8ba2cfc42c..e6e2ffdd8c 100644 --- a/src/effects/SkBlurDrawLooper.cpp +++ b/src/effects/SkBlurDrawLooper.cpp @@ -115,8 +115,3 @@ bool SkBlurDrawLooper::next(SkCanvas* canvas, SkPaint* paint) { return false; } } - -/////////////////////////////////////////////////////////////////////////////// - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkBlurDrawLooper) - diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp index c822626886..2a61460788 100644 --- a/src/effects/SkBlurImageFilter.cpp +++ b/src/effects/SkBlurImageFilter.cpp @@ -197,5 +197,3 @@ GrTexture* SkBlurImageFilter::onFilterImageGPU(GrTexture* src, const SkRect& rec return NULL; #endif } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkBlurImageFilter) diff --git a/src/effects/SkColorFilterImageFilter.cpp b/src/effects/SkColorFilterImageFilter.cpp index 03e2be46dd..f9c8cef5c1 100755 --- a/src/effects/SkColorFilterImageFilter.cpp +++ b/src/effects/SkColorFilterImageFilter.cpp @@ -52,6 +52,3 @@ bool SkColorFilterImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& sourc *result = device.get()->accessBitmap(false); return true; } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkColorFilterImageFilter) - diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp index 64283ab058..2102e9b81e 100644 --- a/src/effects/SkColorMatrixFilter.cpp +++ b/src/effects/SkColorMatrixFilter.cpp @@ -317,5 +317,3 @@ bool SkColorMatrixFilter::asColorMatrix(SkScalar matrix[20]) { } return true; } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkColorMatrixFilter) diff --git a/src/effects/SkCornerPathEffect.cpp b/src/effects/SkCornerPathEffect.cpp index bc5165ac8b..1ce62ecc03 100644 --- a/src/effects/SkCornerPathEffect.cpp +++ b/src/effects/SkCornerPathEffect.cpp @@ -137,6 +137,3 @@ void SkCornerPathEffect::flatten(SkFlattenableWriteBuffer& buffer) const { SkCornerPathEffect::SkCornerPathEffect(SkFlattenableReadBuffer& buffer) { fRadius = buffer.readScalar(); } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkCornerPathEffect) - diff --git a/src/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp index 3299c63581..3add0d7ddc 100644 --- a/src/effects/SkDashPathEffect.cpp +++ b/src/effects/SkDashPathEffect.cpp @@ -256,7 +256,3 @@ SkDashPathEffect::SkDashPathEffect(SkFlattenableReadBuffer& buffer) : INHERITED( fIntervals = (SkScalar*)sk_malloc_throw(sizeof(SkScalar) * fCount); buffer.readScalarArray(fIntervals); } - -/////////////////////////////////////////////////////////////////////////////// - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkDashPathEffect) diff --git a/src/effects/SkDiscretePathEffect.cpp b/src/effects/SkDiscretePathEffect.cpp index d331cdbfbc..8a7c307965 100644 --- a/src/effects/SkDiscretePathEffect.cpp +++ b/src/effects/SkDiscretePathEffect.cpp @@ -80,8 +80,3 @@ SkDiscretePathEffect::SkDiscretePathEffect(SkFlattenableReadBuffer& buffer) { fSegLength = buffer.readScalar(); fPerterb = buffer.readScalar(); } - -/////////////////////////////////////////////////////////////////////////////// - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkDiscretePathEffect) - diff --git a/src/effects/SkEmbossMaskFilter.cpp b/src/effects/SkEmbossMaskFilter.cpp index 5ced463b2b..6480f50e82 100644 --- a/src/effects/SkEmbossMaskFilter.cpp +++ b/src/effects/SkEmbossMaskFilter.cpp @@ -131,5 +131,3 @@ void SkEmbossMaskFilter::flatten(SkFlattenableWriteBuffer& buffer) const { buffer.writeByteArray(&tmpLight, sizeof(tmpLight)); buffer.writeScalar(fBlurRadius); } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkEmbossMaskFilter) diff --git a/src/effects/SkLayerDrawLooper.cpp b/src/effects/SkLayerDrawLooper.cpp index e4aef186eb..c27908f250 100644 --- a/src/effects/SkLayerDrawLooper.cpp +++ b/src/effects/SkLayerDrawLooper.cpp @@ -245,7 +245,3 @@ SkLayerDrawLooper::SkLayerDrawLooper(SkFlattenableReadBuffer& buffer) } #endif } - -/////////////////////////////////////////////////////////////////////////////// - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkLayerDrawLooper) diff --git a/src/effects/SkLayerRasterizer.cpp b/src/effects/SkLayerRasterizer.cpp index a004b30b0e..7365e12137 100644 --- a/src/effects/SkLayerRasterizer.cpp +++ b/src/effects/SkLayerRasterizer.cpp @@ -169,6 +169,3 @@ void SkLayerRasterizer::flatten(SkFlattenableWriteBuffer& buffer) const { buffer.writePoint(rec->fOffset); } } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkLayerRasterizer) - diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp index 4eed177329..cf64308249 100644 --- a/src/effects/SkMagnifierImageFilter.cpp +++ b/src/effects/SkMagnifierImageFilter.cpp @@ -339,5 +339,3 @@ bool SkMagnifierImageFilter::onFilterImage(Proxy*, const SkBitmap& src, } return true; } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkMagnifierImageFilter) diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp index e5acf563f3..852412bb91 100644 --- a/src/effects/SkMatrixConvolutionImageFilter.cpp +++ b/src/effects/SkMatrixConvolutionImageFilter.cpp @@ -175,5 +175,3 @@ bool SkMatrixConvolutionImageFilter::onFilterImage(Proxy* proxy, filterBorderPixels(src, result, bottom); return true; } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkMatrixConvolutionImageFilter) diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp index 4123ca8e2e..5bf9a99786 100644 --- a/src/effects/SkMorphologyImageFilter.cpp +++ b/src/effects/SkMorphologyImageFilter.cpp @@ -489,6 +489,3 @@ GrTexture* SkErodeImageFilter::onFilterImageGPU(GrTexture* src, const SkRect& re } #endif - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkDilateImageFilter) -SK_DEFINE_FLATTENABLE_REGISTRAR(SkErodeImageFilter) diff --git a/src/effects/SkPixelXorXfermode.cpp b/src/effects/SkPixelXorXfermode.cpp index 236aec549e..cf454da4cc 100644 --- a/src/effects/SkPixelXorXfermode.cpp +++ b/src/effects/SkPixelXorXfermode.cpp @@ -28,5 +28,3 @@ SkPixelXorXfermode::SkPixelXorXfermode(SkFlattenableReadBuffer& rb) : INHERITED(rb) { fOpColor = rb.readColor(); } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkPixelXorXfermode) diff --git a/src/effects/SkRectShape.cpp b/src/effects/SkRectShape.cpp index 06631061c2..52c3b372cd 100644 --- a/src/effects/SkRectShape.cpp +++ b/src/effects/SkRectShape.cpp @@ -85,6 +85,3 @@ void SkPaintShape::flatten(SkFlattenableWriteBuffer& buffer) const { SkPaintShape::SkPaintShape(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) { buffer.readPaint(&fPaint); } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkRectShape) - diff --git a/src/effects/SkSingleInputImageFilter.cpp b/src/effects/SkSingleInputImageFilter.cpp index 291d81cf1a..a1c4292fae 100644 --- a/src/effects/SkSingleInputImageFilter.cpp +++ b/src/effects/SkSingleInputImageFilter.cpp @@ -81,5 +81,3 @@ GrTexture* SkSingleInputImageFilter::getInputResultAsTexture(GrTexture* src, return resultTex; } #endif - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkSingleInputImageFilter) diff --git a/src/effects/SkStippleMaskFilter.cpp b/src/effects/SkStippleMaskFilter.cpp index de5da841cc..434528ed91 100644 --- a/src/effects/SkStippleMaskFilter.cpp +++ b/src/effects/SkStippleMaskFilter.cpp @@ -44,5 +44,3 @@ bool SkStippleMaskFilter::filterMask(SkMask* dst, return true; } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkStippleMaskFilter) diff --git a/src/effects/SkTestImageFilters.cpp b/src/effects/SkTestImageFilters.cpp index aeb5d798ed..d28fda96ec 100755 --- a/src/effects/SkTestImageFilters.cpp +++ b/src/effects/SkTestImageFilters.cpp @@ -343,8 +343,3 @@ void SkDownSampleImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const { SkDownSampleImageFilter::SkDownSampleImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) { fScale = buffer.readScalar(); } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkOffsetImageFilter) -SK_DEFINE_FLATTENABLE_REGISTRAR(SkComposeImageFilter) -SK_DEFINE_FLATTENABLE_REGISTRAR(SkMergeImageFilter) -SK_DEFINE_FLATTENABLE_REGISTRAR(SkDownSampleImageFilter) diff --git a/src/effects/SkTransparentShader.cpp b/src/effects/SkTransparentShader.cpp index 419a33052e..28b075f4e2 100644 --- a/src/effects/SkTransparentShader.cpp +++ b/src/effects/SkTransparentShader.cpp @@ -125,5 +125,3 @@ void SkTransparentShader::shadeSpan16(int x, int y, uint16_t span[], int count) memcpy(span, src, count << 1); } } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkTransparentShader) diff --git a/src/image/SkDataPixelRef.cpp b/src/image/SkDataPixelRef.cpp index 222519d8ad..980b4f1451 100644 --- a/src/image/SkDataPixelRef.cpp +++ b/src/image/SkDataPixelRef.cpp @@ -37,5 +37,3 @@ SkDataPixelRef::SkDataPixelRef(SkFlattenableReadBuffer& buffer) fData = (SkData*)buffer.readFlattenable(); this->setPreLocked(const_cast<void*>(fData->data()), NULL); } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkDataPixelRef) diff --git a/src/images/SkFlipPixelRef.cpp b/src/images/SkFlipPixelRef.cpp index f3f54e85c8..2e73ece5ac 100644 --- a/src/images/SkFlipPixelRef.cpp +++ b/src/images/SkFlipPixelRef.cpp @@ -75,8 +75,6 @@ SkFlipPixelRef::SkFlipPixelRef(SkFlattenableReadBuffer& buffer) buffer.readByteArray(fPage0); } -SK_DEFINE_FLATTENABLE_REGISTRAR(SkFlipPixelRef) - /////////////////////////////////////////////////////////////////////////////// static void copyRect(const SkBitmap& dst, const SkIRect& rect, diff --git a/src/images/SkImageRef_GlobalPool.cpp b/src/images/SkImageRef_GlobalPool.cpp index a5a71a3d9d..e62816aa30 100644 --- a/src/images/SkImageRef_GlobalPool.cpp +++ b/src/images/SkImageRef_GlobalPool.cpp @@ -71,8 +71,6 @@ SkImageRef_GlobalPool::SkImageRef_GlobalPool(SkFlattenableReadBuffer& buffer) this->mutex()->release(); } -SK_DEFINE_FLATTENABLE_REGISTRAR(SkImageRef_GlobalPool) - /////////////////////////////////////////////////////////////////////////////// // global imagerefpool wrappers diff --git a/src/ports/SkGlobalInitialization_default.cpp b/src/ports/SkGlobalInitialization_default.cpp index 7448f8d037..fc454b47fc 100644 --- a/src/ports/SkGlobalInitialization_default.cpp +++ b/src/ports/SkGlobalInitialization_default.cpp @@ -7,8 +7,6 @@ #include "SkTypes.h" -#if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS - #include "SkBitmapProcShader.h" #include "SkFlipPixelRef.h" #include "SkImageRef_ashmem.h" @@ -99,5 +97,3 @@ void SkFlattenable::InitializeFlattenables() { SkTableColorFilter::InitializeFlattenables(); SkXfermode::InitializeFlattenables(); } - -#endif diff --git a/src/ports/SkImageRef_ashmem.cpp b/src/ports/SkImageRef_ashmem.cpp index 01b950e576..cdd56c811d 100644 --- a/src/ports/SkImageRef_ashmem.cpp +++ b/src/ports/SkImageRef_ashmem.cpp @@ -231,5 +231,3 @@ SkImageRef_ashmem::SkImageRef_ashmem(SkFlattenableReadBuffer& buffer) } this->useDefaultMutex(); // we don't need/want the shared imageref mutex } - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkImageRef_ashmem) diff --git a/src/utils/SkUnitMappers.cpp b/src/utils/SkUnitMappers.cpp index 735a4340ab..ceff9ca00c 100644 --- a/src/utils/SkUnitMappers.cpp +++ b/src/utils/SkUnitMappers.cpp @@ -59,6 +59,3 @@ uint16_t SkCosineMapper::mapUnit16(uint16_t input) SkCosineMapper::SkCosineMapper(SkFlattenableReadBuffer& rb) : SkUnitMapper(rb) {} - -SK_DEFINE_FLATTENABLE_REGISTRAR(SkDiscreteMapper) -SK_DEFINE_FLATTENABLE_REGISTRAR(SkCosineMapper) diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index c1d829c0ce..deaf0342ba 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -27,11 +27,6 @@ int random_int(GrRandom* r, int count) { return (int)(r->nextF() * count); } -// min is inclusive, max is exclusive -int random_int(GrRandom* r, int min, int max) { - return (int)(r->nextF() * (max-min)) + min; -} - bool random_bool(GrRandom* r) { return r->nextF() > .5f; } |