diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-01-09 17:51:21 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-01-09 17:51:21 -0800 |
commit | 03202c9c3dfbf8c4feb0a1ee9b3680817e633f58 (patch) | |
tree | 1d0ba7cbf3e77c239527697ac455312b216c434e | |
parent | 37df15a82319228ae28fe5d99c010b288aad7091 (diff) | |
download | external_skia-03202c9c3dfbf8c4feb0a1ee9b3680817e633f58.zip external_skia-03202c9c3dfbf8c4feb0a1ee9b3680817e633f58.tar.gz external_skia-03202c9c3dfbf8c4feb0a1ee9b3680817e633f58.tar.bz2 |
auto import from //branches/cupcake/...@125939
-rw-r--r-- | experimental/SkSetPoly3To3.cpp | 60 | ||||
-rw-r--r-- | experimental/SkSetPoly3To3_A.cpp | 90 | ||||
-rw-r--r-- | experimental/SkSetPoly3To3_D.cpp | 65 | ||||
-rw-r--r-- | include/animator/SkAnimator.h (renamed from include/graphics/SkAnimator.h) | 0 | ||||
-rw-r--r-- | include/animator/SkAnimatorView.h (renamed from include/graphics/SkAnimatorView.h) | 0 | ||||
-rw-r--r-- | include/core/Sk64.h (renamed from include/corecg/Sk64.h) | 0 | ||||
-rw-r--r-- | include/core/SkAutoKern.h (renamed from libsgl/sgl/SkAutoKern.h) | 0 | ||||
-rw-r--r-- | include/core/SkBitmap.h (renamed from include/graphics/SkBitmap.h) | 0 | ||||
-rw-r--r-- | include/core/SkBlitter.h (renamed from libsgl/sgl/SkBlitter.h) | 0 | ||||
-rw-r--r-- | include/core/SkBounder.h (renamed from include/graphics/SkBounder.h) | 0 | ||||
-rw-r--r-- | include/core/SkBuffer.h (renamed from include/corecg/SkBuffer.h) | 0 | ||||
-rw-r--r-- | include/core/SkCanvas.h (renamed from include/graphics/SkCanvas.h) | 0 | ||||
-rw-r--r-- | include/core/SkChunkAlloc.h (renamed from include/corecg/SkChunkAlloc.h) | 0 | ||||
-rw-r--r-- | include/core/SkColor.h (renamed from include/graphics/SkColor.h) | 0 | ||||
-rw-r--r-- | include/core/SkColorFilter.h (renamed from include/graphics/SkColorFilter.h) | 0 | ||||
-rw-r--r-- | include/core/SkColorPriv.h (renamed from include/graphics/SkColorPriv.h) | 0 | ||||
-rw-r--r-- | include/core/SkColorShader.h (renamed from include/graphics/SkColorShader.h) | 0 | ||||
-rw-r--r-- | include/core/SkComposeShader.h (renamed from include/graphics/SkShaderExtras.h) | 4 | ||||
-rw-r--r-- | include/core/SkDeque.h (renamed from include/graphics/SkDeque.h) | 0 | ||||
-rw-r--r-- | include/core/SkDescriptor.h (renamed from include/graphics/SkDescriptor.h) | 0 | ||||
-rw-r--r-- | include/core/SkDevice.h (renamed from include/graphics/SkDevice.h) | 0 | ||||
-rw-r--r-- | include/core/SkDither.h (renamed from include/graphics/SkDither.h) | 0 | ||||
-rw-r--r-- | include/core/SkDraw.h (renamed from include/graphics/SkDraw.h) | 2 | ||||
-rw-r--r-- | include/core/SkDrawFilter.h (renamed from include/graphics/SkDrawFilter.h) | 0 | ||||
-rw-r--r-- | include/core/SkDrawLooper.h (renamed from include/graphics/SkDrawLooper.h) | 0 | ||||
-rw-r--r-- | include/core/SkEndian.h (renamed from include/corecg/SkEndian.h) | 0 | ||||
-rw-r--r-- | include/core/SkFDot6.h (renamed from include/corecg/SkFDot6.h) | 0 | ||||
-rw-r--r-- | include/core/SkFixed.h (renamed from include/corecg/SkFixed.h) | 0 | ||||
-rw-r--r-- | include/core/SkFlattenable.h (renamed from include/graphics/SkFlattenable.h) | 0 | ||||
-rw-r--r-- | include/core/SkFloatBits.h (renamed from include/corecg/SkFloatBits.h) | 0 | ||||
-rw-r--r-- | include/core/SkFloatingPoint.h (renamed from include/corecg/SkFloatingPoint.h) | 0 | ||||
-rw-r--r-- | include/core/SkFontHost.h (renamed from include/graphics/SkFontHost.h) | 8 | ||||
-rw-r--r-- | include/core/SkGeometry.h (renamed from libsgl/sgl/SkGeometry.h) | 0 | ||||
-rw-r--r-- | include/core/SkGlobals.h (renamed from include/graphics/SkGlobals.h) | 0 | ||||
-rw-r--r-- | include/core/SkGraphics.h (renamed from include/graphics/SkGraphics.h) | 0 | ||||
-rw-r--r-- | include/core/SkMMapStream.h (renamed from include/graphics/SkMMapStream.h) | 0 | ||||
-rw-r--r-- | include/core/SkMallocPixelRef.h (renamed from include/graphics/SkMallocPixelRef.h) | 0 | ||||
-rw-r--r-- | include/core/SkMask.h (renamed from include/graphics/SkMask.h) | 0 | ||||
-rw-r--r-- | include/core/SkMaskFilter.h (renamed from include/graphics/SkMaskFilter.h) | 0 | ||||
-rw-r--r-- | include/core/SkMath.h (renamed from include/corecg/SkMath.h) | 0 | ||||
-rw-r--r-- | include/core/SkMatrix.h (renamed from include/corecg/SkMatrix.h) | 0 | ||||
-rw-r--r-- | include/core/SkOSFile.h (renamed from include/graphics/SkOSFile.h) | 0 | ||||
-rw-r--r-- | include/core/SkPackBits.h (renamed from include/graphics/SkPackBits.h) | 0 | ||||
-rw-r--r-- | include/core/SkPaint.h (renamed from include/graphics/SkPaint.h) | 0 | ||||
-rw-r--r-- | include/core/SkPath.h (renamed from include/graphics/SkPath.h) | 0 | ||||
-rw-r--r-- | include/core/SkPathEffect.h (renamed from include/graphics/SkPathEffect.h) | 0 | ||||
-rw-r--r-- | include/core/SkPathMeasure.h (renamed from include/graphics/SkPathMeasure.h) | 0 | ||||
-rw-r--r-- | include/core/SkPerspIter.h (renamed from include/corecg/SkPerspIter.h) | 0 | ||||
-rw-r--r-- | include/core/SkPicture.h (renamed from include/graphics/SkPicture.h) | 0 | ||||
-rw-r--r-- | include/core/SkPixelRef.h (renamed from include/graphics/SkPixelRef.h) | 0 | ||||
-rw-r--r-- | include/core/SkPoint.h (renamed from include/corecg/SkPoint.h) | 0 | ||||
-rw-r--r-- | include/core/SkPorterDuff.h (renamed from include/graphics/SkPorterDuff.h) | 0 | ||||
-rw-r--r-- | include/core/SkPostConfig.h (renamed from include/corecg/SkPostConfig.h) | 26 | ||||
-rw-r--r-- | include/core/SkPreConfig.h (renamed from include/corecg/SkPreConfig.h) | 41 | ||||
-rw-r--r-- | include/core/SkPtrRecorder.h (renamed from include/graphics/SkPtrRecorder.h) | 0 | ||||
-rw-r--r-- | include/core/SkRandom.h (renamed from include/corecg/SkRandom.h) | 0 | ||||
-rw-r--r-- | include/core/SkRasterizer.h (renamed from include/graphics/SkRasterizer.h) | 0 | ||||
-rw-r--r-- | include/core/SkReader32.h (renamed from include/graphics/SkReader32.h) | 0 | ||||
-rw-r--r-- | include/core/SkRect.h (renamed from include/corecg/SkRect.h) | 0 | ||||
-rw-r--r-- | include/core/SkRefCnt.h (renamed from include/graphics/SkRefCnt.h) | 0 | ||||
-rw-r--r-- | include/core/SkRegion.h (renamed from include/corecg/SkRegion.h) | 0 | ||||
-rw-r--r-- | include/core/SkScalar.h (renamed from include/corecg/SkScalar.h) | 0 | ||||
-rw-r--r-- | include/core/SkScalarCompare.h (renamed from include/corecg/SkScalarCompare.h) | 0 | ||||
-rw-r--r-- | include/core/SkScalerContext.h (renamed from include/graphics/SkScalerContext.h) | 0 | ||||
-rw-r--r-- | include/core/SkScan.h (renamed from libsgl/sgl/SkScan.h) | 0 | ||||
-rw-r--r-- | include/core/SkShader.h (renamed from include/graphics/SkShader.h) | 0 | ||||
-rw-r--r-- | include/core/SkStream.h (renamed from include/graphics/SkStream.h) | 0 | ||||
-rw-r--r-- | include/core/SkString.h (renamed from include/corecg/SkString.h) | 0 | ||||
-rw-r--r-- | include/core/SkStroke.h (renamed from include/graphics/SkStroke.h) | 0 | ||||
-rw-r--r-- | include/core/SkTDArray.h (renamed from include/graphics/SkTDArray.h) | 0 | ||||
-rw-r--r-- | include/core/SkTDStack.h (renamed from include/graphics/SkTDStack.h) | 0 | ||||
-rw-r--r-- | include/core/SkTDict.h (renamed from include/graphics/SkTDict.h) | 0 | ||||
-rw-r--r-- | include/core/SkTSearch.h (renamed from include/corecg/SkTSearch.h) | 0 | ||||
-rw-r--r-- | include/core/SkTemplates.h (renamed from include/corecg/SkTemplates.h) | 0 | ||||
-rw-r--r-- | include/core/SkThread.h (renamed from include/corecg/SkThread.h) | 0 | ||||
-rw-r--r-- | include/core/SkThread_platform.h (renamed from include/corecg/SkThread_platform.h) | 0 | ||||
-rw-r--r-- | include/core/SkTime.h (renamed from include/graphics/SkTime.h) | 0 | ||||
-rw-r--r-- | include/core/SkTypeface.h (renamed from include/graphics/SkTypeface.h) | 0 | ||||
-rw-r--r-- | include/core/SkTypes.h (renamed from include/corecg/SkTypes.h) | 0 | ||||
-rw-r--r-- | include/core/SkUnPreMultiply.h (renamed from include/graphics/SkUnPreMultiply.h) | 0 | ||||
-rw-r--r-- | include/core/SkUnitMapper.h (renamed from include/graphics/SkUnitMapper.h) | 0 | ||||
-rw-r--r-- | include/core/SkUserConfig.h | 144 | ||||
-rw-r--r-- | include/core/SkUtils.h (renamed from include/corecg/SkUtils.h) | 0 | ||||
-rw-r--r-- | include/core/SkWriter32.h (renamed from include/graphics/SkWriter32.h) | 0 | ||||
-rw-r--r-- | include/core/SkXfermode.h (renamed from include/graphics/SkXfermode.h) | 0 | ||||
-rw-r--r-- | include/corecg/SkUserConfig.h | 94 | ||||
-rw-r--r-- | include/effects/Sk1DPathEffect.h (renamed from include/graphics/Sk1DPathEffect.h) | 0 | ||||
-rw-r--r-- | include/effects/Sk2DPathEffect.h (renamed from include/graphics/Sk2DPathEffect.h) | 0 | ||||
-rw-r--r-- | include/effects/SkAvoidXfermode.h (renamed from include/graphics/SkAvoidXfermode.h) | 0 | ||||
-rw-r--r-- | include/effects/SkBlurDrawLooper.h (renamed from include/graphics/SkBlurDrawLooper.h) | 0 | ||||
-rw-r--r-- | include/effects/SkBlurMaskFilter.h (renamed from include/graphics/SkBlurMaskFilter.h) | 0 | ||||
-rw-r--r-- | include/effects/SkColorMatrix.h (renamed from include/graphics/SkColorMatrix.h) | 0 | ||||
-rw-r--r-- | include/effects/SkColorMatrixFilter.h (renamed from include/graphics/SkColorMatrixFilter.h) | 0 | ||||
-rw-r--r-- | include/effects/SkCornerPathEffect.h (renamed from include/graphics/SkCornerPathEffect.h) | 0 | ||||
-rw-r--r-- | include/effects/SkDashPathEffect.h (renamed from include/graphics/SkDashPathEffect.h) | 0 | ||||
-rw-r--r-- | include/effects/SkDiscretePathEffect.h (renamed from include/graphics/SkDiscretePathEffect.h) | 0 | ||||
-rw-r--r-- | include/effects/SkDrawExtraPathEffect.h (renamed from include/graphics/SkDrawExtraPathEffect.h) | 0 | ||||
-rw-r--r-- | include/effects/SkEmbossMaskFilter.h (renamed from include/graphics/SkEmbossMaskFilter.h) | 0 | ||||
-rw-r--r-- | include/effects/SkGradientShader.h (renamed from include/graphics/SkGradientShader.h) | 0 | ||||
-rw-r--r-- | include/effects/SkKernel33MaskFilter.h (renamed from include/graphics/SkKernel33MaskFilter.h) | 0 | ||||
-rw-r--r-- | include/effects/SkLayerDrawLooper.h (renamed from include/graphics/SkLayerDrawLooper.h) | 0 | ||||
-rw-r--r-- | include/effects/SkLayerRasterizer.h (renamed from include/graphics/SkLayerRasterizer.h) | 0 | ||||
-rw-r--r-- | include/effects/SkPaintFlagsDrawFilter.h (renamed from include/graphics/SkPaintFlagsDrawFilter.h) | 0 | ||||
-rw-r--r-- | include/effects/SkPixelXorXfermode.h (renamed from include/graphics/SkPixelXorXfermode.h) | 0 | ||||
-rw-r--r-- | include/effects/SkTransparentShader.h (renamed from include/graphics/SkTransparentShader.h) | 0 | ||||
-rw-r--r-- | include/graphics/SkFontCodec.h | 36 | ||||
-rw-r--r-- | include/images/SkFlipPixelRef.h (renamed from include/graphics/SkFlipPixelRef.h) | 0 | ||||
-rw-r--r-- | include/images/SkImageDecoder.h (renamed from include/graphics/SkImageDecoder.h) | 32 | ||||
-rw-r--r-- | include/images/SkImageEncoder.h | 36 | ||||
-rw-r--r-- | include/images/SkImageRef.h (renamed from include/graphics/SkImageRef.h) | 0 | ||||
-rw-r--r-- | include/images/SkImageRef_GlobalPool.h (renamed from include/graphics/SkImageRef_GlobalPool.h) | 0 | ||||
-rw-r--r-- | include/images/SkMovie.h (renamed from include/graphics/SkMovie.h) | 0 | ||||
-rw-r--r-- | include/images/SkPageFlipper.h (renamed from include/corecg/SkPageFlipper.h) | 0 | ||||
-rw-r--r-- | include/ports/SkStream_Win.h (renamed from include/graphics/SkStream_Win.h) | 0 | ||||
-rw-r--r-- | include/svg/SkSVGAttribute.h (renamed from include/graphics/SkSVGAttribute.h) | 0 | ||||
-rw-r--r-- | include/svg/SkSVGBase.h (renamed from include/graphics/SkSVGBase.h) | 0 | ||||
-rw-r--r-- | include/svg/SkSVGPaintState.h (renamed from include/graphics/SkSVGPaintState.h) | 0 | ||||
-rw-r--r-- | include/svg/SkSVGParser.h (renamed from include/graphics/SkSVGParser.h) | 0 | ||||
-rw-r--r-- | include/svg/SkSVGTypes.h (renamed from include/graphics/SkSVGTypes.h) | 0 | ||||
-rw-r--r-- | include/utils/SkCamera.h (renamed from include/graphics/SkCamera.h) | 0 | ||||
-rw-r--r-- | include/utils/SkCullPoints.h (renamed from include/graphics/SkCullPoints.h) | 0 | ||||
-rw-r--r-- | include/utils/SkDumpCanvas.h (renamed from include/graphics/SkDumpCanvas.h) | 0 | ||||
-rw-r--r-- | include/utils/SkGLCanvas.h (renamed from include/graphics/SkGLCanvas.h) | 0 | ||||
-rw-r--r-- | include/utils/SkInterpolator.h (renamed from include/corecg/SkInterpolator.h) | 0 | ||||
-rw-r--r-- | include/utils/SkNinePatch.h (renamed from include/graphics/SkNinePatch.h) | 0 | ||||
-rw-r--r-- | include/utils/SkParse.h (renamed from include/graphics/SkParse.h) | 0 | ||||
-rw-r--r-- | include/utils/SkParsePaint.h (renamed from include/graphics/SkParsePaint.h) | 0 | ||||
-rw-r--r-- | include/utils/SkProxyCanvas.h (renamed from include/graphics/SkProxyCanvas.h) | 0 | ||||
-rw-r--r-- | include/utils/SkTextBox.h (renamed from include/graphics/SkTextBox.h) | 0 | ||||
-rw-r--r-- | include/utils/SkUnitMappers.h (renamed from include/graphics/SkUnitMappers.h) | 0 | ||||
-rw-r--r-- | include/utils/mac/SkCGUtils.h | 10 | ||||
-rw-r--r-- | include/views/SkApplication.h (renamed from include/graphics/SkApplication.h) | 0 | ||||
-rw-r--r-- | include/views/SkBGViewArtist.h (renamed from include/graphics/SkBGViewArtist.h) | 0 | ||||
-rw-r--r-- | include/views/SkBorderView.h (renamed from include/graphics/SkBorderView.h) | 0 | ||||
-rw-r--r-- | include/views/SkEvent.h (renamed from include/graphics/SkEvent.h) | 0 | ||||
-rw-r--r-- | include/views/SkEventSink.h (renamed from include/graphics/SkEventSink.h) | 0 | ||||
-rw-r--r-- | include/views/SkImageView.h (renamed from include/graphics/SkImageView.h) | 0 | ||||
-rw-r--r-- | include/views/SkKey.h (renamed from include/graphics/SkKey.h) | 0 | ||||
-rw-r--r-- | include/views/SkMetaData.h (renamed from include/graphics/SkMetaData.h) | 0 | ||||
-rw-r--r-- | include/views/SkOSMenu.h (renamed from include/graphics/SkOSMenu.h) | 0 | ||||
-rw-r--r-- | include/views/SkOSSound.h (renamed from include/graphics/SkOSSound.h) | 0 | ||||
-rw-r--r-- | include/views/SkOSWindow_Mac.h (renamed from include/graphics/SkOSWindow_Mac.h) | 8 | ||||
-rw-r--r-- | include/views/SkOSWindow_Unix.h (renamed from include/graphics/SkOSWindow_Unix.h) | 0 | ||||
-rw-r--r-- | include/views/SkOSWindow_Win.h (renamed from include/graphics/SkOSWindow_Win.h) | 0 | ||||
-rw-r--r-- | include/views/SkOSWindow_wxwidgets.h (renamed from include/graphics/SkOSWindow_wxwidgets.h) | 0 | ||||
-rw-r--r-- | include/views/SkProgressBarView.h (renamed from include/graphics/SkProgressBarView.h) | 0 | ||||
-rw-r--r-- | include/views/SkScrollBarView.h (renamed from include/graphics/SkScrollBarView.h) | 0 | ||||
-rw-r--r-- | include/views/SkStackViewLayout.h (renamed from include/graphics/SkStackViewLayout.h) | 0 | ||||
-rw-r--r-- | include/views/SkSystemEventTypes.h (renamed from include/graphics/SkSystemEventTypes.h) | 0 | ||||
-rw-r--r-- | include/views/SkView.h (renamed from include/graphics/SkView.h) | 0 | ||||
-rw-r--r-- | include/views/SkViewInflate.h (renamed from include/graphics/SkViewInflate.h) | 0 | ||||
-rw-r--r-- | include/views/SkWidget.h (renamed from include/graphics/SkWidget.h) | 0 | ||||
-rw-r--r-- | include/views/SkWidgetViews.h (renamed from include/graphics/SkWidgetViews.h) | 0 | ||||
-rw-r--r-- | include/views/SkWindow.h (renamed from include/graphics/SkWindow.h) | 4 | ||||
-rw-r--r-- | include/xml/SkBML_WXMLParser.h (renamed from include/graphics/SkBML_WXMLParser.h) | 0 | ||||
-rw-r--r-- | include/xml/SkBML_XMLParser.h (renamed from include/graphics/SkBML_XMLParser.h) | 0 | ||||
-rw-r--r-- | include/xml/SkDOM.h (renamed from include/graphics/SkDOM.h) | 0 | ||||
-rw-r--r-- | include/xml/SkJS.h (renamed from include/graphics/SkJS.h) | 0 | ||||
-rw-r--r-- | include/xml/SkXMLParser.h (renamed from include/graphics/SkXMLParser.h) | 0 | ||||
-rw-r--r-- | include/xml/SkXMLWriter.h (renamed from include/graphics/SkXMLWriter.h) | 0 | ||||
-rw-r--r-- | libcorecg/Android.mk | 34 | ||||
-rw-r--r-- | libcorecg/SkTSort.h | 65 | ||||
-rw-r--r-- | libsgl/Android.mk | 274 | ||||
-rw-r--r-- | libsgl/text/ATextEntry.h | 37 | ||||
-rw-r--r-- | samplecode/SampleAll.cpp (renamed from Samples/SampleAll.cpp) | 0 | ||||
-rw-r--r-- | samplecode/SampleApp.cpp (renamed from Samples/SampleApp.cpp) | 54 | ||||
-rw-r--r-- | samplecode/SampleArc.cpp (renamed from Samples/SampleArc.cpp) | 2 | ||||
-rw-r--r-- | samplecode/SampleBitmapRect.cpp (renamed from Samples/SampleBitmapRect.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleCamera.cpp (renamed from Samples/SampleCamera.cpp) | 0 | ||||
-rw-r--r-- | samplecode/SampleCircle.cpp (renamed from Samples/SampleCircle.cpp) | 0 | ||||
-rw-r--r-- | samplecode/SampleCode.h (renamed from Samples/SampleCode.h) | 0 | ||||
-rw-r--r-- | samplecode/SampleCull.cpp (renamed from Samples/SampleCull.cpp) | 0 | ||||
-rw-r--r-- | samplecode/SampleDither.cpp (renamed from Samples/SampleDither.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleDrawLooper.cpp (renamed from Samples/SampleDrawLooper.cpp) | 0 | ||||
-rw-r--r-- | samplecode/SampleEmboss.cpp (renamed from Samples/SampleEmboss.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleEncode.cpp (renamed from Samples/SampleEncode.cpp) | 5 | ||||
-rw-r--r-- | samplecode/SampleFillType.cpp (renamed from Samples/SampleFillType.cpp) | 0 | ||||
-rw-r--r-- | samplecode/SampleFilter.cpp (renamed from Samples/SampleFilter.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleFilter2.cpp (renamed from Samples/SampleFilter2.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleFontCache.cpp (renamed from Samples/SampleFontCache.cpp) | 0 | ||||
-rw-r--r-- | samplecode/SampleGL.cpp (renamed from Samples/SampleGL.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleImage.cpp (renamed from Samples/SampleImage.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleImageDir.cpp (renamed from Samples/SampleImageDir.cpp) | 31 | ||||
-rw-r--r-- | samplecode/SampleLayers.cpp (renamed from Samples/SampleLayers.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleLines.cpp (renamed from Samples/SampleLines.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleMeasure.cpp (renamed from Samples/SampleMeasure.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleNinePatch.cpp (renamed from Samples/SampleNinePatch.cpp) | 7 | ||||
-rw-r--r-- | samplecode/SampleOverflow.cpp (renamed from Samples/SampleOverflow.cpp) | 0 | ||||
-rw-r--r-- | samplecode/SamplePageFlip.cpp (renamed from Samples/SamplePageFlip.cpp) | 0 | ||||
-rw-r--r-- | samplecode/SamplePatch.cpp (renamed from Samples/SamplePatch.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SamplePath.cpp (renamed from Samples/SamplePath.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SamplePathEffects.cpp (renamed from Samples/SamplePathEffects.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SamplePicture.cpp (renamed from Samples/SamplePicture.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SamplePoints.cpp (renamed from Samples/SamplePoints.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SamplePolyToPoly.cpp (renamed from Samples/SamplePolyToPoly.cpp) | 0 | ||||
-rw-r--r-- | samplecode/SampleRegion.cpp (renamed from Samples/SampleRegion.cpp) | 22 | ||||
-rw-r--r-- | samplecode/SampleShaders.cpp (renamed from Samples/SampleShaders.cpp) | 2 | ||||
-rw-r--r-- | samplecode/SampleStrokeText.cpp (renamed from Samples/SampleStrokeText.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleTests.cpp (renamed from Samples/SampleTests.cpp) | 0 | ||||
-rw-r--r-- | samplecode/SampleText.cpp (renamed from Samples/SampleText.cpp) | 3 | ||||
-rw-r--r-- | samplecode/SampleTextAlpha.cpp (renamed from Samples/SampleTextAlpha.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleTextEffects.cpp (renamed from Samples/SampleTextEffects.cpp) | 3 | ||||
-rw-r--r-- | samplecode/SampleTextOnPath.cpp (renamed from Samples/SampleTextOnPath.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleTiling.cpp (renamed from Samples/SampleTiling.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleTypeface.cpp (renamed from Samples/SampleTypeface.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleVertices.cpp (renamed from Samples/SampleVertices.cpp) | 1 | ||||
-rw-r--r-- | samplecode/SampleXfermodes.cpp (renamed from Samples/SampleXfermodes.cpp) | 1 | ||||
-rw-r--r-- | samplecode/vertexdump.cpp (renamed from Samples/vertexdump.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimate.h (renamed from libsgl/animator/SkAnimate.h) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimateActive.cpp (renamed from libsgl/animator/SkAnimateActive.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimateActive.h (renamed from libsgl/animator/SkAnimateActive.h) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimateBase.cpp (renamed from libsgl/animator/SkAnimateBase.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimateBase.h (renamed from libsgl/animator/SkAnimateBase.h) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimateField.cpp (renamed from libsgl/animator/SkAnimateField.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimateMaker.cpp (renamed from libsgl/animator/SkAnimateMaker.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimateMaker.h (renamed from libsgl/animator/SkAnimateMaker.h) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimateProperties.h (renamed from libsgl/animator/SkAnimateProperties.h) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimateSet.cpp (renamed from libsgl/animator/SkAnimateSet.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimateSet.h (renamed from libsgl/animator/SkAnimateSet.h) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimator.cpp (renamed from libsgl/animator/SkAnimator.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimatorScript.cpp (renamed from libsgl/animator/SkAnimatorScript.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimatorScript.h (renamed from libsgl/animator/SkAnimatorScript.h) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimatorScript2.cpp (renamed from libsgl/animator/SkAnimatorScript2.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkAnimatorScript2.h (renamed from libsgl/animator/SkAnimatorScript2.h) | 0 | ||||
-rw-r--r-- | src/animator/SkBase64.cpp (renamed from libsgl/animator/SkBase64.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkBase64.h (renamed from libsgl/animator/SkBase64.h) | 0 | ||||
-rw-r--r-- | src/animator/SkBoundable.cpp (renamed from libsgl/animator/SkBoundable.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkBoundable.h (renamed from libsgl/animator/SkBoundable.h) | 0 | ||||
-rw-r--r-- | src/animator/SkBuildCondensedInfo.cpp (renamed from libsgl/animator/SkBuildCondensedInfo.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkCondensedDebug.cpp (renamed from libsgl/animator/SkCondensedDebug.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkCondensedRelease.cpp (renamed from libsgl/animator/SkCondensedRelease.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayAdd.cpp (renamed from libsgl/animator/SkDisplayAdd.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayAdd.h (renamed from libsgl/animator/SkDisplayAdd.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayApply.cpp (renamed from libsgl/animator/SkDisplayApply.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayApply.h (renamed from libsgl/animator/SkDisplayApply.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayBounds.cpp (renamed from libsgl/animator/SkDisplayBounds.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayBounds.h (renamed from libsgl/animator/SkDisplayBounds.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayEvent.cpp (renamed from libsgl/animator/SkDisplayEvent.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayEvent.h (renamed from libsgl/animator/SkDisplayEvent.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayEvents.cpp (renamed from libsgl/animator/SkDisplayEvents.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayEvents.h (renamed from libsgl/animator/SkDisplayEvents.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayInclude.cpp (renamed from libsgl/animator/SkDisplayInclude.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayInclude.h (renamed from libsgl/animator/SkDisplayInclude.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayInput.cpp (renamed from libsgl/animator/SkDisplayInput.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayInput.h (renamed from libsgl/animator/SkDisplayInput.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayList.cpp (renamed from libsgl/animator/SkDisplayList.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayList.h (renamed from libsgl/animator/SkDisplayList.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayMath.cpp (renamed from libsgl/animator/SkDisplayMath.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayMath.h (renamed from libsgl/animator/SkDisplayMath.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayMovie.cpp (renamed from libsgl/animator/SkDisplayMovie.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayMovie.h (renamed from libsgl/animator/SkDisplayMovie.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayNumber.cpp (renamed from libsgl/animator/SkDisplayNumber.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayNumber.h (renamed from libsgl/animator/SkDisplayNumber.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayPost.cpp (renamed from libsgl/animator/SkDisplayPost.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayPost.h (renamed from libsgl/animator/SkDisplayPost.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayRandom.cpp (renamed from libsgl/animator/SkDisplayRandom.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayRandom.h (renamed from libsgl/animator/SkDisplayRandom.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayScreenplay.cpp (renamed from libsgl/animator/SkDisplayScreenplay.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayScreenplay.h (renamed from libsgl/animator/SkDisplayScreenplay.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayType.cpp (renamed from libsgl/animator/SkDisplayType.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayType.h (renamed from libsgl/animator/SkDisplayType.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayTypes.cpp (renamed from libsgl/animator/SkDisplayTypes.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayTypes.h (renamed from libsgl/animator/SkDisplayTypes.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayXMLParser.cpp (renamed from libsgl/animator/SkDisplayXMLParser.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayXMLParser.h (renamed from libsgl/animator/SkDisplayXMLParser.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayable.cpp (renamed from libsgl/animator/SkDisplayable.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDisplayable.h (renamed from libsgl/animator/SkDisplayable.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDraw3D.cpp (renamed from libsgl/animator/SkDraw3D.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDraw3D.h (renamed from libsgl/animator/SkDraw3D.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawBitmap.cpp (renamed from libsgl/animator/SkDrawBitmap.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawBitmap.h (renamed from libsgl/animator/SkDrawBitmap.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawBlur.cpp (renamed from libsgl/animator/SkDrawBlur.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawBlur.h (renamed from libsgl/animator/SkDrawBlur.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawClip.cpp (renamed from libsgl/animator/SkDrawClip.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawClip.h (renamed from libsgl/animator/SkDrawClip.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawColor.cpp (renamed from libsgl/animator/SkDrawColor.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawColor.h (renamed from libsgl/animator/SkDrawColor.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawDash.cpp (renamed from libsgl/animator/SkDrawDash.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawDash.h (renamed from libsgl/animator/SkDrawDash.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawDiscrete.cpp (renamed from libsgl/animator/SkDrawDiscrete.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawDiscrete.h (renamed from libsgl/animator/SkDrawDiscrete.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawEmboss.cpp (renamed from libsgl/animator/SkDrawEmboss.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawEmboss.h (renamed from libsgl/animator/SkDrawEmboss.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawExtraPathEffect.cpp (renamed from libsgl/animator/SkDrawExtraPathEffect.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawFull.cpp (renamed from libsgl/animator/SkDrawFull.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawFull.h (renamed from libsgl/animator/SkDrawFull.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawGradient.cpp (renamed from libsgl/animator/SkDrawGradient.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawGradient.h (renamed from libsgl/animator/SkDrawGradient.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawGroup.cpp (renamed from libsgl/animator/SkDrawGroup.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawGroup.h (renamed from libsgl/animator/SkDrawGroup.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawLine.cpp (renamed from libsgl/animator/SkDrawLine.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawLine.h (renamed from libsgl/animator/SkDrawLine.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawMatrix.cpp (renamed from libsgl/animator/SkDrawMatrix.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawMatrix.h (renamed from libsgl/animator/SkDrawMatrix.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawOval.cpp (renamed from libsgl/animator/SkDrawOval.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawOval.h (renamed from libsgl/animator/SkDrawOval.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawPaint.cpp (renamed from libsgl/animator/SkDrawPaint.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawPaint.h (renamed from libsgl/animator/SkDrawPaint.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawPath.cpp (renamed from libsgl/animator/SkDrawPath.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawPath.h (renamed from libsgl/animator/SkDrawPath.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawPoint.cpp (renamed from libsgl/animator/SkDrawPoint.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawPoint.h (renamed from libsgl/animator/SkDrawPoint.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawRectangle.cpp (renamed from libsgl/animator/SkDrawRectangle.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawRectangle.h (renamed from libsgl/animator/SkDrawRectangle.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawSaveLayer.cpp (renamed from libsgl/animator/SkDrawSaveLayer.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawSaveLayer.h (renamed from libsgl/animator/SkDrawSaveLayer.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawShader.cpp (renamed from libsgl/animator/SkDrawShader.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawShader.h (renamed from libsgl/animator/SkDrawShader.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawText.cpp (renamed from libsgl/animator/SkDrawText.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawText.h (renamed from libsgl/animator/SkDrawText.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawTextBox.cpp (renamed from libsgl/animator/SkDrawTextBox.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawTextBox.h (renamed from libsgl/animator/SkDrawTextBox.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawTo.cpp (renamed from libsgl/animator/SkDrawTo.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawTo.h (renamed from libsgl/animator/SkDrawTo.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawTransparentShader.cpp (renamed from libsgl/animator/SkDrawTransparentShader.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawTransparentShader.h (renamed from libsgl/animator/SkDrawTransparentShader.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawable.cpp (renamed from libsgl/animator/SkDrawable.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDrawable.h (renamed from libsgl/animator/SkDrawable.h) | 0 | ||||
-rw-r--r-- | src/animator/SkDump.cpp (renamed from libsgl/animator/SkDump.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkDump.h (renamed from libsgl/animator/SkDump.h) | 0 | ||||
-rw-r--r-- | src/animator/SkExtras.h (renamed from libsgl/animator/SkExtras.h) | 0 | ||||
-rw-r--r-- | src/animator/SkGetCondensedInfo.cpp (renamed from libsgl/animator/SkGetCondensedInfo.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkHitClear.cpp (renamed from libsgl/animator/SkHitClear.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkHitClear.h (renamed from libsgl/animator/SkHitClear.h) | 0 | ||||
-rw-r--r-- | src/animator/SkHitTest.cpp (renamed from libsgl/animator/SkHitTest.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkHitTest.h (renamed from libsgl/animator/SkHitTest.h) | 0 | ||||
-rw-r--r-- | src/animator/SkIntArray.h (renamed from libsgl/animator/SkIntArray.h) | 0 | ||||
-rw-r--r-- | src/animator/SkMatrixParts.cpp (renamed from libsgl/animator/SkMatrixParts.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkMatrixParts.h (renamed from libsgl/animator/SkMatrixParts.h) | 0 | ||||
-rw-r--r-- | src/animator/SkMemberInfo.cpp (renamed from libsgl/animator/SkMemberInfo.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkMemberInfo.h (renamed from libsgl/animator/SkMemberInfo.h) | 0 | ||||
-rw-r--r-- | src/animator/SkOpArray.cpp (renamed from libsgl/animator/SkOpArray.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkOpArray.h (renamed from libsgl/animator/SkOpArray.h) | 0 | ||||
-rw-r--r-- | src/animator/SkOperand.h (renamed from libsgl/animator/SkOperand.h) | 0 | ||||
-rw-r--r-- | src/animator/SkOperand2.h (renamed from libsgl/animator/SkOperand2.h) | 0 | ||||
-rw-r--r-- | src/animator/SkOperandInterpolator.h (renamed from libsgl/animator/SkOperandInterpolator.h) | 0 | ||||
-rw-r--r-- | src/animator/SkOperandIterpolator.cpp (renamed from libsgl/animator/SkOperandIterpolator.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkPaintParts.cpp (renamed from libsgl/animator/SkPaintParts.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkPaintParts.h (renamed from libsgl/animator/SkPaintParts.h) | 0 | ||||
-rw-r--r-- | src/animator/SkParseSVGPath.cpp (renamed from libsgl/animator/SkSVGPath.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkPathParts.cpp (renamed from libsgl/animator/SkPathParts.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkPathParts.h (renamed from libsgl/animator/SkPathParts.h) | 0 | ||||
-rw-r--r-- | src/animator/SkPostParts.cpp (renamed from libsgl/animator/SkPostParts.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkPostParts.h (renamed from libsgl/animator/SkPostParts.h) | 0 | ||||
-rw-r--r-- | src/animator/SkScript.cpp (renamed from libsgl/animator/SkScript.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkScript.h (renamed from libsgl/animator/SkScript.h) | 0 | ||||
-rw-r--r-- | src/animator/SkScript2.h (renamed from libsgl/animator/SkScript2.h) | 0 | ||||
-rw-r--r-- | src/animator/SkScriptCallBack.h (renamed from libsgl/animator/SkScriptCallBack.h) | 0 | ||||
-rw-r--r-- | src/animator/SkScriptDecompile.cpp (renamed from libsgl/animator/SkScriptDecompile.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkScriptRuntime.cpp (renamed from libsgl/animator/SkScriptRuntime.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkScriptRuntime.h (renamed from libsgl/animator/SkScriptRuntime.h) | 0 | ||||
-rw-r--r-- | src/animator/SkScriptTokenizer.cpp (renamed from libsgl/animator/SkScriptTokenizer.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkSnapshot.cpp (renamed from libsgl/animator/SkSnapshot.cpp) | 3 | ||||
-rw-r--r-- | src/animator/SkSnapshot.h (renamed from libsgl/animator/SkSnapshot.h) | 3 | ||||
-rw-r--r-- | src/animator/SkTDArray_Experimental.h (renamed from libsgl/animator/SkTDArray_Experimental.h) | 0 | ||||
-rw-r--r-- | src/animator/SkTextOnPath.cpp (renamed from libsgl/animator/SkTextOnPath.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkTextOnPath.h (renamed from libsgl/animator/SkTextOnPath.h) | 0 | ||||
-rw-r--r-- | src/animator/SkTextToPath.cpp (renamed from libsgl/animator/SkTextToPath.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkTextToPath.h (renamed from libsgl/animator/SkTextToPath.h) | 0 | ||||
-rw-r--r-- | src/animator/SkTime.cpp (renamed from libsgl/animator/SkTime.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkTypedArray.cpp (renamed from libsgl/animator/SkTypedArray.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkTypedArray.h (renamed from libsgl/animator/SkTypedArray.h) | 0 | ||||
-rw-r--r-- | src/animator/SkXMLAnimatorWriter.cpp (renamed from libsgl/animator/SkXMLAnimatorWriter.cpp) | 0 | ||||
-rw-r--r-- | src/animator/SkXMLAnimatorWriter.h (renamed from libsgl/animator/SkXMLAnimatorWriter.h) | 0 | ||||
-rw-r--r-- | src/core/ARGB32_Clamp_Bilinear_BitmapShader.h (renamed from libsgl/sgl/ARGB32_Clamp_Bilinear_BitmapShader.h) | 0 | ||||
-rw-r--r-- | src/core/Sk64.cpp (renamed from libcorecg/Sk64.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkAlphaRuns.cpp (renamed from libsgl/sgl/SkAlphaRuns.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkAntiRun.h (renamed from libsgl/sgl/SkAntiRun.h) | 0 | ||||
-rw-r--r-- | src/core/SkBitmap.cpp (renamed from libsgl/sgl/SkBitmap.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapProcShader.cpp (renamed from libsgl/sgl/SkBitmapProcShader.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapProcShader.h (renamed from libsgl/sgl/SkBitmapProcShader.h) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapProcState.cpp (renamed from libsgl/sgl/SkBitmapProcState.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapProcState.h (renamed from libsgl/sgl/SkBitmapProcState.h) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapProcState_matrix.h (renamed from libsgl/sgl/SkBitmapProcState_matrix.h) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapProcState_matrixProcs.cpp (renamed from libsgl/sgl/SkBitmapProcState_matrixProcs.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapProcState_sample.h (renamed from libsgl/sgl/SkBitmapProcState_sample.h) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapSampler.cpp (renamed from libsgl/sgl/SkBitmapSampler.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapSampler.h (renamed from libsgl/sgl/SkBitmapSampler.h) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapSamplerTemplate.h (renamed from libsgl/sgl/SkBitmapSamplerTemplate.h) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapShader.cpp (renamed from libsgl/sgl/SkBitmapShader.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapShader.h (renamed from libsgl/sgl/SkBitmapShader.h) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapShader16BilerpTemplate.h (renamed from libsgl/sgl/SkBitmapShader16BilerpTemplate.h) | 0 | ||||
-rw-r--r-- | src/core/SkBitmapShaderTemplate.h (renamed from libsgl/sgl/SkBitmapShaderTemplate.h) | 0 | ||||
-rw-r--r-- | src/core/SkBitmap_scroll.cpp (renamed from libsgl/sgl/SkBitmap_scroll.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBlitBWMaskTemplate.h (renamed from libsgl/sgl/SkBlitBWMaskTemplate.h) | 0 | ||||
-rw-r--r-- | src/core/SkBlitRow.h (renamed from libsgl/sgl/SkBlitRow.h) | 0 | ||||
-rw-r--r-- | src/core/SkBlitRow_D16.cpp (renamed from libsgl/sgl/SkBlitRow_D16.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBlitRow_D4444.cpp (renamed from libsgl/sgl/SkBlitRow_D4444.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBlitter.cpp (renamed from libsgl/sgl/SkBlitter.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBlitter_4444.cpp (renamed from libsgl/sgl/SkBlitter_4444.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBlitter_A1.cpp (renamed from libsgl/sgl/SkBlitter_A1.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBlitter_A8.cpp (renamed from libsgl/sgl/SkBlitter_A8.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBlitter_ARGB32.cpp (renamed from libsgl/sgl/SkBlitter_ARGB32.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBlitter_RGB16.cpp (renamed from libsgl/sgl/SkBlitter_RGB16.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBlitter_Sprite.cpp (renamed from libsgl/sgl/SkBlitter_Sprite.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkBuffer.cpp (renamed from libcorecg/SkBuffer.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkCanvas.cpp (renamed from libsgl/sgl/SkCanvas.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkChunkAlloc.cpp (renamed from libcorecg/SkChunkAlloc.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkColor.cpp (renamed from libsgl/sgl/SkColor.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkColorFilter.cpp (renamed from libsgl/sgl/SkColorFilter.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkColorTable.cpp (renamed from libsgl/sgl/SkColorTable.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkComposeShader.cpp (renamed from libsgl/effects/SkShaderExtras.cpp) | 2 | ||||
-rw-r--r-- | src/core/SkCordic.cpp (renamed from libcorecg/SkCordic.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkCordic.h (renamed from libcorecg/SkCordic.h) | 0 | ||||
-rw-r--r-- | src/core/SkCoreBlitters.h (renamed from libsgl/sgl/SkCoreBlitters.h) | 0 | ||||
-rw-r--r-- | src/core/SkDebug.cpp (renamed from libcorecg/SkDebug.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkDebug_stdio.cpp (renamed from libcorecg/SkDebug_stdio.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkDeque.cpp (renamed from libsgl/sgl/SkDeque.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkDevice.cpp (renamed from libsgl/sgl/SkDevice.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkDither.cpp (renamed from libsgl/sgl/SkDither.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkDraw.cpp (renamed from libsgl/sgl/SkDraw.cpp) | 2 | ||||
-rw-r--r-- | src/core/SkDrawProcs.h (renamed from libsgl/sgl/SkDrawProcs.h) | 0 | ||||
-rw-r--r-- | src/core/SkEdge.cpp (renamed from libsgl/sgl/SkEdge.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkEdge.h (renamed from libsgl/sgl/SkEdge.h) | 0 | ||||
-rw-r--r-- | src/core/SkFP.h (renamed from libsgl/sgl/SkFP.h) | 0 | ||||
-rw-r--r-- | src/core/SkFilterProc.cpp (renamed from libsgl/sgl/SkFilterProc.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkFilterProc.h (renamed from libsgl/sgl/SkFilterProc.h) | 0 | ||||
-rw-r--r-- | src/core/SkFlattenable.cpp (renamed from libsgl/sgl/SkFlattenable.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkFloat.cpp (renamed from libcorecg/SkFloat.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkFloat.h (renamed from libcorecg/SkFloat.h) | 0 | ||||
-rw-r--r-- | src/core/SkFloatBits.cpp (renamed from libcorecg/SkFloatBits.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkGeometry.cpp (renamed from libsgl/sgl/SkGeometry.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkGlobals.cpp (renamed from libsgl/sgl/SkGlobals.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkGlyphCache.cpp (renamed from libsgl/sgl/SkGlyphCache.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkGlyphCache.h (renamed from libsgl/sgl/SkGlyphCache.h) | 0 | ||||
-rw-r--r-- | src/core/SkGraphics.cpp (renamed from libsgl/sgl/SkGraphics.cpp) | 2 | ||||
-rw-r--r-- | src/core/SkMMapStream.cpp (renamed from libsgl/images/SkMMapStream.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkMask.cpp (renamed from libsgl/sgl/SkMask.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkMaskFilter.cpp (renamed from libsgl/sgl/SkMaskFilter.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkMath.cpp (renamed from libcorecg/SkMath.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkMatrix.cpp (renamed from libcorecg/SkMatrix.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkMemory_stdlib.cpp (renamed from libcorecg/SkMemory_stdlib.cpp) | 17 | ||||
-rw-r--r-- | src/core/SkPackBits.cpp (renamed from libsgl/sgl/SkPackBits.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkPaint.cpp (renamed from libsgl/sgl/SkPaint.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkPath.cpp (renamed from libsgl/sgl/SkPath.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkPathEffect.cpp (renamed from libsgl/sgl/SkPathEffect.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkPathHeap.cpp (renamed from libsgl/picture/SkPathHeap.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkPathHeap.h (renamed from libsgl/picture/SkPathHeap.h) | 0 | ||||
-rw-r--r-- | src/core/SkPathMeasure.cpp (renamed from libsgl/sgl/SkPathMeasure.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkPicture.cpp (renamed from libsgl/picture/SkPicture.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkPictureFlat.cpp (renamed from libsgl/picture/SkPictureFlat.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkPictureFlat.h (renamed from libsgl/picture/SkPictureFlat.h) | 1 | ||||
-rw-r--r-- | src/core/SkPicturePlayback.cpp (renamed from libsgl/picture/SkPicturePlayback.cpp) | 3 | ||||
-rw-r--r-- | src/core/SkPicturePlayback.h (renamed from libsgl/picture/SkPicturePlayback.h) | 0 | ||||
-rw-r--r-- | src/core/SkPictureRecord.cpp (renamed from libsgl/picture/SkPictureRecord.cpp) | 8 | ||||
-rw-r--r-- | src/core/SkPictureRecord.h (renamed from libsgl/picture/SkPictureRecord.h) | 1 | ||||
-rw-r--r-- | src/core/SkPixelRef.cpp (renamed from libsgl/sgl/SkPixelRef.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkPoint.cpp (renamed from libcorecg/SkPoint.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkProcSpriteBlitter.cpp (renamed from libsgl/sgl/SkProcSpriteBlitter.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkPtrRecorder.cpp (renamed from libsgl/sgl/SkPtrRecorder.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkRasterizer.cpp (renamed from libsgl/sgl/SkRasterizer.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkRect.cpp (renamed from libcorecg/SkRect.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkRefCnt.cpp (renamed from libsgl/sgl/SkRefCnt.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkRegion.cpp (renamed from libcorecg/SkRegion.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkRegionPriv.h (renamed from libcorecg/SkRegionPriv.h) | 0 | ||||
-rw-r--r-- | src/core/SkRegion_path.cpp (renamed from libsgl/sgl/SkRegion_path.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkScalerContext.cpp (renamed from libsgl/sgl/SkScalerContext.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkScan.cpp (renamed from libsgl/sgl/SkScan.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkScanPriv.h (renamed from libsgl/sgl/SkScanPriv.h) | 0 | ||||
-rw-r--r-- | src/core/SkScan_AntiPath.cpp (renamed from libsgl/sgl/SkScan_AntiPath.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkScan_Antihair.cpp (renamed from libsgl/sgl/SkScan_Antihair.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkScan_Hairline.cpp (renamed from libsgl/sgl/SkScan_Hairline.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkScan_Path.cpp (renamed from libsgl/sgl/SkScan_Path.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkShader.cpp (renamed from libsgl/sgl/SkShader.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkSinTable.h (renamed from libcorecg/SkSinTable.h) | 0 | ||||
-rw-r--r-- | src/core/SkSpriteBlitter.h (renamed from libsgl/sgl/SkSpriteBlitter.h) | 0 | ||||
-rw-r--r-- | src/core/SkSpriteBlitterTemplate.h (renamed from libsgl/sgl/SkSpriteBlitterTemplate.h) | 0 | ||||
-rw-r--r-- | src/core/SkSpriteBlitter_ARGB32.cpp (renamed from libsgl/sgl/SkSpriteBlitter_ARGB32.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkSpriteBlitter_RGB16.cpp (renamed from libsgl/sgl/SkSpriteBlitter_RGB16.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkStream.cpp (renamed from libsgl/images/SkStream.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkString.cpp (renamed from libcorecg/SkString.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkStroke.cpp (renamed from libsgl/sgl/SkStroke.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkStrokerPriv.cpp (renamed from libsgl/sgl/SkStrokerPriv.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkStrokerPriv.h (renamed from libsgl/sgl/SkStrokerPriv.h) | 0 | ||||
-rw-r--r-- | src/core/SkTSearch.cpp (renamed from libsgl/sgl/SkTSearch.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkTSort.h (renamed from libsgl/sgl/SkTSort.h) | 0 | ||||
-rw-r--r-- | src/core/SkTemplatesPriv.h (renamed from libsgl/sgl/SkTemplatesPriv.h) | 0 | ||||
-rw-r--r-- | src/core/SkTypeface.cpp (renamed from libsgl/sgl/SkTypeface.cpp) | 3 | ||||
-rw-r--r-- | src/core/SkUnPreMultiply.cpp (renamed from libsgl/sgl/SkUnPreMultiply.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkUtils.cpp (renamed from libcorecg/SkUtils.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkWriter32.cpp (renamed from libsgl/sgl/SkWriter32.cpp) | 0 | ||||
-rw-r--r-- | src/core/SkXfermode.cpp (renamed from libsgl/sgl/SkXfermode.cpp) | 0 | ||||
-rw-r--r-- | src/effects/Sk1DPathEffect.cpp (renamed from libsgl/effects/Sk1DPathEffect.cpp) | 0 | ||||
-rw-r--r-- | src/effects/Sk2DPathEffect.cpp (renamed from libsgl/effects/Sk2DPathEffect.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkAvoidXfermode.cpp (renamed from libsgl/effects/SkAvoidXfermode.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkBlurDrawLooper.cpp (renamed from libsgl/effects/SkBlurDrawLooper.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkBlurMask.cpp (renamed from libsgl/effects/SkBlurMask.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkBlurMask.h (renamed from libsgl/effects/SkBlurMask.h) | 0 | ||||
-rw-r--r-- | src/effects/SkBlurMaskFilter.cpp (renamed from libsgl/effects/SkBlurMaskFilter.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkColorFilters.cpp (renamed from libsgl/effects/SkColorFilters.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkColorMatrixFilter.cpp (renamed from libsgl/effects/SkColorMatrixFilter.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkCornerPathEffect.cpp (renamed from libsgl/effects/SkCornerPathEffect.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkDashPathEffect.cpp (renamed from libsgl/effects/SkDashPathEffect.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkDiscretePathEffect.cpp (renamed from libsgl/effects/SkDiscretePathEffect.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkEmbossMask.cpp (renamed from libsgl/effects/SkEmbossMask.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkEmbossMask.h (renamed from libsgl/effects/SkEmbossMask.h) | 0 | ||||
-rw-r--r-- | src/effects/SkEmbossMaskFilter.cpp (renamed from libsgl/effects/SkEmbossMaskFilter.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkEmbossMask_Table.h (renamed from libsgl/effects/SkEmbossMask_Table.h) | 0 | ||||
-rw-r--r-- | src/effects/SkGradientShader.cpp (renamed from libsgl/effects/SkGradientShader.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkKernel33MaskFilter.cpp (renamed from libsgl/effects/SkKernel33MaskFilter.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkLayerDrawLooper.cpp (renamed from libsgl/effects/SkLayerDrawLooper.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkLayerRasterizer.cpp (renamed from libsgl/effects/SkLayerRasterizer.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkPaintFlagsDrawFilter.cpp (renamed from libsgl/effects/SkPaintFlagsDrawFilter.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkPixelXorXfermode.cpp (renamed from libsgl/effects/SkPixelXorXfermode.cpp) | 0 | ||||
-rw-r--r-- | src/effects/SkRadialGradient_Table.h (renamed from libsgl/effects/SkRadialGradient_Table.h) | 0 | ||||
-rw-r--r-- | src/effects/SkTransparentShader.cpp (renamed from libsgl/effects/SkTransparentShader.cpp) | 0 | ||||
-rw-r--r-- | src/gl/SkGL.cpp (renamed from libsgl/gl/SkGL.cpp) | 0 | ||||
-rw-r--r-- | src/gl/SkGL.h (renamed from libsgl/gl/SkGL.h) | 0 | ||||
-rw-r--r-- | src/gl/SkGLCanvas.cpp (renamed from libsgl/gl/SkGLCanvas.cpp) | 1 | ||||
-rw-r--r-- | src/gl/SkGLDevice.cpp (renamed from libsgl/gl/SkGLDevice.cpp) | 0 | ||||
-rw-r--r-- | src/gl/SkGLDevice.h (renamed from libsgl/gl/SkGLDevice.h) | 0 | ||||
-rw-r--r-- | src/gl/SkGLDevice_FBO.cpp (renamed from libsgl/gl/SkGLDevice_FBO.cpp) | 0 | ||||
-rw-r--r-- | src/gl/SkGLDevice_FBO.h (renamed from libsgl/gl/SkGLDevice_FBO.h) | 0 | ||||
-rw-r--r-- | src/gl/SkGLDevice_SWLayer.cpp (renamed from libsgl/gl/SkGLDevice_SWLayer.cpp) | 0 | ||||
-rw-r--r-- | src/gl/SkGLDevice_SWLayer.h (renamed from libsgl/gl/SkGLDevice_SWLayer.h) | 0 | ||||
-rw-r--r-- | src/gl/SkGLTextCache.cpp (renamed from libsgl/gl/SkGLTextCache.cpp) | 0 | ||||
-rw-r--r-- | src/gl/SkGLTextCache.h (renamed from libsgl/gl/SkGLTextCache.h) | 0 | ||||
-rw-r--r-- | src/gl/SkTextureCache.cpp (renamed from libsgl/gl/SkTextureCache.cpp) | 0 | ||||
-rw-r--r-- | src/gl/SkTextureCache.h (renamed from libsgl/gl/SkTextureCache.h) | 0 | ||||
-rw-r--r-- | src/images/SkBitmap_RLEPixels.h (renamed from libsgl/images/SkBitmap_RLEPixels.h) | 0 | ||||
-rw-r--r-- | src/images/SkCreateRLEPixelRef.cpp (renamed from libsgl/images/SkCreateRLEPixelRef.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkFDStream.cpp (renamed from libsgl/images/SkFDStream.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkFlipPixelRef.cpp (renamed from libsgl/images/SkFlipPixelRef.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkImageDecoder.cpp (renamed from libsgl/images/SkImageDecoder.cpp) | 33 | ||||
-rw-r--r-- | src/images/SkImageDecoder_fpdfemb.cpp (renamed from libsgl/images/SkImageDecoder_fpdfemb.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkImageDecoder_libbmp.cpp (renamed from libsgl/images/SkImageDecoder_libbmp.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkImageDecoder_libgif.cpp (renamed from libsgl/images/SkImageDecoder_libgif.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkImageDecoder_libico.cpp (renamed from libsgl/images/SkImageDecoder_libico.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkImageDecoder_libjpeg.cpp (renamed from libsgl/images/SkImageDecoder_libjpeg.cpp) | 5 | ||||
-rw-r--r-- | src/images/SkImageDecoder_libpng.cpp (renamed from libsgl/images/SkImageDecoder_libpng.cpp) | 4 | ||||
-rw-r--r-- | src/images/SkImageDecoder_libpvjpeg.cpp (renamed from libsgl/images/SkImageDecoder_libpvjpeg.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkImageDecoder_wbmp.cpp (renamed from libsgl/images/SkImageDecoder_wbmp.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkImageEncoder.cpp | 48 | ||||
-rw-r--r-- | src/images/SkImageRef.cpp (renamed from libsgl/images/SkImageRef.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkImageRefPool.cpp (renamed from libsgl/images/SkImageRefPool.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkImageRefPool.h (renamed from libsgl/images/SkImageRefPool.h) | 0 | ||||
-rw-r--r-- | src/images/SkImageRef_GlobalPool.cpp (renamed from libsgl/images/SkImageRef_GlobalPool.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkMovie.cpp (renamed from libsgl/images/SkMovie.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkMovie_gif.cpp (renamed from libsgl/images/SkMovie_gif.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkPageFlipper.cpp (renamed from libcorecg/SkPageFlipper.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkScaledBitmapSampler.cpp (renamed from libsgl/images/SkScaledBitmapSampler.cpp) | 0 | ||||
-rw-r--r-- | src/images/SkScaledBitmapSampler.h (renamed from libsgl/images/SkScaledBitmapSampler.h) | 0 | ||||
-rw-r--r-- | src/images/bmpdecoderhelper.cpp (renamed from libsgl/images/bmpdecoderhelper.cpp) | 0 | ||||
-rw-r--r-- | src/images/bmpdecoderhelper.h (renamed from libsgl/images/bmpdecoderhelper.h) | 0 | ||||
-rw-r--r-- | src/images/fpdfemb.h (renamed from libsgl/images/fpdfemb.h) | 0 | ||||
-rw-r--r-- | src/images/fpdfemb_ext.h (renamed from libsgl/images/fpdfemb_ext.h) | 0 | ||||
-rw-r--r-- | src/ports/SkFontHost_FONTPATH.cpp (renamed from libsgl/ports/SkFontHost_FONTPATH.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkFontHost_FreeType.cpp (renamed from libsgl/ports/SkFontHost_FreeType.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkFontHost_android.cpp (renamed from libsgl/ports/SkFontHost_android.cpp) | 5 | ||||
-rw-r--r-- | src/ports/SkFontHost_ascender.cpp (renamed from libsgl/ports/SkFontHost_ascender.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkFontHost_gamma.cpp (renamed from libsgl/ports/SkFontHost_gamma.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkFontHost_linux.cpp (renamed from libsgl/ports/SkFontHost_linux.cpp) | 0 | ||||
-rwxr-xr-x | src/ports/SkFontHost_mac.cpp (renamed from libsgl/ports/SkFontHost_mac.cpp) | 1140 | ||||
-rw-r--r-- | src/ports/SkFontHost_none.cpp (renamed from libsgl/ports/SkFontHost_none.cpp) | 6 | ||||
-rw-r--r-- | src/ports/SkFontHost_win.cpp (renamed from libsgl/ports/SkFontHost_win.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkGlobals_global.cpp (renamed from libsgl/ports/SkGlobals_global.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkImageDecoder_CG.cpp | 196 | ||||
-rw-r--r-- | src/ports/SkImageDecoder_Factory.cpp | 85 | ||||
-rw-r--r-- | src/ports/SkImageDecoder_empty.cpp (renamed from libsgl/ports/SkImageDecoder_Factory.cpp) | 9 | ||||
-rw-r--r-- | src/ports/SkImageEncoder_Factory.cpp | 32 | ||||
-rw-r--r-- | src/ports/SkImageRef_ashmem.cpp (renamed from libsgl/ports/SkImageRef_ashmem.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkImageRef_ashmem.h (renamed from libsgl/ports/SkImageRef_ashmem.h) | 0 | ||||
-rw-r--r-- | src/ports/SkOSEvent_android.cpp (renamed from libsgl/ports/SkOSEvent_android.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkOSEvent_dummy.cpp (renamed from libsgl/ports/SkOSEvent_dummy.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkOSFile_stdio.cpp (renamed from libsgl/ports/SkOSFile_stdio.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkThread_none.cpp (renamed from libsgl/ports/SkThread_none.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkThread_pthread.cpp (renamed from libsgl/ports/SkThread_pthread.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkThread_win.cpp (renamed from libsgl/ports/SkThread_win.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkTime_Unix.cpp (renamed from libsgl/ports/SkTime_Unix.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkXMLParser_empty.cpp (renamed from libsgl/ports/SkXMLParser_empty.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkXMLParser_expat.cpp (renamed from libsgl/ports/SkXMLParser_expat.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkXMLParser_tinyxml.cpp (renamed from libsgl/ports/SkXMLParser_tinyxml.cpp) | 0 | ||||
-rw-r--r-- | src/ports/SkXMLPullParser_expat.cpp (renamed from libsgl/ports/SkXMLPullParser_expat.cpp) | 0 | ||||
-rw-r--r-- | src/ports/sk_predefined_gamma.h (renamed from libsgl/ports/sk_predefined_gamma.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVG.cpp (renamed from libsgl/svg/SkSVG.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGCircle.cpp (renamed from libsgl/svg/SkSVGCircle.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGCircle.h (renamed from libsgl/svg/SkSVGCircle.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGClipPath.cpp (renamed from libsgl/svg/SkSVGClipPath.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGClipPath.h (renamed from libsgl/svg/SkSVGClipPath.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGDefs.cpp (renamed from libsgl/svg/SkSVGDefs.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGDefs.h (renamed from libsgl/svg/SkSVGDefs.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGElements.cpp (renamed from libsgl/svg/SkSVGElements.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGElements.h (renamed from libsgl/svg/SkSVGElements.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGEllipse.cpp (renamed from libsgl/svg/SkSVGEllipse.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGEllipse.h (renamed from libsgl/svg/SkSVGEllipse.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGFeColorMatrix.cpp (renamed from libsgl/svg/SkSVGFeColorMatrix.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGFeColorMatrix.h (renamed from libsgl/svg/SkSVGFeColorMatrix.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGFilter.cpp (renamed from libsgl/svg/SkSVGFilter.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGFilter.h (renamed from libsgl/svg/SkSVGFilter.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGG.cpp (renamed from libsgl/svg/SkSVGG.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGG.h (renamed from libsgl/svg/SkSVGG.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGGradient.cpp (renamed from libsgl/svg/SkSVGGradient.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGGradient.h (renamed from libsgl/svg/SkSVGGradient.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGGroup.cpp (renamed from libsgl/svg/SkSVGGroup.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGGroup.h (renamed from libsgl/svg/SkSVGGroup.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGImage.cpp (renamed from libsgl/svg/SkSVGImage.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGImage.h (renamed from libsgl/svg/SkSVGImage.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGLine.cpp (renamed from libsgl/svg/SkSVGLine.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGLine.h (renamed from libsgl/svg/SkSVGLine.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGLinearGradient.cpp (renamed from libsgl/svg/SkSVGLinearGradient.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGLinearGradient.h (renamed from libsgl/svg/SkSVGLinearGradient.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGMask.cpp (renamed from libsgl/svg/SkSVGMask.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGMask.h (renamed from libsgl/svg/SkSVGMask.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGMetadata.cpp (renamed from libsgl/svg/SkSVGMetadata.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGMetadata.h (renamed from libsgl/svg/SkSVGMetadata.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGPaintState.cpp (renamed from libsgl/svg/SkSVGPaintState.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGParser.cpp (renamed from libsgl/svg/SkSVGParser.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGPath.cpp (renamed from libsgl/svg/SkSVGPath.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGPath.h (renamed from libsgl/svg/SkSVGPath.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGPolygon.cpp (renamed from libsgl/svg/SkSVGPolygon.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGPolygon.h (renamed from libsgl/svg/SkSVGPolygon.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGPolyline.cpp (renamed from libsgl/svg/SkSVGPolyline.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGPolyline.h (renamed from libsgl/svg/SkSVGPolyline.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGRadialGradient.cpp (renamed from libsgl/svg/SkSVGRadialGradient.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGRadialGradient.h (renamed from libsgl/svg/SkSVGRadialGradient.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGRect.cpp (renamed from libsgl/svg/SkSVGRect.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGRect.h (renamed from libsgl/svg/SkSVGRect.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGSVG.cpp (renamed from libsgl/svg/SkSVGSVG.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGSVG.h (renamed from libsgl/svg/SkSVGSVG.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGStop.cpp (renamed from libsgl/svg/SkSVGStop.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGStop.h (renamed from libsgl/svg/SkSVGStop.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGSymbol.cpp (renamed from libsgl/svg/SkSVGSymbol.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGSymbol.h (renamed from libsgl/svg/SkSVGSymbol.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGText.cpp (renamed from libsgl/svg/SkSVGText.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGText.h (renamed from libsgl/svg/SkSVGText.h) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGUse.cpp (renamed from libsgl/svg/SkSVGUse.cpp) | 0 | ||||
-rw-r--r-- | src/svg/SkSVGUse.h (renamed from libsgl/svg/SkSVGUse.h) | 0 | ||||
-rw-r--r-- | src/utils/SkCamera.cpp (renamed from libsgl/effects/SkCamera.cpp) | 0 | ||||
-rw-r--r-- | src/utils/SkColorMatrix.cpp (renamed from libsgl/effects/SkColorMatrix.cpp) | 0 | ||||
-rw-r--r-- | src/utils/SkCullPoints.cpp (renamed from libsgl/effects/SkCullPoints.cpp) | 0 | ||||
-rw-r--r-- | src/utils/SkDumpCanvas.cpp (renamed from libsgl/effects/SkDumpCanvas.cpp) | 0 | ||||
-rw-r--r-- | src/utils/SkInterpolator.cpp (renamed from libcorecg/SkInterpolator.cpp) | 0 | ||||
-rw-r--r-- | src/utils/SkNinePatch.cpp (renamed from libsgl/effects/SkNinePatch.cpp) | 0 | ||||
-rw-r--r-- | src/utils/SkProxyCanvas.cpp (renamed from libsgl/effects/SkProxyCanvas.cpp) | 0 | ||||
-rw-r--r-- | src/utils/SkUnitMappers.cpp (renamed from libsgl/effects/SkUnitMappers.cpp) | 0 | ||||
-rw-r--r-- | src/utils/mac/SkBitmap_Mac.cpp (renamed from xcode/ports/SkBitmap_Mac.cpp) | 0 | ||||
-rw-r--r-- | src/utils/mac/SkCreateCGImageRef.cpp | 67 | ||||
-rw-r--r-- | src/utils/mac/SkOSWindow_Mac.cpp (renamed from xcode/ports/SkOSWindow_Mac.cpp) | 148 | ||||
-rw-r--r-- | src/views/SkBGViewArtist.cpp (renamed from libsgl/views/SkBGViewArtist.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkBorderView.cpp (renamed from libsgl/views/SkBorderView.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkEvent.cpp (renamed from libsgl/views/SkEvent.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkEventSink.cpp (renamed from libsgl/views/SkEventSink.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkImageView.cpp (renamed from libsgl/views/SkImageView.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkListView.cpp (renamed from libsgl/views/SkListView.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkListWidget.cpp (renamed from libsgl/views/SkListWidget.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkMetaData.cpp (renamed from libsgl/views/SkMetaData.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkOSFile.cpp (renamed from libsgl/views/SkOSFile.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkOSMenu.cpp (renamed from libsgl/views/SkOSMenu.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkOSSound.cpp (renamed from libsgl/views/SkOSSound.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkParsePaint.cpp (renamed from libsgl/views/SkParsePaint.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkProgressBarView.cpp (renamed from libsgl/views/SkProgressBarView.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkProgressView.cpp (renamed from libsgl/views/SkProgressView.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkScrollBarView.cpp (renamed from libsgl/views/SkScrollBarView.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkStackViewLayout.cpp (renamed from libsgl/views/SkStackViewLayout.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkTagList.cpp (renamed from libsgl/views/SkTagList.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkTagList.h (renamed from libsgl/views/SkTagList.h) | 0 | ||||
-rw-r--r-- | src/views/SkTextBox.cpp (renamed from libsgl/views/SkTextBox.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkView.cpp (renamed from libsgl/views/SkView.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkViewInflate.cpp (renamed from libsgl/views/SkViewInflate.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkViewPriv.cpp (renamed from libsgl/views/SkViewPriv.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkViewPriv.h (renamed from libsgl/views/SkViewPriv.h) | 0 | ||||
-rw-r--r-- | src/views/SkWidget.cpp (renamed from libsgl/views/SkWidget.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkWidgetViews.cpp (renamed from libsgl/views/SkWidgetViews.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkWidgets.cpp (renamed from libsgl/views/SkWidgets.cpp) | 0 | ||||
-rw-r--r-- | src/views/SkWindow.cpp (renamed from libsgl/views/SkWindow.cpp) | 11 | ||||
-rw-r--r-- | src/xml/SkBML_Verbs.h (renamed from libsgl/xml/SkBML_Verbs.h) | 0 | ||||
-rw-r--r-- | src/xml/SkBML_XMLParser.cpp (renamed from libsgl/xml/SkBML_XMLParser.cpp) | 0 | ||||
-rw-r--r-- | src/xml/SkDOM.cpp (renamed from libsgl/xml/SkDOM.cpp) | 0 | ||||
-rw-r--r-- | src/xml/SkJS.cpp (renamed from libsgl/xml/SkJS.cpp) | 0 | ||||
-rw-r--r-- | src/xml/SkJSDisplayable.cpp (renamed from libsgl/xml/SkJSDisplayable.cpp) | 4 | ||||
-rw-r--r-- | src/xml/SkParse.cpp (renamed from libsgl/xml/SkParse.cpp) | 0 | ||||
-rw-r--r-- | src/xml/SkParseColor.cpp (renamed from libsgl/xml/SkParseColor.cpp) | 2 | ||||
-rw-r--r-- | src/xml/SkXMLParser.cpp (renamed from libsgl/xml/SkXMLParser.cpp) | 0 | ||||
-rw-r--r-- | src/xml/SkXMLPullParser.cpp (renamed from libsgl/xml/SkXMLPullParser.cpp) | 0 | ||||
-rw-r--r-- | src/xml/SkXMLWriter.cpp (renamed from libsgl/xml/SkXMLWriter.cpp) | 0 | ||||
-rw-r--r-- | test/test.cpp | 42 | ||||
-rw-r--r-- | test/test.h | 56 | ||||
-rw-r--r-- | test/test_drawcolor.cpp | 53 | ||||
-rw-r--r-- | test/test_drawrect.cpp | 74 | ||||
-rw-r--r-- | xcode/benchmarks/benchmarks.xcodeproj/project.pbxproj | 267 | ||||
-rw-r--r-- | xcode/benchmarks/main.cpp | 33 | ||||
-rw-r--r-- | xcode/hostapp/test.cpp | 65 |
682 files changed, 1949 insertions, 1703 deletions
diff --git a/experimental/SkSetPoly3To3.cpp b/experimental/SkSetPoly3To3.cpp new file mode 100644 index 0000000..1420eba --- /dev/null +++ b/experimental/SkSetPoly3To3.cpp @@ -0,0 +1,60 @@ +#include "SkMatrix.h" + +static void computeOuterProduct(SkScalar op[4], + const SkPoint pts0[3], const SkPoint& ave0, + const SkPoint pts1[3], const SkPoint& ave1) { + bzero(op, 4 * sizeof(op[0])); + for (int i = 0; i < 3; i++) { + SkScalar x0 = pts0[i].fX - ave0.fX; + SkScalar y0 = pts0[i].fY - ave0.fY; + SkScalar x1 = pts1[i].fX - ave1.fX; + SkScalar y1 = pts1[i].fY - ave1.fY; + op[0] += SkScalarMul(x0, x1); + op[1] += SkScalarMul(x0, y1); + op[2] += SkScalarMul(y0, x1); + op[3] += SkScalarMul(y0, y1); + } +} + +static SkScalar dot(SkScalar ax, SkScalar ay, SkScalar bx, SkScalar by) { + return SkScalarMul(ax, bx) + SkScalarMul(ay, by); +} + +bool SkSetPoly3To3(SkMatrix* matrix, const SkPoint src[3], const SkPoint dst[3]) { + const SkPoint& srcAve = src[0]; + const SkPoint& dstAve = dst[0]; + + SkScalar srcOP[4], dstOP[4]; + + computeOuterProduct(srcOP, src, srcAve, src, srcAve); + computeOuterProduct(dstOP, src, srcAve, dst, dstAve); + + SkScalar det = SkScalarMul(srcOP[0], srcOP[3]) - SkScalarMul(srcOP[1], srcOP[2]); + + // need SkScalarNearlyZeroSquared for this (to match Chrome's fix) + if (SkScalarNearlyZero(det)) { + return false; + } + + SkScalar invDet = SkScalarInvert(det); + + // now compute invDet * [srcOP]T * [dstOP] + + // scale and transpose + const SkScalar srcOP0 = SkScalarMul( srcOP[3], invDet); + const SkScalar srcOP1 = SkScalarMul(-srcOP[1], invDet); + const SkScalar srcOP2 = SkScalarMul(-srcOP[2], invDet); + const SkScalar srcOP3 = SkScalarMul( srcOP[0], invDet); + + matrix->reset(); + matrix->setScaleX(dot(srcOP0, srcOP1, dstOP[0], dstOP[2])); + matrix->setSkewX( dot(srcOP2, srcOP3, dstOP[0], dstOP[2])); + matrix->setSkewY (dot(srcOP0, srcOP1, dstOP[1], dstOP[3])); + matrix->setScaleY(dot(srcOP2, srcOP3, dstOP[1], dstOP[3])); + matrix->setTranslateX(dstAve.fX - dot(srcAve.fX, srcAve.fY, + matrix->getScaleX(), matrix->getSkewX())); + matrix->setTranslateY(dstAve.fY - dot(srcAve.fX, srcAve.fY, + matrix->getSkewY(), matrix->getScaleY())); + return true; +} + diff --git a/experimental/SkSetPoly3To3_A.cpp b/experimental/SkSetPoly3To3_A.cpp new file mode 100644 index 0000000..cc953f5 --- /dev/null +++ b/experimental/SkSetPoly3To3_A.cpp @@ -0,0 +1,90 @@ +#include "SkMatrix.h" + +#ifdef SK_SCALAR_IS_FIXED + typedef int64_t SkDScalar; + + static SkScalar SkDScalar_toScalar(SkDScalar value) { + SkDScalar result = (value + (1 << 15)) >> 16; + int top = result >> 31; + SkASSERT(top == 0 || top == -1); + return (SkScalar)result; + } + static SkScalar div(SkDScalar numer, SkDScalar denom) { + denom >>= 16; + return numer / denom; + } +#else + typedef double SkDScalar; + + static SkScalar SkDScalar_toScalar(SkDScalar value) { + return static_cast<float>(value); + } + static SkScalar div(SkDScalar numer, SkDScalar denom) { + return static_cast<float>(numer / denom); + } +#endif + +static SkDScalar SkDScalar_setMul(SkScalar a, SkScalar b) { + return (SkDScalar)a * b; +} + +static void computeOuterProduct(SkScalar op[4], + const SkPoint pts0[3], const SkPoint& ave0, + const SkPoint pts1[3], const SkPoint& ave1) { + bzero(op, 4 * sizeof(op[0])); + for (int i = 0; i < 3; i++) { + SkScalar x0 = pts0[i].fX - ave0.fX; + SkScalar y0 = pts0[i].fY - ave0.fY; + SkScalar x1 = pts1[i].fX - ave1.fX; + SkScalar y1 = pts1[i].fY - ave1.fY; + op[0] += SkScalarMul(x0, x1); + op[1] += SkScalarMul(x0, y1); + op[2] += SkScalarMul(y0, x1); + op[3] += SkScalarMul(y0, y1); + } +} + +static SkDScalar ddot(SkScalar ax, SkScalar ay, SkScalar bx, SkScalar by) { + return SkDScalar_setMul(ax, bx) + SkDScalar_setMul(ay, by); +} + +static SkScalar dot(SkScalar ax, SkScalar ay, SkScalar bx, SkScalar by) { + return SkDScalar_toScalar(ddot(ax, ay, bx, by)); +} + +bool SkSetPoly3To3(SkMatrix* matrix, const SkPoint src[3], const SkPoint dst[3]) { + const SkPoint& srcAve = src[0]; + const SkPoint& dstAve = dst[0]; + + SkScalar srcOP[4], dstOP[4]; + + computeOuterProduct(srcOP, src, srcAve, src, srcAve); + computeOuterProduct(dstOP, src, srcAve, dst, dstAve); + + SkDScalar det = SkDScalar_setMul(srcOP[0], srcOP[3]) - + SkDScalar_setMul(srcOP[1], srcOP[2]); + + SkDScalar M[4]; + + const SkScalar srcOP0 = srcOP[3]; + const SkScalar srcOP1 = -srcOP[1]; + const SkScalar srcOP2 = -srcOP[2]; + const SkScalar srcOP3 = srcOP[0]; + + M[0] = ddot(srcOP0, srcOP1, dstOP[0], dstOP[2]); + M[1] = ddot(srcOP2, srcOP3, dstOP[0], dstOP[2]); + M[2] = ddot(srcOP0, srcOP1, dstOP[1], dstOP[3]); + M[3] = ddot(srcOP2, srcOP3, dstOP[1], dstOP[3]); + + matrix->reset(); + matrix->setScaleX(div(M[0], det)); + matrix->setSkewX( div(M[1], det)); + matrix->setSkewY (div(M[2], det)); + matrix->setScaleY(div(M[3], det)); + matrix->setTranslateX(dstAve.fX - dot(srcAve.fX, srcAve.fY, + matrix->getScaleX(), matrix->getSkewX())); + matrix->setTranslateY(dstAve.fY - dot(srcAve.fX, srcAve.fY, + matrix->getSkewY(), matrix->getScaleY())); + return true; +} + diff --git a/experimental/SkSetPoly3To3_D.cpp b/experimental/SkSetPoly3To3_D.cpp new file mode 100644 index 0000000..72ee9b1 --- /dev/null +++ b/experimental/SkSetPoly3To3_D.cpp @@ -0,0 +1,65 @@ +#include "SkMatrix.h" + +typedef int64_t SkDScalar; + +static SkScalar SkDScalar_toScalar(SkDScalar value) { + SkDScalar result = (value + (1 << 15)) >> 16; + int top = result >> 31; + SkASSERT(top == 0 || top == -1); + return (SkScalar)result; +} + +static SkDScalar SkDScalar_setMul(SkScalar a, SkScalar b) { + return (SkDScalar)a * b; +} + +static void computeOuterProduct(SkMatrix* matrix, + const SkPoint pts0[3], const SkPoint& ave0, + const SkPoint pts1[3], const SkPoint& ave1) { + SkDScalar tmp[4]; + bzero(tmp, sizeof(tmp)); + + for (int i = 0; i < 3; i++) { + SkScalar x0 = pts0[i].fX - ave0.fX; + SkScalar y0 = pts0[i].fY - ave0.fY; + SkScalar x1 = pts1[i].fX - ave1.fX; + SkScalar y1 = pts1[i].fY - ave1.fY; + tmp[0] += SkDScalar_setMul(x0, x1); + tmp[1] += SkDScalar_setMul(x0, y1); + tmp[2] += SkDScalar_setMul(y0, x1); + tmp[3] += SkDScalar_setMul(y0, y1); + } + matrix->reset(); + matrix->setScaleX(SkDScalar_toScalar(tmp[0])); + matrix->setSkewY( SkDScalar_toScalar(tmp[1])); + matrix->setSkewX( SkDScalar_toScalar(tmp[2])); + matrix->setScaleY(SkDScalar_toScalar(tmp[3])); +} + +static SkScalar dot(SkScalar ax, SkScalar ay, SkScalar bx, SkScalar by) { + return SkDScalar_toScalar(SkDScalar_setMul(ax, bx) + + SkDScalar_setMul(ay, by)); +} + +bool SkSetPoly3To3(SkMatrix* matrix, const SkPoint src[3], const SkPoint dst[3]) { + const SkPoint& srcAve = src[0]; + const SkPoint& dstAve = dst[0]; + + SkMatrix srcOP, dstOP; + + computeOuterProduct(&srcOP, src, srcAve, src, srcAve); + + if (!srcOP.invert(&srcOP)) { + return false; + } + + computeOuterProduct(&dstOP, src, srcAve, dst, dstAve); + + matrix->setConcat(dstOP, srcOP); + matrix->setTranslateX(dstAve.fX - dot(srcAve.fX, srcAve.fY, + matrix->getScaleX(), matrix->getSkewX())); + matrix->setTranslateY(dstAve.fY - dot(srcAve.fX, srcAve.fY, + matrix->getSkewY(), matrix->getScaleY())); + return true; +} + diff --git a/include/graphics/SkAnimator.h b/include/animator/SkAnimator.h index 04d342c..04d342c 100644 --- a/include/graphics/SkAnimator.h +++ b/include/animator/SkAnimator.h diff --git a/include/graphics/SkAnimatorView.h b/include/animator/SkAnimatorView.h index 3c6c8a1..3c6c8a1 100644 --- a/include/graphics/SkAnimatorView.h +++ b/include/animator/SkAnimatorView.h diff --git a/include/corecg/Sk64.h b/include/core/Sk64.h index c4ae41e..c4ae41e 100644 --- a/include/corecg/Sk64.h +++ b/include/core/Sk64.h diff --git a/libsgl/sgl/SkAutoKern.h b/include/core/SkAutoKern.h index 023cb6b..023cb6b 100644 --- a/libsgl/sgl/SkAutoKern.h +++ b/include/core/SkAutoKern.h diff --git a/include/graphics/SkBitmap.h b/include/core/SkBitmap.h index 02c8cd9..02c8cd9 100644 --- a/include/graphics/SkBitmap.h +++ b/include/core/SkBitmap.h diff --git a/libsgl/sgl/SkBlitter.h b/include/core/SkBlitter.h index 11b84fd..11b84fd 100644 --- a/libsgl/sgl/SkBlitter.h +++ b/include/core/SkBlitter.h diff --git a/include/graphics/SkBounder.h b/include/core/SkBounder.h index f20961d..f20961d 100644 --- a/include/graphics/SkBounder.h +++ b/include/core/SkBounder.h diff --git a/include/corecg/SkBuffer.h b/include/core/SkBuffer.h index bc11a1e..bc11a1e 100644 --- a/include/corecg/SkBuffer.h +++ b/include/core/SkBuffer.h diff --git a/include/graphics/SkCanvas.h b/include/core/SkCanvas.h index a19a5ae..a19a5ae 100644 --- a/include/graphics/SkCanvas.h +++ b/include/core/SkCanvas.h diff --git a/include/corecg/SkChunkAlloc.h b/include/core/SkChunkAlloc.h index 0e9ad18..0e9ad18 100644 --- a/include/corecg/SkChunkAlloc.h +++ b/include/core/SkChunkAlloc.h diff --git a/include/graphics/SkColor.h b/include/core/SkColor.h index c97a8ec..c97a8ec 100644 --- a/include/graphics/SkColor.h +++ b/include/core/SkColor.h diff --git a/include/graphics/SkColorFilter.h b/include/core/SkColorFilter.h index a1b3171..a1b3171 100644 --- a/include/graphics/SkColorFilter.h +++ b/include/core/SkColorFilter.h diff --git a/include/graphics/SkColorPriv.h b/include/core/SkColorPriv.h index 041c038..041c038 100644 --- a/include/graphics/SkColorPriv.h +++ b/include/core/SkColorPriv.h diff --git a/include/graphics/SkColorShader.h b/include/core/SkColorShader.h index f9c3dc3..f9c3dc3 100644 --- a/include/graphics/SkColorShader.h +++ b/include/core/SkColorShader.h diff --git a/include/graphics/SkShaderExtras.h b/include/core/SkComposeShader.h index 765f411..0b198f6 100644 --- a/include/graphics/SkShaderExtras.h +++ b/include/core/SkComposeShader.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef SkShaderExtras_DEFINED -#define SkShaderExtras_DEFINED +#ifndef SkComposeShader_DEFINED +#define SkComposeShader_DEFINED #include "SkShader.h" diff --git a/include/graphics/SkDeque.h b/include/core/SkDeque.h index cbed930..cbed930 100644 --- a/include/graphics/SkDeque.h +++ b/include/core/SkDeque.h diff --git a/include/graphics/SkDescriptor.h b/include/core/SkDescriptor.h index 8074cff..8074cff 100644 --- a/include/graphics/SkDescriptor.h +++ b/include/core/SkDescriptor.h diff --git a/include/graphics/SkDevice.h b/include/core/SkDevice.h index 4d678c6..4d678c6 100644 --- a/include/graphics/SkDevice.h +++ b/include/core/SkDevice.h diff --git a/include/graphics/SkDither.h b/include/core/SkDither.h index 5b2552d..5b2552d 100644 --- a/include/graphics/SkDither.h +++ b/include/core/SkDither.h diff --git a/include/graphics/SkDraw.h b/include/core/SkDraw.h index 2d775a4..8214859 100644 --- a/include/graphics/SkDraw.h +++ b/include/core/SkDraw.h @@ -92,7 +92,7 @@ public: #endif }; -#include "SkGlyphCache.h" +class SkGlyphCache; class SkTextToPathIter { public: diff --git a/include/graphics/SkDrawFilter.h b/include/core/SkDrawFilter.h index db5a685..db5a685 100644 --- a/include/graphics/SkDrawFilter.h +++ b/include/core/SkDrawFilter.h diff --git a/include/graphics/SkDrawLooper.h b/include/core/SkDrawLooper.h index 333fb41..333fb41 100644 --- a/include/graphics/SkDrawLooper.h +++ b/include/core/SkDrawLooper.h diff --git a/include/corecg/SkEndian.h b/include/core/SkEndian.h index f08a9a9..f08a9a9 100644 --- a/include/corecg/SkEndian.h +++ b/include/core/SkEndian.h diff --git a/include/corecg/SkFDot6.h b/include/core/SkFDot6.h index a4b9cf7..a4b9cf7 100644 --- a/include/corecg/SkFDot6.h +++ b/include/core/SkFDot6.h diff --git a/include/corecg/SkFixed.h b/include/core/SkFixed.h index be4bf99..be4bf99 100644 --- a/include/corecg/SkFixed.h +++ b/include/core/SkFixed.h diff --git a/include/graphics/SkFlattenable.h b/include/core/SkFlattenable.h index 6958462..6958462 100644 --- a/include/graphics/SkFlattenable.h +++ b/include/core/SkFlattenable.h diff --git a/include/corecg/SkFloatBits.h b/include/core/SkFloatBits.h index 1628f6e..1628f6e 100644 --- a/include/corecg/SkFloatBits.h +++ b/include/core/SkFloatBits.h diff --git a/include/corecg/SkFloatingPoint.h b/include/core/SkFloatingPoint.h index d3a6fc5..d3a6fc5 100644 --- a/include/corecg/SkFloatingPoint.h +++ b/include/core/SkFloatingPoint.h diff --git a/include/graphics/SkFontHost.h b/include/core/SkFontHost.h index ede40b7..9700bf9 100644 --- a/include/graphics/SkFontHost.h +++ b/include/core/SkFontHost.h @@ -71,7 +71,13 @@ public: responsible for unref-ing the returned typeface (if it is not null). */ static SkTypeface* CreateTypeface(SkStream*); - + + /** Return a new typeface from the specified file path. If the file does not + represent a valid font, this returns null. If a typeface is returned, + the caller is responsible for calling unref() when it is no longer used. + */ + static SkTypeface* CreateTypefaceFromFile(const char path[]); + /////////////////////////////////////////////////////////////////////////// /** Write a unique identifier to the stream, so that the same typeface can diff --git a/libsgl/sgl/SkGeometry.h b/include/core/SkGeometry.h index 571159f..571159f 100644 --- a/libsgl/sgl/SkGeometry.h +++ b/include/core/SkGeometry.h diff --git a/include/graphics/SkGlobals.h b/include/core/SkGlobals.h index 8e28290..8e28290 100644 --- a/include/graphics/SkGlobals.h +++ b/include/core/SkGlobals.h diff --git a/include/graphics/SkGraphics.h b/include/core/SkGraphics.h index cb06128..cb06128 100644 --- a/include/graphics/SkGraphics.h +++ b/include/core/SkGraphics.h diff --git a/include/graphics/SkMMapStream.h b/include/core/SkMMapStream.h index 600c621..600c621 100644 --- a/include/graphics/SkMMapStream.h +++ b/include/core/SkMMapStream.h diff --git a/include/graphics/SkMallocPixelRef.h b/include/core/SkMallocPixelRef.h index b6a013d..b6a013d 100644 --- a/include/graphics/SkMallocPixelRef.h +++ b/include/core/SkMallocPixelRef.h diff --git a/include/graphics/SkMask.h b/include/core/SkMask.h index 764ead6..764ead6 100644 --- a/include/graphics/SkMask.h +++ b/include/core/SkMask.h diff --git a/include/graphics/SkMaskFilter.h b/include/core/SkMaskFilter.h index 749a73a..749a73a 100644 --- a/include/graphics/SkMaskFilter.h +++ b/include/core/SkMaskFilter.h diff --git a/include/corecg/SkMath.h b/include/core/SkMath.h index 5c2b475..5c2b475 100644 --- a/include/corecg/SkMath.h +++ b/include/core/SkMath.h diff --git a/include/corecg/SkMatrix.h b/include/core/SkMatrix.h index 2b25dca..2b25dca 100644 --- a/include/corecg/SkMatrix.h +++ b/include/core/SkMatrix.h diff --git a/include/graphics/SkOSFile.h b/include/core/SkOSFile.h index de8090c..de8090c 100644 --- a/include/graphics/SkOSFile.h +++ b/include/core/SkOSFile.h diff --git a/include/graphics/SkPackBits.h b/include/core/SkPackBits.h index c11231b..c11231b 100644 --- a/include/graphics/SkPackBits.h +++ b/include/core/SkPackBits.h diff --git a/include/graphics/SkPaint.h b/include/core/SkPaint.h index fc390ab..fc390ab 100644 --- a/include/graphics/SkPaint.h +++ b/include/core/SkPaint.h diff --git a/include/graphics/SkPath.h b/include/core/SkPath.h index e2409ad..e2409ad 100644 --- a/include/graphics/SkPath.h +++ b/include/core/SkPath.h diff --git a/include/graphics/SkPathEffect.h b/include/core/SkPathEffect.h index f97adb7..f97adb7 100644 --- a/include/graphics/SkPathEffect.h +++ b/include/core/SkPathEffect.h diff --git a/include/graphics/SkPathMeasure.h b/include/core/SkPathMeasure.h index 5ab97ca..5ab97ca 100644 --- a/include/graphics/SkPathMeasure.h +++ b/include/core/SkPathMeasure.h diff --git a/include/corecg/SkPerspIter.h b/include/core/SkPerspIter.h index 81ce7c8..81ce7c8 100644 --- a/include/corecg/SkPerspIter.h +++ b/include/core/SkPerspIter.h diff --git a/include/graphics/SkPicture.h b/include/core/SkPicture.h index fa614c9..fa614c9 100644 --- a/include/graphics/SkPicture.h +++ b/include/core/SkPicture.h diff --git a/include/graphics/SkPixelRef.h b/include/core/SkPixelRef.h index 82e5ca7..82e5ca7 100644 --- a/include/graphics/SkPixelRef.h +++ b/include/core/SkPixelRef.h diff --git a/include/corecg/SkPoint.h b/include/core/SkPoint.h index f038afb..f038afb 100644 --- a/include/corecg/SkPoint.h +++ b/include/core/SkPoint.h diff --git a/include/graphics/SkPorterDuff.h b/include/core/SkPorterDuff.h index f03e9cb..f03e9cb 100644 --- a/include/graphics/SkPorterDuff.h +++ b/include/core/SkPorterDuff.h diff --git a/include/corecg/SkPostConfig.h b/include/core/SkPostConfig.h index e32d6a1..8feae72 100644 --- a/include/corecg/SkPostConfig.h +++ b/include/core/SkPostConfig.h @@ -88,6 +88,9 @@ #ifndef SK_SCALAR_SLOW_COMPARES #define SK_SCALAR_SLOW_COMPARES #endif + #ifndef SK_USE_FLOATBITS + #define SK_USE_FLOATBITS + #endif #endif #ifdef SK_BUILD_FOR_WIN @@ -98,14 +101,6 @@ #ifndef SK_DEBUGBREAK #define SK_DEBUGBREAK(cond) do { if (!(cond)) DebugBreak(); } while (false) #endif - - #ifdef SK_BUILD_FOR_WIN32 - #define strcasecmp(a, b) stricmp(a, b) - #define strncasecmp(a, b, c) strnicmp(a, b, c) - #elif defined(SK_BUILD_FOR_WINCE) - #define strcasecmp(a, b) _stricmp(a, b) - #define strncasecmp(a, b, c) _strnicmp(a, b, c) - #endif #elif defined(SK_BUILD_FOR_MAC) #ifndef SK_DEBUGBREAK #define SK_DEBUGBREAK(cond) do { if (!(cond)) SK_CRASH(); } while (false) @@ -160,6 +155,21 @@ #define sk_strnequal(s, t, n) (!sk_strncmp(s, t, n)) #endif +////////////////////////////////////////////////////////////////////// + +#if defined(SK_BUILD_FOR_WIN32) || defined(SK_BUILD_FOR_MAC) + #ifndef SkLONGLONG + #ifdef SK_BUILD_FOR_WIN32 + #define SkLONGLONG __int64 + #else + #define SkLONGLONG long long + #endif + #endif +#endif + +// experimental for now +#define SK_SUPPORT_MIPMAP + ////////////////////////////////////////////////////////////////////////////////////////////// #ifndef SK_BUILD_FOR_WINCE #include <string.h> diff --git a/include/corecg/SkPreConfig.h b/include/core/SkPreConfig.h index 04f1987..05f3d43 100644 --- a/include/corecg/SkPreConfig.h +++ b/include/core/SkPreConfig.h @@ -17,11 +17,6 @@ #ifndef SkPreConfig_DEFINED #define SkPreConfig_DEFINED -#ifdef ANDROID - #define SK_BUILD_FOR_UNIX - #define SkLONGLONG int64_t -#endif - ////////////////////////////////////////////////////////////////////// #if !defined(SK_BUILD_FOR_PALM) && !defined(SK_BUILD_FOR_WINCE) && !defined(SK_BUILD_FOR_WIN32) && !defined(SK_BUILD_FOR_SYMBIAN) && !defined(SK_BUILD_FOR_UNIX) && !defined(SK_BUILD_FOR_MAC) @@ -54,26 +49,15 @@ ////////////////////////////////////////////////////////////////////// -// define to blank or change this in SkUserConfig.h as needed -#define SK_RESTRICT __restrict__ +#if !defined(SK_RESTRICT) + #define SK_RESTRICT __restrict__ +#endif ////////////////////////////////////////////////////////////////////// -#if defined(SK_BUILD_FOR_WIN32) || defined(SK_BUILD_FOR_MAC) - #ifndef SK_CAN_USE_FLOAT - #define SK_CAN_USE_FLOAT - #endif - #if !defined(SK_SCALAR_IS_FIXED) && !defined(SK_SCALAR_IS_FLOAT) - #define SK_SCALAR_IS_FIXED - #endif - - #ifndef SkLONGLONG - #ifdef SK_BUILD_FOR_WIN32 - #define SkLONGLONG __int64 - #else - #define SkLONGLONG long long - #endif - #endif +#if !defined(SK_SCALAR_IS_FLOAT) && !defined(SK_SCALAR_IS_FIXED) + #define SK_SCALAR_IS_FLOAT + #define SK_CAN_USE_FLOAT #endif ////////////////////////////////////////////////////////////////////// @@ -93,18 +77,5 @@ #define SK_CPU_HAS_CONDITIONAL_INSTR #endif -////////////////////////////////////////////////////////////////////// -// Conditional features based on build target - -#if defined(SK_BUILD_FOR_WIN32) || defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_UNIX) - #ifndef SK_BUILD_NO_IMAGE_ENCODE - #define SK_SUPPORT_IMAGE_ENCODE - #endif -#endif - -#ifdef SK_BUILD_FOR_SYMBIAN - #define SK_USE_RUNTIME_GLOBALS -#endif - #endif diff --git a/include/graphics/SkPtrRecorder.h b/include/core/SkPtrRecorder.h index ff1e14d..ff1e14d 100644 --- a/include/graphics/SkPtrRecorder.h +++ b/include/core/SkPtrRecorder.h diff --git a/include/corecg/SkRandom.h b/include/core/SkRandom.h index 33b563a..33b563a 100644 --- a/include/corecg/SkRandom.h +++ b/include/core/SkRandom.h diff --git a/include/graphics/SkRasterizer.h b/include/core/SkRasterizer.h index d81e613..d81e613 100644 --- a/include/graphics/SkRasterizer.h +++ b/include/core/SkRasterizer.h diff --git a/include/graphics/SkReader32.h b/include/core/SkReader32.h index 1c72a87..1c72a87 100644 --- a/include/graphics/SkReader32.h +++ b/include/core/SkReader32.h diff --git a/include/corecg/SkRect.h b/include/core/SkRect.h index a9f25aa..a9f25aa 100644 --- a/include/corecg/SkRect.h +++ b/include/core/SkRect.h diff --git a/include/graphics/SkRefCnt.h b/include/core/SkRefCnt.h index adb59dd..adb59dd 100644 --- a/include/graphics/SkRefCnt.h +++ b/include/core/SkRefCnt.h diff --git a/include/corecg/SkRegion.h b/include/core/SkRegion.h index 8b15a89..8b15a89 100644 --- a/include/corecg/SkRegion.h +++ b/include/core/SkRegion.h diff --git a/include/corecg/SkScalar.h b/include/core/SkScalar.h index 86341eb..86341eb 100644 --- a/include/corecg/SkScalar.h +++ b/include/core/SkScalar.h diff --git a/include/corecg/SkScalarCompare.h b/include/core/SkScalarCompare.h index fee554c..fee554c 100644 --- a/include/corecg/SkScalarCompare.h +++ b/include/core/SkScalarCompare.h diff --git a/include/graphics/SkScalerContext.h b/include/core/SkScalerContext.h index ec2cd0d..ec2cd0d 100644 --- a/include/graphics/SkScalerContext.h +++ b/include/core/SkScalerContext.h diff --git a/libsgl/sgl/SkScan.h b/include/core/SkScan.h index 379c016..379c016 100644 --- a/libsgl/sgl/SkScan.h +++ b/include/core/SkScan.h diff --git a/include/graphics/SkShader.h b/include/core/SkShader.h index 7c13e3d..7c13e3d 100644 --- a/include/graphics/SkShader.h +++ b/include/core/SkShader.h diff --git a/include/graphics/SkStream.h b/include/core/SkStream.h index 26ef43f..26ef43f 100644 --- a/include/graphics/SkStream.h +++ b/include/core/SkStream.h diff --git a/include/corecg/SkString.h b/include/core/SkString.h index 743b093..743b093 100644 --- a/include/corecg/SkString.h +++ b/include/core/SkString.h diff --git a/include/graphics/SkStroke.h b/include/core/SkStroke.h index b593b69..b593b69 100644 --- a/include/graphics/SkStroke.h +++ b/include/core/SkStroke.h diff --git a/include/graphics/SkTDArray.h b/include/core/SkTDArray.h index 4d2d7f7..4d2d7f7 100644 --- a/include/graphics/SkTDArray.h +++ b/include/core/SkTDArray.h diff --git a/include/graphics/SkTDStack.h b/include/core/SkTDStack.h index 5bc10ee..5bc10ee 100644 --- a/include/graphics/SkTDStack.h +++ b/include/core/SkTDStack.h diff --git a/include/graphics/SkTDict.h b/include/core/SkTDict.h index 0b92779..0b92779 100644 --- a/include/graphics/SkTDict.h +++ b/include/core/SkTDict.h diff --git a/include/corecg/SkTSearch.h b/include/core/SkTSearch.h index f29e6f5..f29e6f5 100644 --- a/include/corecg/SkTSearch.h +++ b/include/core/SkTSearch.h diff --git a/include/corecg/SkTemplates.h b/include/core/SkTemplates.h index 27ebd41..27ebd41 100644 --- a/include/corecg/SkTemplates.h +++ b/include/core/SkTemplates.h diff --git a/include/corecg/SkThread.h b/include/core/SkThread.h index 637492d..637492d 100644 --- a/include/corecg/SkThread.h +++ b/include/core/SkThread.h diff --git a/include/corecg/SkThread_platform.h b/include/core/SkThread_platform.h index 825b737..825b737 100644 --- a/include/corecg/SkThread_platform.h +++ b/include/core/SkThread_platform.h diff --git a/include/graphics/SkTime.h b/include/core/SkTime.h index 9ee7110..9ee7110 100644 --- a/include/graphics/SkTime.h +++ b/include/core/SkTime.h diff --git a/include/graphics/SkTypeface.h b/include/core/SkTypeface.h index 546edca..546edca 100644 --- a/include/graphics/SkTypeface.h +++ b/include/core/SkTypeface.h diff --git a/include/corecg/SkTypes.h b/include/core/SkTypes.h index 0554c73..0554c73 100644 --- a/include/corecg/SkTypes.h +++ b/include/core/SkTypes.h diff --git a/include/graphics/SkUnPreMultiply.h b/include/core/SkUnPreMultiply.h index 4bdb980..4bdb980 100644 --- a/include/graphics/SkUnPreMultiply.h +++ b/include/core/SkUnPreMultiply.h diff --git a/include/graphics/SkUnitMapper.h b/include/core/SkUnitMapper.h index 5d1ea35..5d1ea35 100644 --- a/include/graphics/SkUnitMapper.h +++ b/include/core/SkUnitMapper.h diff --git a/include/core/SkUserConfig.h b/include/core/SkUserConfig.h new file mode 100644 index 0000000..96c278a --- /dev/null +++ b/include/core/SkUserConfig.h @@ -0,0 +1,144 @@ +/* + * Copyright (C) 2006 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef SkUserConfig_DEFINED +#define SkUserConfig_DEFINED + +/* SkTypes.h, the root of the public header files, does the following trick: + + #include "SkPreConfig.h" + #include "SkUserConfig.h" + #include "SkPostConfig.h" + + SkPreConfig.h runs first, and it is responsible for initializing certain + skia defines. + + SkPostConfig.h runs last, and its job is to just check that the final + defines are consistent (i.e. that we don't have mutually conflicting + defines). + + SkUserConfig.h (this file) runs in the middle. It gets to change or augment + the list of flags initially set in preconfig, and then postconfig checks + that everything still makes sense. + + Below are optional defines that add, subtract, or change default behavior + in Skia. Your port can locally edit this file to enable/disable flags as + you choose, or these can be delared on your command line (i.e. -Dfoo). + + By default, this include file will always default to having all of the flags + commented out, so including it will have no effect. +*/ + +/////////////////////////////////////////////////////////////////////////////// + +// +// ANDROID Specific changes - NO NOT CHECK BACK INTO code.google.com/p/skia +// +#include <utils/misc.h> + +#ifdef SK_BUILD_FOR_MAC + #undef SK_BUILD_FOR_MAC +#endif +#define SK_BUILD_FOR_UNIX + +/* Scalars (the fractional value type in skia) can be implemented either as + floats or 16.16 integers (fixed). Exactly one of these two symbols must be + defined. +*/ +#define SK_SCALAR_IS_FLOAT +#undef SK_SCALAR_IS_FIXED + + +/* Somewhat independent of how SkScalar is implemented, Skia also wants to know + if it can use floats at all. Naturally, if SK_SCALAR_IS_FLOAT is defined, + then so muse SK_CAN_USE_FLOAT, but if scalars are fixed, SK_CAN_USE_FLOAT + can go either way. + */ +#define SK_CAN_USE_FLOAT + +/* For some performance-critical scalar operations, skia will optionally work + around the standard float operators if it knows that the CPU does not have + native support for floats. If your environment uses software floating point, + define this flag. + */ +#define SK_SOFTWARE_FLOAT + + +/* Skia has lots of debug-only code. Often this is just null checks or other + parameter checking, but sometimes it can be quite intrusive (e.g. check that + each 32bit pixel is in premultiplied form). This code can be very useful + during development, but will slow things down in a shipping product. + + By default, these mutually exclusive flags are defined in SkPreConfig.h, + based on the presence or absence of NDEBUG, but that decision can be changed + here. + */ +//#define SK_DEBUG +//#define SK_RELEASE + + +/* If, in debugging mode, Skia needs to stop (presumably to invoke a debugger) + it will call SK_CRASH(). If this is not defined it, it is defined in + SkPostConfig.h to write to an illegal address + */ +//#define SK_CRASH() *(int *)(uintptr_t)0 = 0 + + +/* preconfig will have attempted to determine the endianness of the system, + but you can change these mutually exclusive flags here. + */ +#if __BYTE_ORDER == __BIG_ENDIAN + #define SK_CPU_BENDIAN + #undef SK_CPU_LENDIAN +#else + #define SK_CPU_LENDIAN + #undef SK_CPU_BENDIAN +#endif + + +/* Some compilers don't support long long for 64bit integers. If yours does + not, define this to the appropriate type. + */ +#define SkLONGLONG int64_t + + +/* Some envorinments do not suport writable globals (eek!). If yours does not, + define this flag. + */ +//#define SK_USE_RUNTIME_GLOBALS + + +/* To write debug messages to a console, skia will call SkDebugf(...) following + printf conventions (e.g. const char* format, ...). If you want to redirect + this to something other than printf, define yours here + */ +#define SkDebugf(...) Android_SkDebugf(__FILE__, __LINE__, \ + __FUNCTION__, __VA_ARGS__) +void Android_SkDebugf(const char* file, int line, + const char* function, const char* format, ...); + + + +/* If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST + which will run additional self-tests at startup. These can take a long time, + so this flag is optional. + */ +#ifdef SK_DEBUG + #define SK_SUPPORT_UNITTEST +#endif + +#endif + diff --git a/include/corecg/SkUtils.h b/include/core/SkUtils.h index f3e3341..f3e3341 100644 --- a/include/corecg/SkUtils.h +++ b/include/core/SkUtils.h diff --git a/include/graphics/SkWriter32.h b/include/core/SkWriter32.h index aeeb37d..aeeb37d 100644 --- a/include/graphics/SkWriter32.h +++ b/include/core/SkWriter32.h diff --git a/include/graphics/SkXfermode.h b/include/core/SkXfermode.h index f7e6510..f7e6510 100644 --- a/include/graphics/SkXfermode.h +++ b/include/core/SkXfermode.h diff --git a/include/corecg/SkUserConfig.h b/include/corecg/SkUserConfig.h deleted file mode 100644 index cc69cd7..0000000 --- a/include/corecg/SkUserConfig.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2006 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SkUserConfig_DEFINED -#define SkUserConfig_DEFINED - -// remove the x if you want to force us into SK_DEBUG mode -#ifdef SK_RELEASEx - #undef SK_RELEASE - #define SK_DEBUG -#endif - -// remove the x if you want to force us into SK_RELEASE mode -#ifdef SK_DEBUGx - #undef SK_DEBUG - #define SK_RELEASE -#endif - -#ifdef ANDROID - #include <utils/misc.h> - -#if 0 - // force fixed - #define SK_SCALAR_IS_FIXED - #undef SK_SCALAR_IS_FLOAT -#else - // force floats - #ifdef SK_SCALAR_IS_FIXED - #undef SK_SCALAR_IS_FIXED - #endif - #define SK_SCALAR_IS_FLOAT -#endif - - #define SK_CAN_USE_FLOAT - #define SK_SOFTWARE_FLOAT - #define SkLONGLONG int64_t - - // replace some sw float routines (floor, ceil, etc.) - #define SK_USE_FLOATBITS - - #if __BYTE_ORDER == __BIG_ENDIAN - #define SK_CPU_BENDIAN - #undef SK_CPU_LENDIAN - #else - #define SK_CPU_LENDIAN - #undef SK_CPU_BENDIAN - #endif - - // define SkDebugf to record file/line - #define SkDebugf(...) Android_SkDebugf(__FILE__, __LINE__, \ - __FUNCTION__, __VA_ARGS__) - void Android_SkDebugf(const char* file, int line, - const char* function, const char* format, ...); -#endif - -/* This file is included before all other headers, except for SkPreConfig.h. - That file uses various heuristics to make a "best guess" at settings for - the following build defines. - - However, in this file you can override any of those decisions by either - defining new symbols, or #undef symbols that were already set. -*/ - -// experimental for now -#define SK_SUPPORT_MIPMAP - -#ifdef SK_DEBUG - #define SK_SUPPORT_UNITTEST - /* Define SK_SIMULATE_FAILED_MALLOC to have - * sk_malloc throw an exception. Use this to - * detect unhandled memory leaks. */ - //#define SK_SIMULATE_FAILED_MALLOC - //#define SK_FIND_MEMORY_LEAKS -#endif - -#ifdef SK_BUILD_FOR_BREW - #include "SkBrewUserConfig.h" -#endif - -#endif - diff --git a/include/graphics/Sk1DPathEffect.h b/include/effects/Sk1DPathEffect.h index db01055..db01055 100644 --- a/include/graphics/Sk1DPathEffect.h +++ b/include/effects/Sk1DPathEffect.h diff --git a/include/graphics/Sk2DPathEffect.h b/include/effects/Sk2DPathEffect.h index 6e54d0a..6e54d0a 100644 --- a/include/graphics/Sk2DPathEffect.h +++ b/include/effects/Sk2DPathEffect.h diff --git a/include/graphics/SkAvoidXfermode.h b/include/effects/SkAvoidXfermode.h index 32bc049..32bc049 100644 --- a/include/graphics/SkAvoidXfermode.h +++ b/include/effects/SkAvoidXfermode.h diff --git a/include/graphics/SkBlurDrawLooper.h b/include/effects/SkBlurDrawLooper.h index 028b2eb..028b2eb 100644 --- a/include/graphics/SkBlurDrawLooper.h +++ b/include/effects/SkBlurDrawLooper.h diff --git a/include/graphics/SkBlurMaskFilter.h b/include/effects/SkBlurMaskFilter.h index b90ea5e..b90ea5e 100644 --- a/include/graphics/SkBlurMaskFilter.h +++ b/include/effects/SkBlurMaskFilter.h diff --git a/include/graphics/SkColorMatrix.h b/include/effects/SkColorMatrix.h index cee5d6e..cee5d6e 100644 --- a/include/graphics/SkColorMatrix.h +++ b/include/effects/SkColorMatrix.h diff --git a/include/graphics/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h index f9194df..f9194df 100644 --- a/include/graphics/SkColorMatrixFilter.h +++ b/include/effects/SkColorMatrixFilter.h diff --git a/include/graphics/SkCornerPathEffect.h b/include/effects/SkCornerPathEffect.h index a459478..a459478 100644 --- a/include/graphics/SkCornerPathEffect.h +++ b/include/effects/SkCornerPathEffect.h diff --git a/include/graphics/SkDashPathEffect.h b/include/effects/SkDashPathEffect.h index cc414e3..cc414e3 100644 --- a/include/graphics/SkDashPathEffect.h +++ b/include/effects/SkDashPathEffect.h diff --git a/include/graphics/SkDiscretePathEffect.h b/include/effects/SkDiscretePathEffect.h index 2950950..2950950 100644 --- a/include/graphics/SkDiscretePathEffect.h +++ b/include/effects/SkDiscretePathEffect.h diff --git a/include/graphics/SkDrawExtraPathEffect.h b/include/effects/SkDrawExtraPathEffect.h index 65e255a..65e255a 100644 --- a/include/graphics/SkDrawExtraPathEffect.h +++ b/include/effects/SkDrawExtraPathEffect.h diff --git a/include/graphics/SkEmbossMaskFilter.h b/include/effects/SkEmbossMaskFilter.h index 042a2a6..042a2a6 100644 --- a/include/graphics/SkEmbossMaskFilter.h +++ b/include/effects/SkEmbossMaskFilter.h diff --git a/include/graphics/SkGradientShader.h b/include/effects/SkGradientShader.h index 9a8696c..9a8696c 100644 --- a/include/graphics/SkGradientShader.h +++ b/include/effects/SkGradientShader.h diff --git a/include/graphics/SkKernel33MaskFilter.h b/include/effects/SkKernel33MaskFilter.h index 84136e2..84136e2 100644 --- a/include/graphics/SkKernel33MaskFilter.h +++ b/include/effects/SkKernel33MaskFilter.h diff --git a/include/graphics/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h index 670ac23..670ac23 100644 --- a/include/graphics/SkLayerDrawLooper.h +++ b/include/effects/SkLayerDrawLooper.h diff --git a/include/graphics/SkLayerRasterizer.h b/include/effects/SkLayerRasterizer.h index 820f6fc..820f6fc 100644 --- a/include/graphics/SkLayerRasterizer.h +++ b/include/effects/SkLayerRasterizer.h diff --git a/include/graphics/SkPaintFlagsDrawFilter.h b/include/effects/SkPaintFlagsDrawFilter.h index 941be24..941be24 100644 --- a/include/graphics/SkPaintFlagsDrawFilter.h +++ b/include/effects/SkPaintFlagsDrawFilter.h diff --git a/include/graphics/SkPixelXorXfermode.h b/include/effects/SkPixelXorXfermode.h index 369e0e5..369e0e5 100644 --- a/include/graphics/SkPixelXorXfermode.h +++ b/include/effects/SkPixelXorXfermode.h diff --git a/include/graphics/SkTransparentShader.h b/include/effects/SkTransparentShader.h index 8bc60ff..8bc60ff 100644 --- a/include/graphics/SkTransparentShader.h +++ b/include/effects/SkTransparentShader.h diff --git a/include/graphics/SkFontCodec.h b/include/graphics/SkFontCodec.h deleted file mode 100644 index 09725dc..0000000 --- a/include/graphics/SkFontCodec.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2006 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SkFontCodec_DEFINED -#define SkFontCodec_DEFINED - -#include "SkSFNT.h" - -class SkFontCodec { -public: - static void Compress(SkSFNT& font, const char fileName[]); - - /* Format is [count] + [instruction, bitcount] * count - Allocated with sk_malloc() - */ - static U8* BuildInstrHuffmanTable(SkSFNT&); - static U8* BuildOutlineHuffmanTable(SkSFNT& font); - - SkDEBUGCODE(static void UnitTest();) -}; - -#endif - diff --git a/include/graphics/SkFlipPixelRef.h b/include/images/SkFlipPixelRef.h index 3b4e97a..3b4e97a 100644 --- a/include/graphics/SkFlipPixelRef.h +++ b/include/images/SkFlipPixelRef.h diff --git a/include/graphics/SkImageDecoder.h b/include/images/SkImageDecoder.h index 4a18cab..5b91c51 100644 --- a/include/graphics/SkImageDecoder.h +++ b/include/images/SkImageDecoder.h @@ -266,36 +266,4 @@ private: SkImageDecoder& operator=(const SkImageDecoder&); }; -#ifdef SK_SUPPORT_IMAGE_ENCODE - -class SkWStream; - -class SkImageEncoder { -public: - enum Type { - kJPEG_Type, - kPNG_Type - }; - static SkImageEncoder* Create(Type); - - virtual ~SkImageEncoder(); - - /* Quality ranges from 0..100 */ - - bool encodeFile(const char file[], const SkBitmap&, int quality = 80); - bool encodeStream(SkWStream*, const SkBitmap&, int quality = 80); - - static bool EncodeFile(const char file[], const SkBitmap&, Type, - int quality = 80); - static bool EncodeStream(SkWStream*, const SkBitmap&, Type, - int quality = 80); - -protected: - virtual bool onEncode(SkWStream*, const SkBitmap&, int quality) = 0; -}; - -#endif /* SK_SUPPORT_IMAGE_ENCODE */ - -/////////////////////////////////////////////////////////////////////// - #endif diff --git a/include/images/SkImageEncoder.h b/include/images/SkImageEncoder.h new file mode 100644 index 0000000..94989c0 --- /dev/null +++ b/include/images/SkImageEncoder.h @@ -0,0 +1,36 @@ +#ifndef SkImageEncoder_DEFINED +#define SkImageEncoder_DEFINED + +#include "SkTypes.h" + +class SkBitmap; +class SkWStream; + +class SkImageEncoder { +public: + enum Type { + kJPEG_Type, + kPNG_Type + }; + static SkImageEncoder* Create(Type); + + virtual ~SkImageEncoder(); + + /* Quality ranges from 0..100 */ + enum { + kDefaultQuality = 80 + }; + + bool encodeFile(const char file[], const SkBitmap&, int quality); + bool encodeStream(SkWStream*, const SkBitmap&, int quality); + + static bool EncodeFile(const char file[], const SkBitmap&, Type, + int quality); + static bool EncodeStream(SkWStream*, const SkBitmap&, Type, + int quality); + +protected: + virtual bool onEncode(SkWStream*, const SkBitmap&, int quality) = 0; +}; + +#endif diff --git a/include/graphics/SkImageRef.h b/include/images/SkImageRef.h index e94b7d4..e94b7d4 100644 --- a/include/graphics/SkImageRef.h +++ b/include/images/SkImageRef.h diff --git a/include/graphics/SkImageRef_GlobalPool.h b/include/images/SkImageRef_GlobalPool.h index a9d4dce..a9d4dce 100644 --- a/include/graphics/SkImageRef_GlobalPool.h +++ b/include/images/SkImageRef_GlobalPool.h diff --git a/include/graphics/SkMovie.h b/include/images/SkMovie.h index 45962a5..45962a5 100644 --- a/include/graphics/SkMovie.h +++ b/include/images/SkMovie.h diff --git a/include/corecg/SkPageFlipper.h b/include/images/SkPageFlipper.h index 0d791ee..0d791ee 100644 --- a/include/corecg/SkPageFlipper.h +++ b/include/images/SkPageFlipper.h diff --git a/include/graphics/SkStream_Win.h b/include/ports/SkStream_Win.h index 1b17450..1b17450 100644 --- a/include/graphics/SkStream_Win.h +++ b/include/ports/SkStream_Win.h diff --git a/include/graphics/SkSVGAttribute.h b/include/svg/SkSVGAttribute.h index 810d11c..810d11c 100644 --- a/include/graphics/SkSVGAttribute.h +++ b/include/svg/SkSVGAttribute.h diff --git a/include/graphics/SkSVGBase.h b/include/svg/SkSVGBase.h index 4d24aed..4d24aed 100644 --- a/include/graphics/SkSVGBase.h +++ b/include/svg/SkSVGBase.h diff --git a/include/graphics/SkSVGPaintState.h b/include/svg/SkSVGPaintState.h index f3f74e1..f3f74e1 100644 --- a/include/graphics/SkSVGPaintState.h +++ b/include/svg/SkSVGPaintState.h diff --git a/include/graphics/SkSVGParser.h b/include/svg/SkSVGParser.h index 86ae4c2..86ae4c2 100644 --- a/include/graphics/SkSVGParser.h +++ b/include/svg/SkSVGParser.h diff --git a/include/graphics/SkSVGTypes.h b/include/svg/SkSVGTypes.h index 38d63ce..38d63ce 100644 --- a/include/graphics/SkSVGTypes.h +++ b/include/svg/SkSVGTypes.h diff --git a/include/graphics/SkCamera.h b/include/utils/SkCamera.h index 8bbcabf..8bbcabf 100644 --- a/include/graphics/SkCamera.h +++ b/include/utils/SkCamera.h diff --git a/include/graphics/SkCullPoints.h b/include/utils/SkCullPoints.h index cee64e2..cee64e2 100644 --- a/include/graphics/SkCullPoints.h +++ b/include/utils/SkCullPoints.h diff --git a/include/graphics/SkDumpCanvas.h b/include/utils/SkDumpCanvas.h index b919627..b919627 100644 --- a/include/graphics/SkDumpCanvas.h +++ b/include/utils/SkDumpCanvas.h diff --git a/include/graphics/SkGLCanvas.h b/include/utils/SkGLCanvas.h index 40fc52d..40fc52d 100644 --- a/include/graphics/SkGLCanvas.h +++ b/include/utils/SkGLCanvas.h diff --git a/include/corecg/SkInterpolator.h b/include/utils/SkInterpolator.h index c03eb23..c03eb23 100644 --- a/include/corecg/SkInterpolator.h +++ b/include/utils/SkInterpolator.h diff --git a/include/graphics/SkNinePatch.h b/include/utils/SkNinePatch.h index a655621..a655621 100644 --- a/include/graphics/SkNinePatch.h +++ b/include/utils/SkNinePatch.h diff --git a/include/graphics/SkParse.h b/include/utils/SkParse.h index 57d040c..57d040c 100644 --- a/include/graphics/SkParse.h +++ b/include/utils/SkParse.h diff --git a/include/graphics/SkParsePaint.h b/include/utils/SkParsePaint.h index d23cd92..d23cd92 100644 --- a/include/graphics/SkParsePaint.h +++ b/include/utils/SkParsePaint.h diff --git a/include/graphics/SkProxyCanvas.h b/include/utils/SkProxyCanvas.h index 1bc411a..1bc411a 100644 --- a/include/graphics/SkProxyCanvas.h +++ b/include/utils/SkProxyCanvas.h diff --git a/include/graphics/SkTextBox.h b/include/utils/SkTextBox.h index 2c34448..2c34448 100644 --- a/include/graphics/SkTextBox.h +++ b/include/utils/SkTextBox.h diff --git a/include/graphics/SkUnitMappers.h b/include/utils/SkUnitMappers.h index 51708b6..51708b6 100644 --- a/include/graphics/SkUnitMappers.h +++ b/include/utils/SkUnitMappers.h diff --git a/include/utils/mac/SkCGUtils.h b/include/utils/mac/SkCGUtils.h new file mode 100644 index 0000000..3b74b55 --- /dev/null +++ b/include/utils/mac/SkCGUtils.h @@ -0,0 +1,10 @@ +#ifndef SkCGUtils_DEFINED +#define SkCGUtils_DEFINED + +#include <Carbon/Carbon.h> + +class SkBitmap; + +CGImageRef SkCreateCGImageRef(const SkBitmap&); + +#endif diff --git a/include/graphics/SkApplication.h b/include/views/SkApplication.h index 4c4a4fb..4c4a4fb 100644 --- a/include/graphics/SkApplication.h +++ b/include/views/SkApplication.h diff --git a/include/graphics/SkBGViewArtist.h b/include/views/SkBGViewArtist.h index 1bca42f..1bca42f 100644 --- a/include/graphics/SkBGViewArtist.h +++ b/include/views/SkBGViewArtist.h diff --git a/include/graphics/SkBorderView.h b/include/views/SkBorderView.h index 94ccc1f..94ccc1f 100644 --- a/include/graphics/SkBorderView.h +++ b/include/views/SkBorderView.h diff --git a/include/graphics/SkEvent.h b/include/views/SkEvent.h index 2b43f34..2b43f34 100644 --- a/include/graphics/SkEvent.h +++ b/include/views/SkEvent.h diff --git a/include/graphics/SkEventSink.h b/include/views/SkEventSink.h index 27a6743..27a6743 100644 --- a/include/graphics/SkEventSink.h +++ b/include/views/SkEventSink.h diff --git a/include/graphics/SkImageView.h b/include/views/SkImageView.h index 157abb1..157abb1 100644 --- a/include/graphics/SkImageView.h +++ b/include/views/SkImageView.h diff --git a/include/graphics/SkKey.h b/include/views/SkKey.h index 3fd5114..3fd5114 100644 --- a/include/graphics/SkKey.h +++ b/include/views/SkKey.h diff --git a/include/graphics/SkMetaData.h b/include/views/SkMetaData.h index 21739fe..21739fe 100644 --- a/include/graphics/SkMetaData.h +++ b/include/views/SkMetaData.h diff --git a/include/graphics/SkOSMenu.h b/include/views/SkOSMenu.h index 433a601..433a601 100644 --- a/include/graphics/SkOSMenu.h +++ b/include/views/SkOSMenu.h diff --git a/include/graphics/SkOSSound.h b/include/views/SkOSSound.h index 5d77955..5d77955 100644 --- a/include/graphics/SkOSSound.h +++ b/include/views/SkOSSound.h diff --git a/include/graphics/SkOSWindow_Mac.h b/include/views/SkOSWindow_Mac.h index 1f6a1fa..0d808e1 100644 --- a/include/graphics/SkOSWindow_Mac.h +++ b/include/views/SkOSWindow_Mac.h @@ -24,13 +24,18 @@ public: SkOSWindow(void* hwnd); void* getHWND() const { return fHWND; } + void* getHVIEW() const { return fHVIEW; } void updateSize(); static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay); static pascal OSStatus SkOSWindow::EventHandler( EventHandlerCallRef inHandler, EventRef inEvent, void* userData ); + void doPaint(void* ctx); + protected: + // overrides from SkEventSink + virtual bool onEvent(const SkEvent& evt); // overrides from SkWindow virtual void onHandleInval(const SkIRect&); // overrides from SkView @@ -39,8 +44,7 @@ protected: private: void* fHWND; - - void doPaint(void* ctx); + void* fHVIEW; typedef SkWindow INHERITED; }; diff --git a/include/graphics/SkOSWindow_Unix.h b/include/views/SkOSWindow_Unix.h index 26f51be..26f51be 100644 --- a/include/graphics/SkOSWindow_Unix.h +++ b/include/views/SkOSWindow_Unix.h diff --git a/include/graphics/SkOSWindow_Win.h b/include/views/SkOSWindow_Win.h index 6d821db..6d821db 100644 --- a/include/graphics/SkOSWindow_Win.h +++ b/include/views/SkOSWindow_Win.h diff --git a/include/graphics/SkOSWindow_wxwidgets.h b/include/views/SkOSWindow_wxwidgets.h index c5dfc7c..c5dfc7c 100644 --- a/include/graphics/SkOSWindow_wxwidgets.h +++ b/include/views/SkOSWindow_wxwidgets.h diff --git a/include/graphics/SkProgressBarView.h b/include/views/SkProgressBarView.h index 6341fcb..6341fcb 100644 --- a/include/graphics/SkProgressBarView.h +++ b/include/views/SkProgressBarView.h diff --git a/include/graphics/SkScrollBarView.h b/include/views/SkScrollBarView.h index b8a5209..b8a5209 100644 --- a/include/graphics/SkScrollBarView.h +++ b/include/views/SkScrollBarView.h diff --git a/include/graphics/SkStackViewLayout.h b/include/views/SkStackViewLayout.h index 8000319..8000319 100644 --- a/include/graphics/SkStackViewLayout.h +++ b/include/views/SkStackViewLayout.h diff --git a/include/graphics/SkSystemEventTypes.h b/include/views/SkSystemEventTypes.h index 8dfe8be..8dfe8be 100644 --- a/include/graphics/SkSystemEventTypes.h +++ b/include/views/SkSystemEventTypes.h diff --git a/include/graphics/SkView.h b/include/views/SkView.h index d5d89df..d5d89df 100644 --- a/include/graphics/SkView.h +++ b/include/views/SkView.h diff --git a/include/graphics/SkViewInflate.h b/include/views/SkViewInflate.h index 3ec65a6..3ec65a6 100644 --- a/include/graphics/SkViewInflate.h +++ b/include/views/SkViewInflate.h diff --git a/include/graphics/SkWidget.h b/include/views/SkWidget.h index db85f01..db85f01 100644 --- a/include/graphics/SkWidget.h +++ b/include/views/SkWidget.h diff --git a/include/graphics/SkWidgetViews.h b/include/views/SkWidgetViews.h index 4dd8866..4dd8866 100644 --- a/include/graphics/SkWidgetViews.h +++ b/include/views/SkWidgetViews.h diff --git a/include/graphics/SkWindow.h b/include/views/SkWindow.h index 96262ee..da3912e 100644 --- a/include/graphics/SkWindow.h +++ b/include/views/SkWindow.h @@ -52,6 +52,8 @@ public: bool handleMenu(uint32_t os_cmd); void addMenu(SkOSMenu*); + + const char* getTitle() const { return fTitle.c_str(); } void setTitle(const char title[]); protected: @@ -80,6 +82,8 @@ private: SkView* fFocusView; bool fWaitingOnInval; + + SkString fTitle; typedef SkView INHERITED; }; diff --git a/include/graphics/SkBML_WXMLParser.h b/include/xml/SkBML_WXMLParser.h index faa127d..faa127d 100644 --- a/include/graphics/SkBML_WXMLParser.h +++ b/include/xml/SkBML_WXMLParser.h diff --git a/include/graphics/SkBML_XMLParser.h b/include/xml/SkBML_XMLParser.h index f056bca..f056bca 100644 --- a/include/graphics/SkBML_XMLParser.h +++ b/include/xml/SkBML_XMLParser.h diff --git a/include/graphics/SkDOM.h b/include/xml/SkDOM.h index 74e2492..74e2492 100644 --- a/include/graphics/SkDOM.h +++ b/include/xml/SkDOM.h diff --git a/include/graphics/SkJS.h b/include/xml/SkJS.h index fe76352..fe76352 100644 --- a/include/graphics/SkJS.h +++ b/include/xml/SkJS.h diff --git a/include/graphics/SkXMLParser.h b/include/xml/SkXMLParser.h index ddad273..ddad273 100644 --- a/include/graphics/SkXMLParser.h +++ b/include/xml/SkXMLParser.h diff --git a/include/graphics/SkXMLWriter.h b/include/xml/SkXMLWriter.h index 742e7f1..742e7f1 100644 --- a/include/graphics/SkXMLWriter.h +++ b/include/xml/SkXMLWriter.h diff --git a/libcorecg/Android.mk b/libcorecg/Android.mk index bc862ce..c5615cc 100644 --- a/libcorecg/Android.mk +++ b/libcorecg/Android.mk @@ -4,30 +4,28 @@ include $(CLEAR_VARS) LOCAL_ARM_MODE := arm LOCAL_SRC_FILES:= \ - Sk64.cpp \ - SkBuffer.cpp \ - SkChunkAlloc.cpp \ - SkCordic.cpp \ - SkDebug.cpp \ - SkDebug_stdio.cpp \ - SkFloatBits.cpp \ - SkInterpolator.cpp \ - SkMath.cpp \ - SkMatrix.cpp \ - SkMemory_stdlib.cpp \ - SkPageFlipper.cpp \ - SkPoint.cpp \ - SkRect.cpp \ - SkRegion.cpp \ - SkString.cpp \ - SkUtils.cpp \ + ../src/core/Sk64.cpp \ + ../src/core/SkBuffer.cpp \ + ../src/core/SkChunkAlloc.cpp \ + ../src/core/SkCordic.cpp \ + ../src/core/SkDebug.cpp \ + ../src/core/SkDebug_stdio.cpp \ + ../src/core/SkFloatBits.cpp \ + ../src/core/SkMath.cpp \ + ../src/core/SkMatrix.cpp \ + ../src/core/SkMemory_stdlib.cpp \ + ../src/core/SkPoint.cpp \ + ../src/core/SkRect.cpp \ + ../src/core/SkRegion.cpp \ + ../src/core/SkString.cpp \ + ../src/core/SkUtils.cpp \ LOCAL_SHARED_LIBRARIES := \ libcutils \ libutils LOCAL_C_INCLUDES += \ - $(call include-path-for, corecg) + $(LOCAL_PATH)/../include/core #LOCAL_CFLAGS+= #LOCAL_LDFLAGS:= diff --git a/libcorecg/SkTSort.h b/libcorecg/SkTSort.h deleted file mode 100644 index 6193dff..0000000 --- a/libcorecg/SkTSort.h +++ /dev/null @@ -1,65 +0,0 @@ -/* libs/corecg/SkTSort.h -** -** Copyright 2006, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -#ifndef SkTSort_DEFINED -#define SkTSort_DEFINED - -#include "SkTypes.h" - -template <typename T> -void SkTHeapSort_SiftDown(T array[], int root, int bottom) -{ - int root2 = root << 1; - - while (root2 <= bottom) - { - int maxChild; - - if (root2 == bottom) - maxChild = root2; - else if (array[root2] > array[root2 + 1]) - maxChild = root2; - else - maxChild = root2 + 1; - - if (array[root] < array[maxChild]) - { - SkTSwap<T>(array[root], array[maxChild]); - root = maxChild; - root2 = root << 1; - } - else - break; - } -} - -template <typename T> -void SkTHeapSort(T array[], int count) -{ - int i; - - for (i = count/2 - 1; i >= 0; --i) - SkTHeapSort_SiftDown<T>(array, i, count); - - for (i = count - 2; i >= 0; --i) - { - SkTSwap<T>(array[0], array[i + 1]); - SkTHeapSort_SiftDown<T>(array, 0, i); - } -} - -#endif diff --git a/libsgl/Android.mk b/libsgl/Android.mk index 17b7d32..26b7322 100644 --- a/libsgl/Android.mk +++ b/libsgl/Android.mk @@ -5,125 +5,129 @@ include $(CLEAR_VARS) LOCAL_ARM_MODE := arm LOCAL_SRC_FILES:= \ - effects/Sk1DPathEffect.cpp \ - effects/Sk2DPathEffect.cpp \ - effects/SkAvoidXfermode.cpp \ - effects/SkBlurDrawLooper.cpp \ - effects/SkBlurMask.cpp \ - effects/SkBlurMaskFilter.cpp \ - effects/SkCamera.cpp \ - effects/SkColorFilters.cpp \ - effects/SkColorMatrixFilter.cpp \ - effects/SkCornerPathEffect.cpp \ - effects/SkDashPathEffect.cpp \ - effects/SkDiscretePathEffect.cpp \ - effects/SkDumpCanvas.cpp \ - effects/SkEmbossMask.cpp \ - effects/SkEmbossMaskFilter.cpp \ - effects/SkGradientShader.cpp \ - effects/SkLayerDrawLooper.cpp \ - effects/SkLayerRasterizer.cpp \ - effects/SkNinePatch.cpp \ - effects/SkPaintFlagsDrawFilter.cpp \ - effects/SkPixelXorXfermode.cpp \ - effects/SkProxyCanvas.cpp \ - effects/SkShaderExtras.cpp \ - effects/SkTransparentShader.cpp \ - images/bmpdecoderhelper.cpp \ - images/SkFDStream.cpp \ - images/SkImageDecoder.cpp \ - images/SkImageDecoder_libbmp.cpp \ - images/SkImageDecoder_libgif.cpp \ - images/SkImageDecoder_libjpeg.cpp \ - images/SkImageDecoder_libpng.cpp \ - images/SkImageDecoder_libico.cpp \ - images/SkImageDecoder_wbmp.cpp \ - images/SkImageRef.cpp \ - images/SkImageRef_GlobalPool.cpp \ - images/SkImageRefPool.cpp \ - images/SkMMapStream.cpp \ - images/SkMovie.cpp \ - images/SkMovie_gif.cpp \ - images/SkFlipPixelRef.cpp \ - images/SkScaledBitmapSampler.cpp \ - images/SkStream.cpp \ - images/SkCreateRLEPixelRef.cpp \ - picture/SkPathHeap.cpp \ - picture/SkPicture.cpp \ - picture/SkPictureFlat.cpp \ - picture/SkPicturePlayback.cpp \ - picture/SkPictureRecord.cpp \ - ports/SkImageDecoder_Factory.cpp \ - ports/SkFontHost_android.cpp \ - ports/SkFontHost_gamma.cpp \ - ports/SkFontHost_FreeType.cpp \ - ports/SkGlobals_global.cpp \ - ports/SkImageRef_ashmem.cpp \ - ports/SkOSFile_stdio.cpp \ - ports/SkTime_Unix.cpp \ - ports/SkXMLPullParser_expat.cpp \ - sgl/SkAlphaRuns.cpp \ - sgl/SkBitmap.cpp \ - sgl/SkBitmap_scroll.cpp \ - sgl/SkBitmapProcShader.cpp \ - sgl/SkBitmapProcState.cpp \ - sgl/SkBitmapProcState_matrixProcs.cpp \ - sgl/SkBitmapSampler.cpp \ - sgl/SkBitmapShader.cpp \ - sgl/SkBlitRow_D16.cpp \ - sgl/SkBlitRow_D4444.cpp \ - sgl/SkBlitter.cpp \ - sgl/SkBlitter_4444.cpp \ - sgl/SkBlitter_A1.cpp \ - sgl/SkBlitter_A8.cpp \ - sgl/SkBlitter_ARGB32.cpp \ - sgl/SkBlitter_RGB16.cpp \ - sgl/SkBlitter_Sprite.cpp \ - sgl/SkCanvas.cpp \ - sgl/SkColor.cpp \ - sgl/SkColorFilter.cpp \ - sgl/SkColorTable.cpp \ - sgl/SkDeque.cpp \ - sgl/SkDevice.cpp \ - sgl/SkDither.cpp \ - sgl/SkDraw.cpp \ - sgl/SkEdge.cpp \ - sgl/SkFilterProc.cpp \ - sgl/SkFlattenable.cpp \ - sgl/SkGeometry.cpp \ - sgl/SkGlobals.cpp \ - sgl/SkGlyphCache.cpp \ - sgl/SkGraphics.cpp \ - sgl/SkMask.cpp \ - sgl/SkMaskFilter.cpp \ - sgl/SkPackBits.cpp \ - sgl/SkPaint.cpp \ - sgl/SkPath.cpp \ - sgl/SkPathEffect.cpp \ - sgl/SkPathMeasure.cpp \ - sgl/SkPixelRef.cpp \ - sgl/SkProcSpriteBlitter.cpp \ - sgl/SkPtrRecorder.cpp \ - sgl/SkRasterizer.cpp \ - sgl/SkRefCnt.cpp \ - sgl/SkRegion_path.cpp \ - sgl/SkScalerContext.cpp \ - sgl/SkScan.cpp \ - sgl/SkScan_AntiPath.cpp \ - sgl/SkScan_Antihair.cpp \ - sgl/SkScan_Hairline.cpp \ - sgl/SkScan_Path.cpp \ - sgl/SkShader.cpp \ - sgl/SkSpriteBlitter_ARGB32.cpp \ - sgl/SkSpriteBlitter_RGB16.cpp \ - sgl/SkStroke.cpp \ - sgl/SkStrokerPriv.cpp \ - sgl/SkTSearch.cpp \ - sgl/SkTypeface.cpp \ - sgl/SkUnPreMultiply.cpp \ - sgl/SkXfermode.cpp \ - sgl/SkWriter32.cpp \ - xml/SkXMLPullParser.cpp + ../src/effects/Sk1DPathEffect.cpp \ + ../src/effects/Sk2DPathEffect.cpp \ + ../src/effects/SkAvoidXfermode.cpp \ + ../src/effects/SkBlurDrawLooper.cpp \ + ../src/effects/SkBlurMask.cpp \ + ../src/effects/SkBlurMaskFilter.cpp \ + ../src/effects/SkColorFilters.cpp \ + ../src/effects/SkColorMatrixFilter.cpp \ + ../src/effects/SkCornerPathEffect.cpp \ + ../src/effects/SkDashPathEffect.cpp \ + ../src/effects/SkDiscretePathEffect.cpp \ + ../src/effects/SkEmbossMask.cpp \ + ../src/effects/SkEmbossMaskFilter.cpp \ + ../src/effects/SkGradientShader.cpp \ + ../src/effects/SkLayerDrawLooper.cpp \ + ../src/effects/SkLayerRasterizer.cpp \ + ../src/effects/SkPaintFlagsDrawFilter.cpp \ + ../src/effects/SkPixelXorXfermode.cpp \ + ../src/effects/SkTransparentShader.cpp \ + ../src/images/bmpdecoderhelper.cpp \ + ../src/images/SkFDStream.cpp \ + ../src/images/SkFlipPixelRef.cpp \ + ../src/images/SkImageDecoder.cpp \ + ../src/images/SkImageDecoder_libbmp.cpp \ + ../src/images/SkImageDecoder_libgif.cpp \ + ../src/images/SkImageDecoder_libjpeg.cpp \ + ../src/images/SkImageDecoder_libpng.cpp \ + ../src/images/SkImageDecoder_libico.cpp \ + ../src/images/SkImageDecoder_wbmp.cpp \ + ../src/images/SkImageEncoder.cpp \ + ../src/images/SkImageRef.cpp \ + ../src/images/SkImageRef_GlobalPool.cpp \ + ../src/images/SkImageRefPool.cpp \ + ../src/images/SkMovie.cpp \ + ../src/images/SkMovie_gif.cpp \ + ../src/images/SkPageFlipper.cpp \ + ../src/images/SkScaledBitmapSampler.cpp \ + ../src/images/SkCreateRLEPixelRef.cpp \ + ../src/ports/SkImageDecoder_Factory.cpp \ + ../src/ports/SkImageEncoder_Factory.cpp \ + ../src/ports/SkFontHost_android.cpp \ + ../src/ports/SkFontHost_gamma.cpp \ + ../src/ports/SkFontHost_FreeType.cpp \ + ../src/ports/SkGlobals_global.cpp \ + ../src/ports/SkImageRef_ashmem.cpp \ + ../src/ports/SkOSFile_stdio.cpp \ + ../src/ports/SkTime_Unix.cpp \ + ../src/ports/SkXMLPullParser_expat.cpp \ + ../src/core/SkAlphaRuns.cpp \ + ../src/core/SkBitmap.cpp \ + ../src/core/SkBitmap_scroll.cpp \ + ../src/core/SkBitmapProcShader.cpp \ + ../src/core/SkBitmapProcState.cpp \ + ../src/core/SkBitmapProcState_matrixProcs.cpp \ + ../src/core/SkBitmapSampler.cpp \ + ../src/core/SkBitmapShader.cpp \ + ../src/core/SkBlitRow_D16.cpp \ + ../src/core/SkBlitRow_D4444.cpp \ + ../src/core/SkBlitter.cpp \ + ../src/core/SkBlitter_4444.cpp \ + ../src/core/SkBlitter_A1.cpp \ + ../src/core/SkBlitter_A8.cpp \ + ../src/core/SkBlitter_ARGB32.cpp \ + ../src/core/SkBlitter_RGB16.cpp \ + ../src/core/SkBlitter_Sprite.cpp \ + ../src/core/SkCanvas.cpp \ + ../src/core/SkColor.cpp \ + ../src/core/SkColorFilter.cpp \ + ../src/core/SkColorTable.cpp \ + ../src/core/SkComposeShader.cpp \ + ../src/core/SkDeque.cpp \ + ../src/core/SkDevice.cpp \ + ../src/core/SkDither.cpp \ + ../src/core/SkDraw.cpp \ + ../src/core/SkEdge.cpp \ + ../src/core/SkFilterProc.cpp \ + ../src/core/SkFlattenable.cpp \ + ../src/core/SkGeometry.cpp \ + ../src/core/SkGlobals.cpp \ + ../src/core/SkGlyphCache.cpp \ + ../src/core/SkGraphics.cpp \ + ../src/core/SkMMapStream.cpp \ + ../src/core/SkMask.cpp \ + ../src/core/SkMaskFilter.cpp \ + ../src/core/SkPackBits.cpp \ + ../src/core/SkPaint.cpp \ + ../src/core/SkPath.cpp \ + ../src/core/SkPathEffect.cpp \ + ../src/core/SkPathHeap.cpp \ + ../src/core/SkPathMeasure.cpp \ + ../src/core/SkPicture.cpp \ + ../src/core/SkPictureFlat.cpp \ + ../src/core/SkPicturePlayback.cpp \ + ../src/core/SkPictureRecord.cpp \ + ../src/core/SkPixelRef.cpp \ + ../src/core/SkProcSpriteBlitter.cpp \ + ../src/core/SkPtrRecorder.cpp \ + ../src/core/SkRasterizer.cpp \ + ../src/core/SkRefCnt.cpp \ + ../src/core/SkRegion_path.cpp \ + ../src/core/SkScalerContext.cpp \ + ../src/core/SkScan.cpp \ + ../src/core/SkScan_AntiPath.cpp \ + ../src/core/SkScan_Antihair.cpp \ + ../src/core/SkScan_Hairline.cpp \ + ../src/core/SkScan_Path.cpp \ + ../src/core/SkShader.cpp \ + ../src/core/SkSpriteBlitter_ARGB32.cpp \ + ../src/core/SkSpriteBlitter_RGB16.cpp \ + ../src/core/SkStream.cpp \ + ../src/core/SkStroke.cpp \ + ../src/core/SkStrokerPriv.cpp \ + ../src/core/SkTSearch.cpp \ + ../src/core/SkTypeface.cpp \ + ../src/core/SkUnPreMultiply.cpp \ + ../src/core/SkXfermode.cpp \ + ../src/core/SkWriter32.cpp \ + ../src/utils/SkCamera.cpp \ + ../src/utils/SkDumpCanvas.cpp \ + ../src/utils/SkInterpolator.cpp \ + ../src/utils/SkNinePatch.cpp \ + ../src/utils/SkProxyCanvas.cpp \ + ../src/xml/SkXMLPullParser.cpp LOCAL_SHARED_LIBRARIES := \ libcutils \ @@ -139,13 +143,12 @@ LOCAL_STATIC_LIBRARIES := \ libjpeg LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/animator \ - $(LOCAL_PATH)/sgl \ - $(LOCAL_PATH)/images \ - $(LOCAL_PATH)/picture \ - $(LOCAL_PATH)/ports \ - $(LOCAL_PATH)/../libcorecg \ - $(call include-path-for, graphics corecg) \ + $(LOCAL_PATH)/../src/core \ + $(LOCAL_PATH)/../include/core \ + $(LOCAL_PATH)/../include/effects \ + $(LOCAL_PATH)/../include/images \ + $(LOCAL_PATH)/../include/utils \ + $(LOCAL_PATH)/../include/xml \ external/freetype/include \ external/zlib \ external/libpng \ @@ -176,12 +179,12 @@ LOCAL_PRELINK_MODULE := false LOCAL_ARM_MODE := arm LOCAL_SRC_FILES:= \ - gl/SkGL.cpp \ - gl/SkGLCanvas.cpp \ - gl/SkGLDevice.cpp \ - gl/SkGLDevice_SWLayer.cpp \ - gl/SkGLTextCache.cpp \ - gl/SkTextureCache.cpp + ../src/gl/SkGL.cpp \ + ../src/gl/SkGLCanvas.cpp \ + ../src/gl/SkGLDevice.cpp \ + ../src/gl/SkGLDevice_SWLayer.cpp \ + ../src/gl/SkGLTextCache.cpp \ + ../src/gl/SkTextureCache.cpp LOCAL_SHARED_LIBRARIES := \ libcutils \ @@ -191,8 +194,11 @@ LOCAL_SHARED_LIBRARIES := \ libGLES_CM LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/sgl \ - $(call include-path-for, graphics corecg) + $(LOCAL_PATH)/../src/core \ + $(LOCAL_PATH)/../src/gl \ + $(LOCAL_PATH)/../include/core \ + $(LOCAL_PATH)/../include/effects \ + $(LOCAL_PATH)/../include/utils LOCAL_CFLAGS += -fpic -fstrict-aliasing diff --git a/libsgl/text/ATextEntry.h b/libsgl/text/ATextEntry.h deleted file mode 100644 index 225236d..0000000 --- a/libsgl/text/ATextEntry.h +++ /dev/null @@ -1,37 +0,0 @@ -/* libs/graphics/text/ATextEntry.h -** -** Copyright 2006, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -#ifndef ATextEntry_DEFINED -#define ATextEntry_DEFINED - -#include "SkTypes.h" - -class SkCanavs; - -class ATextEntry { -public: - ATextEntry(); - ~ATextEntry(); - - void setUtf16(const U16 text[], size_t count); - void setSize(SkScalar width, SkScalar height); - void setSelection(int start, int stop); - void draw(SkCanvas*); - void handleKey(int key); -}; - -#endif diff --git a/Samples/SampleAll.cpp b/samplecode/SampleAll.cpp index 968263b..968263b 100644 --- a/Samples/SampleAll.cpp +++ b/samplecode/SampleAll.cpp diff --git a/Samples/SampleApp.cpp b/samplecode/SampleApp.cpp index 5ff8362..0d2bbbc 100644 --- a/Samples/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -2,6 +2,7 @@ #include "SkDevice.h" #include "SkGLCanvas.h" #include "SkGraphics.h" +#include "SkImageEncoder.h" #include "SkPaint.h" #include "SkPicture.h" #include "SkStream.h" @@ -9,8 +10,12 @@ #include "SampleCode.h" +//#define SK_SUPPORT_GL + +#ifdef SK_SUPPORT_GL #include <AGL/agl.h> #include <OpenGL/gl.h> +#endif #define ANIMATING_EVENTTYPE "nextSample" #define ANIMATING_DELAY 750 @@ -29,6 +34,7 @@ SkViewRegister::SkViewRegister(SkViewFactory fact) : fFact(fact) { gHead = this; } +#ifdef SK_SUPPORT_GL static AGLContext gAGLContext; static void init_gl(WindowRef wref) { @@ -85,6 +91,7 @@ static void setup_offscreen_gl(const SkBitmap& offscreen, WindowRef wref) { glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT); } +#endif ////////////////////////////////////////////////////////////////////////////// @@ -187,8 +194,10 @@ SampleWindow::CanvasType SampleWindow::cycle_canvastype(CanvasType ct) { } SampleWindow::SampleWindow(void* hwnd) : INHERITED(hwnd) { +#ifdef SK_SUPPORT_GL init_gl((WindowRef)hwnd); - +#endif + fPicture = NULL; fGLCanvas = NULL; @@ -237,9 +246,11 @@ static void reverseRedAndBlue(const SkBitmap& bm) { } SkCanvas* SampleWindow::beforeChildren(SkCanvas* canvas) { +#ifdef SK_SUPPORT_GL #ifndef USE_OFFSCREEN aglSetWindowRef(gAGLContext, NULL); #endif +#endif switch (fCanvasType) { case kRaster_CanvasType: canvas = this->INHERITED::beforeChildren(canvas); @@ -248,6 +259,7 @@ SkCanvas* SampleWindow::beforeChildren(SkCanvas* canvas) { fPicture = new SkPicture; canvas = fPicture->beginRecording(9999, 9999); break; +#ifdef SK_SUPPORT_GL case kOpenGL_CanvasType: { //SkGLCanvas::DeleteAllTextures(); // just for testing SkDevice* device = canvas->getDevice(); @@ -261,6 +273,7 @@ SkCanvas* SampleWindow::beforeChildren(SkCanvas* canvas) { canvas = fGLCanvas; break; } +#endif } if (fUseClip) { @@ -305,6 +318,7 @@ void SampleWindow::afterChildren(SkCanvas* orig) { } fPicture = NULL; break; +#ifdef SK_SUPPORT_GL case kOpenGL_CanvasType: glFlush(); delete fGLCanvas; @@ -313,6 +327,7 @@ void SampleWindow::afterChildren(SkCanvas* orig) { reverseRedAndBlue(orig->getDevice()->accessBitmap(true)); #endif break; +#endif } // if ((fScrollTestX | fScrollTestY) != 0) @@ -366,6 +381,17 @@ bool SampleWindow::onEvent(const SkEvent& evt) { return this->INHERITED::onEvent(evt); } +static void cleanup_for_filename(SkString* name) { + char* str = name->writable_str(); + for (int i = 0; i < name->size(); i++) { + switch (str[i]) { + case ':': str[i] = '-'; break; + case '/': str[i] = '-'; break; + case ' ': str[i] = '_'; break; + default: break; + } + } +} bool SampleWindow::onHandleChar(SkUnichar uni) { int dx = 0xFF; @@ -397,10 +423,28 @@ bool SampleWindow::onHandleChar(SkUnichar uni) { return true; } - if ('a' == uni) { - fAnimating = !fAnimating; - this->postAnimatingEvent(); - this->updateTitle(); + switch (uni) { + case 'a': + fAnimating = !fAnimating; + this->postAnimatingEvent(); + this->updateTitle(); + return true; + case 'f': { + const char* title = this->getTitle(); + if (title[0] == 0) { + title = "sampleapp"; + } + SkString name(title); + cleanup_for_filename(&name); + name.append(".png"); + if (SkImageEncoder::EncodeFile(name.c_str(), this->getBitmap(), + SkImageEncoder::kPNG_Type, 100)) { + SkDebugf("Created %s\n", name.c_str()); + } + return true; + } + default: + break; } return this->INHERITED::onHandleChar(uni); diff --git a/Samples/SampleArc.cpp b/samplecode/SampleArc.cpp index 7bc862b..ada1d0a 100644 --- a/Samples/SampleArc.cpp +++ b/samplecode/SampleArc.cpp @@ -6,7 +6,7 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" +#include "SkComposeShader.h" #include "Sk1DPathEffect.h" #include "SkCornerPathEffect.h" #include "SkPathMeasure.h" diff --git a/Samples/SampleBitmapRect.cpp b/samplecode/SampleBitmapRect.cpp index 5919084..f164e06 100644 --- a/Samples/SampleBitmapRect.cpp +++ b/samplecode/SampleBitmapRect.cpp @@ -10,7 +10,6 @@ #include "SkShader.h" #include "SkUtils.h" #include "SkXfermode.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SampleCamera.cpp b/samplecode/SampleCamera.cpp index 9a8d1ef..9a8d1ef 100644 --- a/Samples/SampleCamera.cpp +++ b/samplecode/SampleCamera.cpp diff --git a/Samples/SampleCircle.cpp b/samplecode/SampleCircle.cpp index bfb92d4..bfb92d4 100644 --- a/Samples/SampleCircle.cpp +++ b/samplecode/SampleCircle.cpp diff --git a/Samples/SampleCode.h b/samplecode/SampleCode.h index ff660f2..ff660f2 100644 --- a/Samples/SampleCode.h +++ b/samplecode/SampleCode.h diff --git a/Samples/SampleCull.cpp b/samplecode/SampleCull.cpp index ea1bb77..ea1bb77 100644 --- a/Samples/SampleCull.cpp +++ b/samplecode/SampleCull.cpp diff --git a/Samples/SampleDither.cpp b/samplecode/SampleDither.cpp index 7f7877a..64af007 100644 --- a/Samples/SampleDither.cpp +++ b/samplecode/SampleDither.cpp @@ -6,7 +6,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "Sk1DPathEffect.h" #include "SkCornerPathEffect.h" #include "SkPathMeasure.h" diff --git a/Samples/SampleDrawLooper.cpp b/samplecode/SampleDrawLooper.cpp index 1a7a870..1a7a870 100644 --- a/Samples/SampleDrawLooper.cpp +++ b/samplecode/SampleDrawLooper.cpp diff --git a/Samples/SampleEmboss.cpp b/samplecode/SampleEmboss.cpp index cdc8b47..d12074f 100644 --- a/Samples/SampleEmboss.cpp +++ b/samplecode/SampleEmboss.cpp @@ -13,7 +13,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SampleEncode.cpp b/samplecode/SampleEncode.cpp index 221b6f8..e4197bf 100644 --- a/Samples/SampleEncode.cpp +++ b/samplecode/SampleEncode.cpp @@ -3,14 +3,13 @@ #include "SkCanvas.h" #include "SkGradientShader.h" #include "SkGraphics.h" -#include "SkImageDecoder.h" +#include "SkImageEncoder.h" #include "SkPath.h" #include "SkPorterDuff.h" #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" #include "SkXfermode.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" @@ -130,7 +129,7 @@ public: remove(path.c_str()); SkImageEncoder* codec = SkImageEncoder::Create(gTypes[j]); - if (!codec->encodeFile(path.c_str(), fBitmaps[i])) { + if (!codec->encodeFile(path.c_str(), fBitmaps[i], 100)) { SkDebugf("------ failed to encode %s\n", path.c_str()); remove(path.c_str()); // remove any partial file } diff --git a/Samples/SampleFillType.cpp b/samplecode/SampleFillType.cpp index bb268cd..bb268cd 100644 --- a/Samples/SampleFillType.cpp +++ b/samplecode/SampleFillType.cpp diff --git a/Samples/SampleFilter.cpp b/samplecode/SampleFilter.cpp index 8d26470..49d9c48 100644 --- a/Samples/SampleFilter.cpp +++ b/samplecode/SampleFilter.cpp @@ -6,7 +6,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "Sk1DPathEffect.h" #include "SkCornerPathEffect.h" #include "SkPathMeasure.h" diff --git a/Samples/SampleFilter2.cpp b/samplecode/SampleFilter2.cpp index 30ac2bd..1800eb9 100644 --- a/Samples/SampleFilter2.cpp +++ b/samplecode/SampleFilter2.cpp @@ -10,7 +10,6 @@ #include "SkShader.h" #include "SkUtils.h" #include "SkXfermode.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SampleFontCache.cpp b/samplecode/SampleFontCache.cpp index fb63f71..fb63f71 100644 --- a/Samples/SampleFontCache.cpp +++ b/samplecode/SampleFontCache.cpp diff --git a/Samples/SampleGL.cpp b/samplecode/SampleGL.cpp index 7180e3e..d020b0e 100644 --- a/Samples/SampleGL.cpp +++ b/samplecode/SampleGL.cpp @@ -11,7 +11,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SampleImage.cpp b/samplecode/SampleImage.cpp index b0f8656..4cefd27 100644 --- a/Samples/SampleImage.cpp +++ b/samplecode/SampleImage.cpp @@ -10,7 +10,6 @@ #include "SkShader.h" #include "SkUtils.h" #include "SkXfermode.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SampleImageDir.cpp b/samplecode/SampleImageDir.cpp index 50cf89a..32a719b 100644 --- a/Samples/SampleImageDir.cpp +++ b/samplecode/SampleImageDir.cpp @@ -10,7 +10,7 @@ #include "SkShader.h" #include "SkUtils.h" #include "SkXfermode.h" -#include "SkShaderExtras.h" +#include "SkComposeShader.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" @@ -23,6 +23,29 @@ #include "SkBlurDrawLooper.h" #include "SkColorMatrixFilter.h" +static void drawmarshmallow(SkCanvas* canvas) { + SkBitmap bitmap; + SkPaint paint; + SkRect r; + SkMatrix m; + + SkImageDecoder::DecodeFile("/Users/reed/Downloads/3elfs.jpg", &bitmap); + SkShader* s = SkShader::CreateBitmapShader(bitmap, + SkShader::kRepeat_TileMode, + SkShader::kRepeat_TileMode); + paint.setShader(s)->unref(); + m.setTranslate(SkIntToScalar(250), SkIntToScalar(134)); + s->setLocalMatrix(m); + + r.set(SkIntToScalar(250), + SkIntToScalar(134), + SkIntToScalar(250 + 449), + SkIntToScalar(134 + 701)); + paint.setFlags(2); + + canvas->drawRect(r, paint); +} + static void DrawRoundRect(SkCanvas& canvas) { bool ret = false; SkPaint paint; @@ -187,6 +210,12 @@ protected: virtual void onDraw(SkCanvas* canvas) { this->drawBG(canvas); + if (true) { + canvas->scale(SkIntToScalar(2), SkIntToScalar(2)); + drawmarshmallow(canvas); + return; + } + if (false) { SkPaint p; p.setStyle(SkPaint::kStroke_Style); diff --git a/Samples/SampleLayers.cpp b/samplecode/SampleLayers.cpp index fcf7107..8666745 100644 --- a/Samples/SampleLayers.cpp +++ b/samplecode/SampleLayers.cpp @@ -13,7 +13,6 @@ #include "SkPath.h" #include "SkRegion.h" #include "SkShader.h" -#include "SkShaderExtras.h" #include "SkTime.h" #include "SkTypeface.h" #include "SkUtils.h" diff --git a/Samples/SampleLines.cpp b/samplecode/SampleLines.cpp index eed0e5a..a0238b0 100644 --- a/Samples/SampleLines.cpp +++ b/samplecode/SampleLines.cpp @@ -12,7 +12,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SampleMeasure.cpp b/samplecode/SampleMeasure.cpp index 3cc0c81..70b8812 100644 --- a/Samples/SampleMeasure.cpp +++ b/samplecode/SampleMeasure.cpp @@ -6,7 +6,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "Sk1DPathEffect.h" #include "SkCornerPathEffect.h" #include "SkPathMeasure.h" diff --git a/Samples/SampleNinePatch.cpp b/samplecode/SampleNinePatch.cpp index 5c075b5..2fd60a2 100644 --- a/Samples/SampleNinePatch.cpp +++ b/samplecode/SampleNinePatch.cpp @@ -39,13 +39,6 @@ protected: dst.offset(SkIntToScalar(2), SkIntToScalar(2)); SkNinePatch::DrawNine(canvas, dst, fBM, margins); - - int cx = fBM.width()/2; - int cy = fBM.height()/2; - SkPMColor pm = *fBM.getAddr32(cx, cy); - SkColor c = SkUnPreMultiply::PMColorToColor(pm); - SkColor pm2 = SkPreMultiplyColor(c); - //SkDebugf("--- pm %x c %x pm2 %x\n", pm, c, pm2); } virtual void onDraw(SkCanvas* canvas) { diff --git a/Samples/SampleOverflow.cpp b/samplecode/SampleOverflow.cpp index 229683f..229683f 100644 --- a/Samples/SampleOverflow.cpp +++ b/samplecode/SampleOverflow.cpp diff --git a/Samples/SamplePageFlip.cpp b/samplecode/SamplePageFlip.cpp index 6b1adfd..6b1adfd 100644 --- a/Samples/SamplePageFlip.cpp +++ b/samplecode/SamplePageFlip.cpp diff --git a/Samples/SamplePatch.cpp b/samplecode/SamplePatch.cpp index 2e55db2..77bd332 100644 --- a/Samples/SamplePatch.cpp +++ b/samplecode/SamplePatch.cpp @@ -11,7 +11,6 @@ #include "SkShader.h" #include "SkUtils.h" #include "SkXfermode.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SamplePath.cpp b/samplecode/SamplePath.cpp index 04d006a..98f1a5b 100644 --- a/Samples/SamplePath.cpp +++ b/samplecode/SamplePath.cpp @@ -10,7 +10,6 @@ #include "SkShader.h" #include "SkUtils.h" #include "SkXfermode.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SamplePathEffects.cpp b/samplecode/SamplePathEffects.cpp index 4082288..4e964d7 100644 --- a/Samples/SamplePathEffects.cpp +++ b/samplecode/SamplePathEffects.cpp @@ -6,7 +6,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "Sk1DPathEffect.h" #include "SkCornerPathEffect.h" #include "SkPathMeasure.h" diff --git a/Samples/SamplePicture.cpp b/samplecode/SamplePicture.cpp index 48de7df..dfc1555 100644 --- a/Samples/SamplePicture.cpp +++ b/samplecode/SamplePicture.cpp @@ -12,7 +12,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SamplePoints.cpp b/samplecode/SamplePoints.cpp index 2c19658..7dc98f3 100644 --- a/Samples/SamplePoints.cpp +++ b/samplecode/SamplePoints.cpp @@ -11,7 +11,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SamplePolyToPoly.cpp b/samplecode/SamplePolyToPoly.cpp index 98e4484..98e4484 100644 --- a/Samples/SamplePolyToPoly.cpp +++ b/samplecode/SamplePolyToPoly.cpp diff --git a/Samples/SampleRegion.cpp b/samplecode/SampleRegion.cpp index 8958c82..d3fe062 100644 --- a/Samples/SampleRegion.cpp +++ b/samplecode/SampleRegion.cpp @@ -279,28 +279,6 @@ protected: canvas->translate(SkIntToScalar(200), 0); } - - if (false) - { - SkBitmap bitmap; - - bitmap.setConfig(SkBitmap::kARGB_8888_Config, 100, 100); - bitmap.allocPixels(); - bitmap.eraseColor(0); - - SkCanvas canvas(bitmap); - SkPaint paint; - SkRect r; - - paint.setAntiAlias(true); - paint.setARGB(0xFF, 0xFF, 0, 0xFF); - r.set(0, 0, SkIntToScalar(100), SkIntToScalar(100)); - canvas.drawOval(r, paint); - - SkImageEncoder* en = SkImageEncoder::Create(SkImageEncoder::kPNG_Type); - en->encodeFile("testfile.png", bitmap); - delete en; - } } virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) diff --git a/Samples/SampleShaders.cpp b/samplecode/SampleShaders.cpp index 4d82182..f5ddca9 100644 --- a/Samples/SampleShaders.cpp +++ b/samplecode/SampleShaders.cpp @@ -10,7 +10,7 @@ #include "SkShader.h" #include "SkUtils.h" #include "SkXfermode.h" -#include "SkShaderExtras.h" +#include "SkComposeShader.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SampleStrokeText.cpp b/samplecode/SampleStrokeText.cpp index 8b78585..0627d51 100644 --- a/Samples/SampleStrokeText.cpp +++ b/samplecode/SampleStrokeText.cpp @@ -11,7 +11,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SampleTests.cpp b/samplecode/SampleTests.cpp index d021672..d021672 100644 --- a/Samples/SampleTests.cpp +++ b/samplecode/SampleTests.cpp diff --git a/Samples/SampleText.cpp b/samplecode/SampleText.cpp index 9fc3708..60e015a 100644 --- a/Samples/SampleText.cpp +++ b/samplecode/SampleText.cpp @@ -11,7 +11,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" @@ -96,9 +95,11 @@ static void test_typefaceCache() SkTypeface* t2 = SkTypeface::Create("arial", SkTypeface::kNormal); SkTypeface* t3 = SkTypeface::Create("helvetica", SkTypeface::kItalic); +#ifndef SK_BUILD_FOR_MAC SkASSERT(t0 == t1); SkASSERT(t0 == t2); SkASSERT(t0 == t3); +#endif } static void test_breakText() diff --git a/Samples/SampleTextAlpha.cpp b/samplecode/SampleTextAlpha.cpp index f2a6530..d695f23 100644 --- a/Samples/SampleTextAlpha.cpp +++ b/samplecode/SampleTextAlpha.cpp @@ -12,7 +12,6 @@ #include "SkShader.h" #include "SkUtils.h" #include "SkXfermode.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SampleTextEffects.cpp b/samplecode/SampleTextEffects.cpp index b7a986f..2293a04 100644 --- a/Samples/SampleTextEffects.cpp +++ b/samplecode/SampleTextEffects.cpp @@ -6,7 +6,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTypeface.h" @@ -344,7 +343,7 @@ class TextEffectView : public SkView { public: TextEffectView() { - fFace = SkTypeface::CreateFromFile("/Computerfont.ttf"); + fFace = SkTypeface::CreateFromFile("/Users/reed/Downloads/p052024l.pfb"); } virtual ~TextEffectView() diff --git a/Samples/SampleTextOnPath.cpp b/samplecode/SampleTextOnPath.cpp index 382b4d9..97b4e8e 100644 --- a/Samples/SampleTextOnPath.cpp +++ b/samplecode/SampleTextOnPath.cpp @@ -11,7 +11,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTypeface.h" diff --git a/Samples/SampleTiling.cpp b/samplecode/SampleTiling.cpp index 559d9d4..759c17c 100644 --- a/Samples/SampleTiling.cpp +++ b/samplecode/SampleTiling.cpp @@ -12,7 +12,6 @@ // effects #include "SkGradientShader.h" -#include "SkShaderExtras.h" #include "SkUnitMappers.h" #include "SkBlurDrawLooper.h" diff --git a/Samples/SampleTypeface.cpp b/samplecode/SampleTypeface.cpp index e78c525..94023b7 100644 --- a/Samples/SampleTypeface.cpp +++ b/samplecode/SampleTypeface.cpp @@ -6,7 +6,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "Sk1DPathEffect.h" #include "SkCornerPathEffect.h" #include "SkPathMeasure.h" diff --git a/Samples/SampleVertices.cpp b/samplecode/SampleVertices.cpp index 54dada2..637c661 100644 --- a/Samples/SampleVertices.cpp +++ b/samplecode/SampleVertices.cpp @@ -11,7 +11,6 @@ #include "SkShader.h" #include "SkUtils.h" #include "SkXfermode.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/SampleXfermodes.cpp b/samplecode/SampleXfermodes.cpp index 5a05fc8..1dbfc95 100644 --- a/Samples/SampleXfermodes.cpp +++ b/samplecode/SampleXfermodes.cpp @@ -12,7 +12,6 @@ #include "SkRegion.h" #include "SkShader.h" #include "SkUtils.h" -#include "SkShaderExtras.h" #include "SkColorPriv.h" #include "SkColorFilter.h" #include "SkTime.h" diff --git a/Samples/vertexdump.cpp b/samplecode/vertexdump.cpp index c124ad8..c124ad8 100644 --- a/Samples/vertexdump.cpp +++ b/samplecode/vertexdump.cpp diff --git a/libsgl/animator/SkAnimate.h b/src/animator/SkAnimate.h index a4281d3..a4281d3 100644 --- a/libsgl/animator/SkAnimate.h +++ b/src/animator/SkAnimate.h diff --git a/libsgl/animator/SkAnimateActive.cpp b/src/animator/SkAnimateActive.cpp index 4ee7ded..4ee7ded 100644 --- a/libsgl/animator/SkAnimateActive.cpp +++ b/src/animator/SkAnimateActive.cpp diff --git a/libsgl/animator/SkAnimateActive.h b/src/animator/SkAnimateActive.h index b0c4483..b0c4483 100644 --- a/libsgl/animator/SkAnimateActive.h +++ b/src/animator/SkAnimateActive.h diff --git a/libsgl/animator/SkAnimateBase.cpp b/src/animator/SkAnimateBase.cpp index 10a3b5b..10a3b5b 100644 --- a/libsgl/animator/SkAnimateBase.cpp +++ b/src/animator/SkAnimateBase.cpp diff --git a/libsgl/animator/SkAnimateBase.h b/src/animator/SkAnimateBase.h index 64b9722..64b9722 100644 --- a/libsgl/animator/SkAnimateBase.h +++ b/src/animator/SkAnimateBase.h diff --git a/libsgl/animator/SkAnimateField.cpp b/src/animator/SkAnimateField.cpp index f1439a2..f1439a2 100644 --- a/libsgl/animator/SkAnimateField.cpp +++ b/src/animator/SkAnimateField.cpp diff --git a/libsgl/animator/SkAnimateMaker.cpp b/src/animator/SkAnimateMaker.cpp index 8a78678..8a78678 100644 --- a/libsgl/animator/SkAnimateMaker.cpp +++ b/src/animator/SkAnimateMaker.cpp diff --git a/libsgl/animator/SkAnimateMaker.h b/src/animator/SkAnimateMaker.h index dae8caf..dae8caf 100644 --- a/libsgl/animator/SkAnimateMaker.h +++ b/src/animator/SkAnimateMaker.h diff --git a/libsgl/animator/SkAnimateProperties.h b/src/animator/SkAnimateProperties.h index 9e3da9a..9e3da9a 100644 --- a/libsgl/animator/SkAnimateProperties.h +++ b/src/animator/SkAnimateProperties.h diff --git a/libsgl/animator/SkAnimateSet.cpp b/src/animator/SkAnimateSet.cpp index dd636da..dd636da 100644 --- a/libsgl/animator/SkAnimateSet.cpp +++ b/src/animator/SkAnimateSet.cpp diff --git a/libsgl/animator/SkAnimateSet.h b/src/animator/SkAnimateSet.h index 9f9ecfb..9f9ecfb 100644 --- a/libsgl/animator/SkAnimateSet.h +++ b/src/animator/SkAnimateSet.h diff --git a/libsgl/animator/SkAnimator.cpp b/src/animator/SkAnimator.cpp index 242398b..242398b 100644 --- a/libsgl/animator/SkAnimator.cpp +++ b/src/animator/SkAnimator.cpp diff --git a/libsgl/animator/SkAnimatorScript.cpp b/src/animator/SkAnimatorScript.cpp index eafe1db..eafe1db 100644 --- a/libsgl/animator/SkAnimatorScript.cpp +++ b/src/animator/SkAnimatorScript.cpp diff --git a/libsgl/animator/SkAnimatorScript.h b/src/animator/SkAnimatorScript.h index 2fdb029..2fdb029 100644 --- a/libsgl/animator/SkAnimatorScript.h +++ b/src/animator/SkAnimatorScript.h diff --git a/libsgl/animator/SkAnimatorScript2.cpp b/src/animator/SkAnimatorScript2.cpp index 08dbf16..08dbf16 100644 --- a/libsgl/animator/SkAnimatorScript2.cpp +++ b/src/animator/SkAnimatorScript2.cpp diff --git a/libsgl/animator/SkAnimatorScript2.h b/src/animator/SkAnimatorScript2.h index 61261e9..61261e9 100644 --- a/libsgl/animator/SkAnimatorScript2.h +++ b/src/animator/SkAnimatorScript2.h diff --git a/libsgl/animator/SkBase64.cpp b/src/animator/SkBase64.cpp index e192a52..e192a52 100644 --- a/libsgl/animator/SkBase64.cpp +++ b/src/animator/SkBase64.cpp diff --git a/libsgl/animator/SkBase64.h b/src/animator/SkBase64.h index 12ccf8c..12ccf8c 100644 --- a/libsgl/animator/SkBase64.h +++ b/src/animator/SkBase64.h diff --git a/libsgl/animator/SkBoundable.cpp b/src/animator/SkBoundable.cpp index f2125ea..f2125ea 100644 --- a/libsgl/animator/SkBoundable.cpp +++ b/src/animator/SkBoundable.cpp diff --git a/libsgl/animator/SkBoundable.h b/src/animator/SkBoundable.h index 67f5a12..67f5a12 100644 --- a/libsgl/animator/SkBoundable.h +++ b/src/animator/SkBoundable.h diff --git a/libsgl/animator/SkBuildCondensedInfo.cpp b/src/animator/SkBuildCondensedInfo.cpp index 5e4eedc..5e4eedc 100644 --- a/libsgl/animator/SkBuildCondensedInfo.cpp +++ b/src/animator/SkBuildCondensedInfo.cpp diff --git a/libsgl/animator/SkCondensedDebug.cpp b/src/animator/SkCondensedDebug.cpp index e7b7ff1..e7b7ff1 100644 --- a/libsgl/animator/SkCondensedDebug.cpp +++ b/src/animator/SkCondensedDebug.cpp diff --git a/libsgl/animator/SkCondensedRelease.cpp b/src/animator/SkCondensedRelease.cpp index a493cb3..a493cb3 100644 --- a/libsgl/animator/SkCondensedRelease.cpp +++ b/src/animator/SkCondensedRelease.cpp diff --git a/libsgl/animator/SkDisplayAdd.cpp b/src/animator/SkDisplayAdd.cpp index 8a97a06..8a97a06 100644 --- a/libsgl/animator/SkDisplayAdd.cpp +++ b/src/animator/SkDisplayAdd.cpp diff --git a/libsgl/animator/SkDisplayAdd.h b/src/animator/SkDisplayAdd.h index 0f3edc9..0f3edc9 100644 --- a/libsgl/animator/SkDisplayAdd.h +++ b/src/animator/SkDisplayAdd.h diff --git a/libsgl/animator/SkDisplayApply.cpp b/src/animator/SkDisplayApply.cpp index b9e65f7..b9e65f7 100644 --- a/libsgl/animator/SkDisplayApply.cpp +++ b/src/animator/SkDisplayApply.cpp diff --git a/libsgl/animator/SkDisplayApply.h b/src/animator/SkDisplayApply.h index d51e467..d51e467 100644 --- a/libsgl/animator/SkDisplayApply.h +++ b/src/animator/SkDisplayApply.h diff --git a/libsgl/animator/SkDisplayBounds.cpp b/src/animator/SkDisplayBounds.cpp index d0499ce..d0499ce 100644 --- a/libsgl/animator/SkDisplayBounds.cpp +++ b/src/animator/SkDisplayBounds.cpp diff --git a/libsgl/animator/SkDisplayBounds.h b/src/animator/SkDisplayBounds.h index 6fcd09c..6fcd09c 100644 --- a/libsgl/animator/SkDisplayBounds.h +++ b/src/animator/SkDisplayBounds.h diff --git a/libsgl/animator/SkDisplayEvent.cpp b/src/animator/SkDisplayEvent.cpp index 6253cdf..6253cdf 100644 --- a/libsgl/animator/SkDisplayEvent.cpp +++ b/src/animator/SkDisplayEvent.cpp diff --git a/libsgl/animator/SkDisplayEvent.h b/src/animator/SkDisplayEvent.h index 837cfec..837cfec 100644 --- a/libsgl/animator/SkDisplayEvent.h +++ b/src/animator/SkDisplayEvent.h diff --git a/libsgl/animator/SkDisplayEvents.cpp b/src/animator/SkDisplayEvents.cpp index e6a01ba..e6a01ba 100644 --- a/libsgl/animator/SkDisplayEvents.cpp +++ b/src/animator/SkDisplayEvents.cpp diff --git a/libsgl/animator/SkDisplayEvents.h b/src/animator/SkDisplayEvents.h index 73721d4..73721d4 100644 --- a/libsgl/animator/SkDisplayEvents.h +++ b/src/animator/SkDisplayEvents.h diff --git a/libsgl/animator/SkDisplayInclude.cpp b/src/animator/SkDisplayInclude.cpp index 26b1e69..26b1e69 100644 --- a/libsgl/animator/SkDisplayInclude.cpp +++ b/src/animator/SkDisplayInclude.cpp diff --git a/libsgl/animator/SkDisplayInclude.h b/src/animator/SkDisplayInclude.h index 81ad76a..81ad76a 100644 --- a/libsgl/animator/SkDisplayInclude.h +++ b/src/animator/SkDisplayInclude.h diff --git a/libsgl/animator/SkDisplayInput.cpp b/src/animator/SkDisplayInput.cpp index 3688930..3688930 100644 --- a/libsgl/animator/SkDisplayInput.cpp +++ b/src/animator/SkDisplayInput.cpp diff --git a/libsgl/animator/SkDisplayInput.h b/src/animator/SkDisplayInput.h index ac7c7c1..ac7c7c1 100644 --- a/libsgl/animator/SkDisplayInput.h +++ b/src/animator/SkDisplayInput.h diff --git a/libsgl/animator/SkDisplayList.cpp b/src/animator/SkDisplayList.cpp index 57f29f7..57f29f7 100644 --- a/libsgl/animator/SkDisplayList.cpp +++ b/src/animator/SkDisplayList.cpp diff --git a/libsgl/animator/SkDisplayList.h b/src/animator/SkDisplayList.h index 3743e35..3743e35 100644 --- a/libsgl/animator/SkDisplayList.h +++ b/src/animator/SkDisplayList.h diff --git a/libsgl/animator/SkDisplayMath.cpp b/src/animator/SkDisplayMath.cpp index 66bd1f8..66bd1f8 100644 --- a/libsgl/animator/SkDisplayMath.cpp +++ b/src/animator/SkDisplayMath.cpp diff --git a/libsgl/animator/SkDisplayMath.h b/src/animator/SkDisplayMath.h index de26319..de26319 100644 --- a/libsgl/animator/SkDisplayMath.h +++ b/src/animator/SkDisplayMath.h diff --git a/libsgl/animator/SkDisplayMovie.cpp b/src/animator/SkDisplayMovie.cpp index ed74329..ed74329 100644 --- a/libsgl/animator/SkDisplayMovie.cpp +++ b/src/animator/SkDisplayMovie.cpp diff --git a/libsgl/animator/SkDisplayMovie.h b/src/animator/SkDisplayMovie.h index 2b8a893..2b8a893 100644 --- a/libsgl/animator/SkDisplayMovie.h +++ b/src/animator/SkDisplayMovie.h diff --git a/libsgl/animator/SkDisplayNumber.cpp b/src/animator/SkDisplayNumber.cpp index 3bb96d7..3bb96d7 100644 --- a/libsgl/animator/SkDisplayNumber.cpp +++ b/src/animator/SkDisplayNumber.cpp diff --git a/libsgl/animator/SkDisplayNumber.h b/src/animator/SkDisplayNumber.h index 515c35b..515c35b 100644 --- a/libsgl/animator/SkDisplayNumber.h +++ b/src/animator/SkDisplayNumber.h diff --git a/libsgl/animator/SkDisplayPost.cpp b/src/animator/SkDisplayPost.cpp index 17e7c76..17e7c76 100644 --- a/libsgl/animator/SkDisplayPost.cpp +++ b/src/animator/SkDisplayPost.cpp diff --git a/libsgl/animator/SkDisplayPost.h b/src/animator/SkDisplayPost.h index 4b75b07..4b75b07 100644 --- a/libsgl/animator/SkDisplayPost.h +++ b/src/animator/SkDisplayPost.h diff --git a/libsgl/animator/SkDisplayRandom.cpp b/src/animator/SkDisplayRandom.cpp index ab078cd..ab078cd 100644 --- a/libsgl/animator/SkDisplayRandom.cpp +++ b/src/animator/SkDisplayRandom.cpp diff --git a/libsgl/animator/SkDisplayRandom.h b/src/animator/SkDisplayRandom.h index b40907e..b40907e 100644 --- a/libsgl/animator/SkDisplayRandom.h +++ b/src/animator/SkDisplayRandom.h diff --git a/libsgl/animator/SkDisplayScreenplay.cpp b/src/animator/SkDisplayScreenplay.cpp index 58180e7..58180e7 100644 --- a/libsgl/animator/SkDisplayScreenplay.cpp +++ b/src/animator/SkDisplayScreenplay.cpp diff --git a/libsgl/animator/SkDisplayScreenplay.h b/src/animator/SkDisplayScreenplay.h index cb8103d..cb8103d 100644 --- a/libsgl/animator/SkDisplayScreenplay.h +++ b/src/animator/SkDisplayScreenplay.h diff --git a/libsgl/animator/SkDisplayType.cpp b/src/animator/SkDisplayType.cpp index 90fcd89..90fcd89 100644 --- a/libsgl/animator/SkDisplayType.cpp +++ b/src/animator/SkDisplayType.cpp diff --git a/libsgl/animator/SkDisplayType.h b/src/animator/SkDisplayType.h index a29b285..a29b285 100644 --- a/libsgl/animator/SkDisplayType.h +++ b/src/animator/SkDisplayType.h diff --git a/libsgl/animator/SkDisplayTypes.cpp b/src/animator/SkDisplayTypes.cpp index b5bc573..b5bc573 100644 --- a/libsgl/animator/SkDisplayTypes.cpp +++ b/src/animator/SkDisplayTypes.cpp diff --git a/libsgl/animator/SkDisplayTypes.h b/src/animator/SkDisplayTypes.h index 0ac57ba..0ac57ba 100644 --- a/libsgl/animator/SkDisplayTypes.h +++ b/src/animator/SkDisplayTypes.h diff --git a/libsgl/animator/SkDisplayXMLParser.cpp b/src/animator/SkDisplayXMLParser.cpp index d2775e8..d2775e8 100644 --- a/libsgl/animator/SkDisplayXMLParser.cpp +++ b/src/animator/SkDisplayXMLParser.cpp diff --git a/libsgl/animator/SkDisplayXMLParser.h b/src/animator/SkDisplayXMLParser.h index 2c2bec1..2c2bec1 100644 --- a/libsgl/animator/SkDisplayXMLParser.h +++ b/src/animator/SkDisplayXMLParser.h diff --git a/libsgl/animator/SkDisplayable.cpp b/src/animator/SkDisplayable.cpp index e50e1ab..e50e1ab 100644 --- a/libsgl/animator/SkDisplayable.cpp +++ b/src/animator/SkDisplayable.cpp diff --git a/libsgl/animator/SkDisplayable.h b/src/animator/SkDisplayable.h index cbc96de..cbc96de 100644 --- a/libsgl/animator/SkDisplayable.h +++ b/src/animator/SkDisplayable.h diff --git a/libsgl/animator/SkDraw3D.cpp b/src/animator/SkDraw3D.cpp index 137de9f..137de9f 100644 --- a/libsgl/animator/SkDraw3D.cpp +++ b/src/animator/SkDraw3D.cpp diff --git a/libsgl/animator/SkDraw3D.h b/src/animator/SkDraw3D.h index 5ab61cd..5ab61cd 100644 --- a/libsgl/animator/SkDraw3D.h +++ b/src/animator/SkDraw3D.h diff --git a/libsgl/animator/SkDrawBitmap.cpp b/src/animator/SkDrawBitmap.cpp index 25355be..25355be 100644 --- a/libsgl/animator/SkDrawBitmap.cpp +++ b/src/animator/SkDrawBitmap.cpp diff --git a/libsgl/animator/SkDrawBitmap.h b/src/animator/SkDrawBitmap.h index f846193..f846193 100644 --- a/libsgl/animator/SkDrawBitmap.h +++ b/src/animator/SkDrawBitmap.h diff --git a/libsgl/animator/SkDrawBlur.cpp b/src/animator/SkDrawBlur.cpp index 0ebabce..0ebabce 100644 --- a/libsgl/animator/SkDrawBlur.cpp +++ b/src/animator/SkDrawBlur.cpp diff --git a/libsgl/animator/SkDrawBlur.h b/src/animator/SkDrawBlur.h index 14ceba0..14ceba0 100644 --- a/libsgl/animator/SkDrawBlur.h +++ b/src/animator/SkDrawBlur.h diff --git a/libsgl/animator/SkDrawClip.cpp b/src/animator/SkDrawClip.cpp index 1c01c6a..1c01c6a 100644 --- a/libsgl/animator/SkDrawClip.cpp +++ b/src/animator/SkDrawClip.cpp diff --git a/libsgl/animator/SkDrawClip.h b/src/animator/SkDrawClip.h index 2fed99a..2fed99a 100644 --- a/libsgl/animator/SkDrawClip.h +++ b/src/animator/SkDrawClip.h diff --git a/libsgl/animator/SkDrawColor.cpp b/src/animator/SkDrawColor.cpp index 009ca10..009ca10 100644 --- a/libsgl/animator/SkDrawColor.cpp +++ b/src/animator/SkDrawColor.cpp diff --git a/libsgl/animator/SkDrawColor.h b/src/animator/SkDrawColor.h index 89b87cc..89b87cc 100644 --- a/libsgl/animator/SkDrawColor.h +++ b/src/animator/SkDrawColor.h diff --git a/libsgl/animator/SkDrawDash.cpp b/src/animator/SkDrawDash.cpp index bdac9cd..bdac9cd 100644 --- a/libsgl/animator/SkDrawDash.cpp +++ b/src/animator/SkDrawDash.cpp diff --git a/libsgl/animator/SkDrawDash.h b/src/animator/SkDrawDash.h index c2108c1..c2108c1 100644 --- a/libsgl/animator/SkDrawDash.h +++ b/src/animator/SkDrawDash.h diff --git a/libsgl/animator/SkDrawDiscrete.cpp b/src/animator/SkDrawDiscrete.cpp index e1089c2..e1089c2 100644 --- a/libsgl/animator/SkDrawDiscrete.cpp +++ b/src/animator/SkDrawDiscrete.cpp diff --git a/libsgl/animator/SkDrawDiscrete.h b/src/animator/SkDrawDiscrete.h index 78485ee..78485ee 100644 --- a/libsgl/animator/SkDrawDiscrete.h +++ b/src/animator/SkDrawDiscrete.h diff --git a/libsgl/animator/SkDrawEmboss.cpp b/src/animator/SkDrawEmboss.cpp index 77f6dfd..77f6dfd 100644 --- a/libsgl/animator/SkDrawEmboss.cpp +++ b/src/animator/SkDrawEmboss.cpp diff --git a/libsgl/animator/SkDrawEmboss.h b/src/animator/SkDrawEmboss.h index fe6911b..fe6911b 100644 --- a/libsgl/animator/SkDrawEmboss.h +++ b/src/animator/SkDrawEmboss.h diff --git a/libsgl/animator/SkDrawExtraPathEffect.cpp b/src/animator/SkDrawExtraPathEffect.cpp index 4cca738..4cca738 100644 --- a/libsgl/animator/SkDrawExtraPathEffect.cpp +++ b/src/animator/SkDrawExtraPathEffect.cpp diff --git a/libsgl/animator/SkDrawFull.cpp b/src/animator/SkDrawFull.cpp index c6568db..c6568db 100644 --- a/libsgl/animator/SkDrawFull.cpp +++ b/src/animator/SkDrawFull.cpp diff --git a/libsgl/animator/SkDrawFull.h b/src/animator/SkDrawFull.h index cfbb643..cfbb643 100644 --- a/libsgl/animator/SkDrawFull.h +++ b/src/animator/SkDrawFull.h diff --git a/libsgl/animator/SkDrawGradient.cpp b/src/animator/SkDrawGradient.cpp index e9061b5..e9061b5 100644 --- a/libsgl/animator/SkDrawGradient.cpp +++ b/src/animator/SkDrawGradient.cpp diff --git a/libsgl/animator/SkDrawGradient.h b/src/animator/SkDrawGradient.h index 30a86df..30a86df 100644 --- a/libsgl/animator/SkDrawGradient.h +++ b/src/animator/SkDrawGradient.h diff --git a/libsgl/animator/SkDrawGroup.cpp b/src/animator/SkDrawGroup.cpp index aa53564..aa53564 100644 --- a/libsgl/animator/SkDrawGroup.cpp +++ b/src/animator/SkDrawGroup.cpp diff --git a/libsgl/animator/SkDrawGroup.h b/src/animator/SkDrawGroup.h index 0009a4c..0009a4c 100644 --- a/libsgl/animator/SkDrawGroup.h +++ b/src/animator/SkDrawGroup.h diff --git a/libsgl/animator/SkDrawLine.cpp b/src/animator/SkDrawLine.cpp index 166cbbc..166cbbc 100644 --- a/libsgl/animator/SkDrawLine.cpp +++ b/src/animator/SkDrawLine.cpp diff --git a/libsgl/animator/SkDrawLine.h b/src/animator/SkDrawLine.h index 8f771cf..8f771cf 100644 --- a/libsgl/animator/SkDrawLine.h +++ b/src/animator/SkDrawLine.h diff --git a/libsgl/animator/SkDrawMatrix.cpp b/src/animator/SkDrawMatrix.cpp index dbdbf19..dbdbf19 100644 --- a/libsgl/animator/SkDrawMatrix.cpp +++ b/src/animator/SkDrawMatrix.cpp diff --git a/libsgl/animator/SkDrawMatrix.h b/src/animator/SkDrawMatrix.h index 8339d8c..8339d8c 100644 --- a/libsgl/animator/SkDrawMatrix.h +++ b/src/animator/SkDrawMatrix.h diff --git a/libsgl/animator/SkDrawOval.cpp b/src/animator/SkDrawOval.cpp index 0e3a9ae..0e3a9ae 100644 --- a/libsgl/animator/SkDrawOval.cpp +++ b/src/animator/SkDrawOval.cpp diff --git a/libsgl/animator/SkDrawOval.h b/src/animator/SkDrawOval.h index 0e7ae3f..0e7ae3f 100644 --- a/libsgl/animator/SkDrawOval.h +++ b/src/animator/SkDrawOval.h diff --git a/libsgl/animator/SkDrawPaint.cpp b/src/animator/SkDrawPaint.cpp index 68caa5a..68caa5a 100644 --- a/libsgl/animator/SkDrawPaint.cpp +++ b/src/animator/SkDrawPaint.cpp diff --git a/libsgl/animator/SkDrawPaint.h b/src/animator/SkDrawPaint.h index ea77acd..ea77acd 100644 --- a/libsgl/animator/SkDrawPaint.h +++ b/src/animator/SkDrawPaint.h diff --git a/libsgl/animator/SkDrawPath.cpp b/src/animator/SkDrawPath.cpp index 895e597..895e597 100644 --- a/libsgl/animator/SkDrawPath.cpp +++ b/src/animator/SkDrawPath.cpp diff --git a/libsgl/animator/SkDrawPath.h b/src/animator/SkDrawPath.h index 673051a..673051a 100644 --- a/libsgl/animator/SkDrawPath.h +++ b/src/animator/SkDrawPath.h diff --git a/libsgl/animator/SkDrawPoint.cpp b/src/animator/SkDrawPoint.cpp index 383a599..383a599 100644 --- a/libsgl/animator/SkDrawPoint.cpp +++ b/src/animator/SkDrawPoint.cpp diff --git a/libsgl/animator/SkDrawPoint.h b/src/animator/SkDrawPoint.h index d06e5b7..d06e5b7 100644 --- a/libsgl/animator/SkDrawPoint.h +++ b/src/animator/SkDrawPoint.h diff --git a/libsgl/animator/SkDrawRectangle.cpp b/src/animator/SkDrawRectangle.cpp index f2054bd..f2054bd 100644 --- a/libsgl/animator/SkDrawRectangle.cpp +++ b/src/animator/SkDrawRectangle.cpp diff --git a/libsgl/animator/SkDrawRectangle.h b/src/animator/SkDrawRectangle.h index 9f8bc0a..9f8bc0a 100644 --- a/libsgl/animator/SkDrawRectangle.h +++ b/src/animator/SkDrawRectangle.h diff --git a/libsgl/animator/SkDrawSaveLayer.cpp b/src/animator/SkDrawSaveLayer.cpp index bc2288f..bc2288f 100644 --- a/libsgl/animator/SkDrawSaveLayer.cpp +++ b/src/animator/SkDrawSaveLayer.cpp diff --git a/libsgl/animator/SkDrawSaveLayer.h b/src/animator/SkDrawSaveLayer.h index 52a36a4..52a36a4 100644 --- a/libsgl/animator/SkDrawSaveLayer.h +++ b/src/animator/SkDrawSaveLayer.h diff --git a/libsgl/animator/SkDrawShader.cpp b/src/animator/SkDrawShader.cpp index b38718e..b38718e 100644 --- a/libsgl/animator/SkDrawShader.cpp +++ b/src/animator/SkDrawShader.cpp diff --git a/libsgl/animator/SkDrawShader.h b/src/animator/SkDrawShader.h index 35ca419..35ca419 100644 --- a/libsgl/animator/SkDrawShader.h +++ b/src/animator/SkDrawShader.h diff --git a/libsgl/animator/SkDrawText.cpp b/src/animator/SkDrawText.cpp index dcc3a75..dcc3a75 100644 --- a/libsgl/animator/SkDrawText.cpp +++ b/src/animator/SkDrawText.cpp diff --git a/libsgl/animator/SkDrawText.h b/src/animator/SkDrawText.h index cb1d1b9..cb1d1b9 100644 --- a/libsgl/animator/SkDrawText.h +++ b/src/animator/SkDrawText.h diff --git a/libsgl/animator/SkDrawTextBox.cpp b/src/animator/SkDrawTextBox.cpp index 4c4ac76..4c4ac76 100644 --- a/libsgl/animator/SkDrawTextBox.cpp +++ b/src/animator/SkDrawTextBox.cpp diff --git a/libsgl/animator/SkDrawTextBox.h b/src/animator/SkDrawTextBox.h index ee97c22..ee97c22 100644 --- a/libsgl/animator/SkDrawTextBox.h +++ b/src/animator/SkDrawTextBox.h diff --git a/libsgl/animator/SkDrawTo.cpp b/src/animator/SkDrawTo.cpp index 342f7d4..342f7d4 100644 --- a/libsgl/animator/SkDrawTo.cpp +++ b/src/animator/SkDrawTo.cpp diff --git a/libsgl/animator/SkDrawTo.h b/src/animator/SkDrawTo.h index 0ad78e8..0ad78e8 100644 --- a/libsgl/animator/SkDrawTo.h +++ b/src/animator/SkDrawTo.h diff --git a/libsgl/animator/SkDrawTransparentShader.cpp b/src/animator/SkDrawTransparentShader.cpp index c1da687..c1da687 100644 --- a/libsgl/animator/SkDrawTransparentShader.cpp +++ b/src/animator/SkDrawTransparentShader.cpp diff --git a/libsgl/animator/SkDrawTransparentShader.h b/src/animator/SkDrawTransparentShader.h index e831883..e831883 100644 --- a/libsgl/animator/SkDrawTransparentShader.h +++ b/src/animator/SkDrawTransparentShader.h diff --git a/libsgl/animator/SkDrawable.cpp b/src/animator/SkDrawable.cpp index 6968fe1..6968fe1 100644 --- a/libsgl/animator/SkDrawable.cpp +++ b/src/animator/SkDrawable.cpp diff --git a/libsgl/animator/SkDrawable.h b/src/animator/SkDrawable.h index 7284a25..7284a25 100644 --- a/libsgl/animator/SkDrawable.h +++ b/src/animator/SkDrawable.h diff --git a/libsgl/animator/SkDump.cpp b/src/animator/SkDump.cpp index eac956c..eac956c 100644 --- a/libsgl/animator/SkDump.cpp +++ b/src/animator/SkDump.cpp diff --git a/libsgl/animator/SkDump.h b/src/animator/SkDump.h index 73a6957..73a6957 100644 --- a/libsgl/animator/SkDump.h +++ b/src/animator/SkDump.h diff --git a/libsgl/animator/SkExtras.h b/src/animator/SkExtras.h index 88e9b2d..88e9b2d 100644 --- a/libsgl/animator/SkExtras.h +++ b/src/animator/SkExtras.h diff --git a/libsgl/animator/SkGetCondensedInfo.cpp b/src/animator/SkGetCondensedInfo.cpp index ee91caa..ee91caa 100644 --- a/libsgl/animator/SkGetCondensedInfo.cpp +++ b/src/animator/SkGetCondensedInfo.cpp diff --git a/libsgl/animator/SkHitClear.cpp b/src/animator/SkHitClear.cpp index e7e301d..e7e301d 100644 --- a/libsgl/animator/SkHitClear.cpp +++ b/src/animator/SkHitClear.cpp diff --git a/libsgl/animator/SkHitClear.h b/src/animator/SkHitClear.h index f2b50c0..f2b50c0 100644 --- a/libsgl/animator/SkHitClear.h +++ b/src/animator/SkHitClear.h diff --git a/libsgl/animator/SkHitTest.cpp b/src/animator/SkHitTest.cpp index 585249a..585249a 100644 --- a/libsgl/animator/SkHitTest.cpp +++ b/src/animator/SkHitTest.cpp diff --git a/libsgl/animator/SkHitTest.h b/src/animator/SkHitTest.h index b3a9d85..b3a9d85 100644 --- a/libsgl/animator/SkHitTest.h +++ b/src/animator/SkHitTest.h diff --git a/libsgl/animator/SkIntArray.h b/src/animator/SkIntArray.h index b2a49c1..b2a49c1 100644 --- a/libsgl/animator/SkIntArray.h +++ b/src/animator/SkIntArray.h diff --git a/libsgl/animator/SkMatrixParts.cpp b/src/animator/SkMatrixParts.cpp index 56bb2d0..56bb2d0 100644 --- a/libsgl/animator/SkMatrixParts.cpp +++ b/src/animator/SkMatrixParts.cpp diff --git a/libsgl/animator/SkMatrixParts.h b/src/animator/SkMatrixParts.h index d97d9fb..d97d9fb 100644 --- a/libsgl/animator/SkMatrixParts.h +++ b/src/animator/SkMatrixParts.h diff --git a/libsgl/animator/SkMemberInfo.cpp b/src/animator/SkMemberInfo.cpp index 50536c2..50536c2 100644 --- a/libsgl/animator/SkMemberInfo.cpp +++ b/src/animator/SkMemberInfo.cpp diff --git a/libsgl/animator/SkMemberInfo.h b/src/animator/SkMemberInfo.h index e45994e..e45994e 100644 --- a/libsgl/animator/SkMemberInfo.h +++ b/src/animator/SkMemberInfo.h diff --git a/libsgl/animator/SkOpArray.cpp b/src/animator/SkOpArray.cpp index eb3fcec..eb3fcec 100644 --- a/libsgl/animator/SkOpArray.cpp +++ b/src/animator/SkOpArray.cpp diff --git a/libsgl/animator/SkOpArray.h b/src/animator/SkOpArray.h index 5c511c0..5c511c0 100644 --- a/libsgl/animator/SkOpArray.h +++ b/src/animator/SkOpArray.h diff --git a/libsgl/animator/SkOperand.h b/src/animator/SkOperand.h index 2c7e93b..2c7e93b 100644 --- a/libsgl/animator/SkOperand.h +++ b/src/animator/SkOperand.h diff --git a/libsgl/animator/SkOperand2.h b/src/animator/SkOperand2.h index f482e66..f482e66 100644 --- a/libsgl/animator/SkOperand2.h +++ b/src/animator/SkOperand2.h diff --git a/libsgl/animator/SkOperandInterpolator.h b/src/animator/SkOperandInterpolator.h index f155276..f155276 100644 --- a/libsgl/animator/SkOperandInterpolator.h +++ b/src/animator/SkOperandInterpolator.h diff --git a/libsgl/animator/SkOperandIterpolator.cpp b/src/animator/SkOperandIterpolator.cpp index 2bddd34..2bddd34 100644 --- a/libsgl/animator/SkOperandIterpolator.cpp +++ b/src/animator/SkOperandIterpolator.cpp diff --git a/libsgl/animator/SkPaintParts.cpp b/src/animator/SkPaintParts.cpp index 48799c6..48799c6 100644 --- a/libsgl/animator/SkPaintParts.cpp +++ b/src/animator/SkPaintParts.cpp diff --git a/libsgl/animator/SkPaintParts.h b/src/animator/SkPaintParts.h index a8bb8bd..a8bb8bd 100644 --- a/libsgl/animator/SkPaintParts.h +++ b/src/animator/SkPaintParts.h diff --git a/libsgl/animator/SkSVGPath.cpp b/src/animator/SkParseSVGPath.cpp index 86eeee8..86eeee8 100644 --- a/libsgl/animator/SkSVGPath.cpp +++ b/src/animator/SkParseSVGPath.cpp diff --git a/libsgl/animator/SkPathParts.cpp b/src/animator/SkPathParts.cpp index 46d2232..46d2232 100644 --- a/libsgl/animator/SkPathParts.cpp +++ b/src/animator/SkPathParts.cpp diff --git a/libsgl/animator/SkPathParts.h b/src/animator/SkPathParts.h index 72e4185..72e4185 100644 --- a/libsgl/animator/SkPathParts.h +++ b/src/animator/SkPathParts.h diff --git a/libsgl/animator/SkPostParts.cpp b/src/animator/SkPostParts.cpp index 254b17d..254b17d 100644 --- a/libsgl/animator/SkPostParts.cpp +++ b/src/animator/SkPostParts.cpp diff --git a/libsgl/animator/SkPostParts.h b/src/animator/SkPostParts.h index ef41fe5..ef41fe5 100644 --- a/libsgl/animator/SkPostParts.h +++ b/src/animator/SkPostParts.h diff --git a/libsgl/animator/SkScript.cpp b/src/animator/SkScript.cpp index 3b67d7b..3b67d7b 100644 --- a/libsgl/animator/SkScript.cpp +++ b/src/animator/SkScript.cpp diff --git a/libsgl/animator/SkScript.h b/src/animator/SkScript.h index bb7d978..bb7d978 100644 --- a/libsgl/animator/SkScript.h +++ b/src/animator/SkScript.h diff --git a/libsgl/animator/SkScript2.h b/src/animator/SkScript2.h index 4d8bd8c..4d8bd8c 100644 --- a/libsgl/animator/SkScript2.h +++ b/src/animator/SkScript2.h diff --git a/libsgl/animator/SkScriptCallBack.h b/src/animator/SkScriptCallBack.h index 725e493..725e493 100644 --- a/libsgl/animator/SkScriptCallBack.h +++ b/src/animator/SkScriptCallBack.h diff --git a/libsgl/animator/SkScriptDecompile.cpp b/src/animator/SkScriptDecompile.cpp index d582d33..d582d33 100644 --- a/libsgl/animator/SkScriptDecompile.cpp +++ b/src/animator/SkScriptDecompile.cpp diff --git a/libsgl/animator/SkScriptRuntime.cpp b/src/animator/SkScriptRuntime.cpp index 6d8c208..6d8c208 100644 --- a/libsgl/animator/SkScriptRuntime.cpp +++ b/src/animator/SkScriptRuntime.cpp diff --git a/libsgl/animator/SkScriptRuntime.h b/src/animator/SkScriptRuntime.h index c864fe4..c864fe4 100644 --- a/libsgl/animator/SkScriptRuntime.h +++ b/src/animator/SkScriptRuntime.h diff --git a/libsgl/animator/SkScriptTokenizer.cpp b/src/animator/SkScriptTokenizer.cpp index d75e68e..d75e68e 100644 --- a/libsgl/animator/SkScriptTokenizer.cpp +++ b/src/animator/SkScriptTokenizer.cpp diff --git a/libsgl/animator/SkSnapshot.cpp b/src/animator/SkSnapshot.cpp index b65c517..0043ca5 100644 --- a/libsgl/animator/SkSnapshot.cpp +++ b/src/animator/SkSnapshot.cpp @@ -17,8 +17,6 @@ #include "SkTypes.h" -#ifdef SK_SUPPORT_IMAGE_ENCODE - #include "SkSnapshot.h" #include "SkAnimateMaker.h" #include "SkCanvas.h" @@ -71,4 +69,3 @@ bool SkSnapshot::draw(SkAnimateMaker& maker) { return false; } -#endif diff --git a/libsgl/animator/SkSnapshot.h b/src/animator/SkSnapshot.h index c459fbb..7392edc 100644 --- a/libsgl/animator/SkSnapshot.h +++ b/src/animator/SkSnapshot.h @@ -18,8 +18,6 @@ #ifndef SkSnapShot_DEFINED #define SkSnapShot_DEFINED -#ifdef SK_SUPPORT_IMAGE_ENCODE - #include "SkDrawable.h" #include "SkImageDecoder.h" #include "SkMemberInfo.h" @@ -37,6 +35,5 @@ class SkSnapshot: public SkDrawable { int fSeqVal; }; -#endif // SK_SUPPORT_IMAGE_ENCODE #endif // SkSnapShot_DEFINED diff --git a/libsgl/animator/SkTDArray_Experimental.h b/src/animator/SkTDArray_Experimental.h index 94d7871..94d7871 100644 --- a/libsgl/animator/SkTDArray_Experimental.h +++ b/src/animator/SkTDArray_Experimental.h diff --git a/libsgl/animator/SkTextOnPath.cpp b/src/animator/SkTextOnPath.cpp index 1a06746..1a06746 100644 --- a/libsgl/animator/SkTextOnPath.cpp +++ b/src/animator/SkTextOnPath.cpp diff --git a/libsgl/animator/SkTextOnPath.h b/src/animator/SkTextOnPath.h index 3c78b5b..3c78b5b 100644 --- a/libsgl/animator/SkTextOnPath.h +++ b/src/animator/SkTextOnPath.h diff --git a/libsgl/animator/SkTextToPath.cpp b/src/animator/SkTextToPath.cpp index 44036a3..44036a3 100644 --- a/libsgl/animator/SkTextToPath.cpp +++ b/src/animator/SkTextToPath.cpp diff --git a/libsgl/animator/SkTextToPath.h b/src/animator/SkTextToPath.h index 6d93239..6d93239 100644 --- a/libsgl/animator/SkTextToPath.h +++ b/src/animator/SkTextToPath.h diff --git a/libsgl/animator/SkTime.cpp b/src/animator/SkTime.cpp index a36a95a..a36a95a 100644 --- a/libsgl/animator/SkTime.cpp +++ b/src/animator/SkTime.cpp diff --git a/libsgl/animator/SkTypedArray.cpp b/src/animator/SkTypedArray.cpp index 075c607..075c607 100644 --- a/libsgl/animator/SkTypedArray.cpp +++ b/src/animator/SkTypedArray.cpp diff --git a/libsgl/animator/SkTypedArray.h b/src/animator/SkTypedArray.h index a658f29..a658f29 100644 --- a/libsgl/animator/SkTypedArray.h +++ b/src/animator/SkTypedArray.h diff --git a/libsgl/animator/SkXMLAnimatorWriter.cpp b/src/animator/SkXMLAnimatorWriter.cpp index b26bc73..b26bc73 100644 --- a/libsgl/animator/SkXMLAnimatorWriter.cpp +++ b/src/animator/SkXMLAnimatorWriter.cpp diff --git a/libsgl/animator/SkXMLAnimatorWriter.h b/src/animator/SkXMLAnimatorWriter.h index c5830cd..c5830cd 100644 --- a/libsgl/animator/SkXMLAnimatorWriter.h +++ b/src/animator/SkXMLAnimatorWriter.h diff --git a/libsgl/sgl/ARGB32_Clamp_Bilinear_BitmapShader.h b/src/core/ARGB32_Clamp_Bilinear_BitmapShader.h index c7e23af..c7e23af 100644 --- a/libsgl/sgl/ARGB32_Clamp_Bilinear_BitmapShader.h +++ b/src/core/ARGB32_Clamp_Bilinear_BitmapShader.h diff --git a/libcorecg/Sk64.cpp b/src/core/Sk64.cpp index 6013bd7..6013bd7 100644 --- a/libcorecg/Sk64.cpp +++ b/src/core/Sk64.cpp diff --git a/libsgl/sgl/SkAlphaRuns.cpp b/src/core/SkAlphaRuns.cpp index 46b0206..46b0206 100644 --- a/libsgl/sgl/SkAlphaRuns.cpp +++ b/src/core/SkAlphaRuns.cpp diff --git a/libsgl/sgl/SkAntiRun.h b/src/core/SkAntiRun.h index 12930e6..12930e6 100644 --- a/libsgl/sgl/SkAntiRun.h +++ b/src/core/SkAntiRun.h diff --git a/libsgl/sgl/SkBitmap.cpp b/src/core/SkBitmap.cpp index 5ca3601..5ca3601 100644 --- a/libsgl/sgl/SkBitmap.cpp +++ b/src/core/SkBitmap.cpp diff --git a/libsgl/sgl/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp index 6d7d581..6d7d581 100644 --- a/libsgl/sgl/SkBitmapProcShader.cpp +++ b/src/core/SkBitmapProcShader.cpp diff --git a/libsgl/sgl/SkBitmapProcShader.h b/src/core/SkBitmapProcShader.h index 09d53af..09d53af 100644 --- a/libsgl/sgl/SkBitmapProcShader.h +++ b/src/core/SkBitmapProcShader.h diff --git a/libsgl/sgl/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp index 428921d..428921d 100644 --- a/libsgl/sgl/SkBitmapProcState.cpp +++ b/src/core/SkBitmapProcState.cpp diff --git a/libsgl/sgl/SkBitmapProcState.h b/src/core/SkBitmapProcState.h index 1366d3b..1366d3b 100644 --- a/libsgl/sgl/SkBitmapProcState.h +++ b/src/core/SkBitmapProcState.h diff --git a/libsgl/sgl/SkBitmapProcState_matrix.h b/src/core/SkBitmapProcState_matrix.h index f54f8b1..f54f8b1 100644 --- a/libsgl/sgl/SkBitmapProcState_matrix.h +++ b/src/core/SkBitmapProcState_matrix.h diff --git a/libsgl/sgl/SkBitmapProcState_matrixProcs.cpp b/src/core/SkBitmapProcState_matrixProcs.cpp index beb21c8..beb21c8 100644 --- a/libsgl/sgl/SkBitmapProcState_matrixProcs.cpp +++ b/src/core/SkBitmapProcState_matrixProcs.cpp diff --git a/libsgl/sgl/SkBitmapProcState_sample.h b/src/core/SkBitmapProcState_sample.h index 122ccf8..122ccf8 100644 --- a/libsgl/sgl/SkBitmapProcState_sample.h +++ b/src/core/SkBitmapProcState_sample.h diff --git a/libsgl/sgl/SkBitmapSampler.cpp b/src/core/SkBitmapSampler.cpp index 045efd1..045efd1 100644 --- a/libsgl/sgl/SkBitmapSampler.cpp +++ b/src/core/SkBitmapSampler.cpp diff --git a/libsgl/sgl/SkBitmapSampler.h b/src/core/SkBitmapSampler.h index eeef3b3..eeef3b3 100644 --- a/libsgl/sgl/SkBitmapSampler.h +++ b/src/core/SkBitmapSampler.h diff --git a/libsgl/sgl/SkBitmapSamplerTemplate.h b/src/core/SkBitmapSamplerTemplate.h index 00df10c..00df10c 100644 --- a/libsgl/sgl/SkBitmapSamplerTemplate.h +++ b/src/core/SkBitmapSamplerTemplate.h diff --git a/libsgl/sgl/SkBitmapShader.cpp b/src/core/SkBitmapShader.cpp index 5d70dd3..5d70dd3 100644 --- a/libsgl/sgl/SkBitmapShader.cpp +++ b/src/core/SkBitmapShader.cpp diff --git a/libsgl/sgl/SkBitmapShader.h b/src/core/SkBitmapShader.h index 8d40a4b..8d40a4b 100644 --- a/libsgl/sgl/SkBitmapShader.h +++ b/src/core/SkBitmapShader.h diff --git a/libsgl/sgl/SkBitmapShader16BilerpTemplate.h b/src/core/SkBitmapShader16BilerpTemplate.h index b70801e..b70801e 100644 --- a/libsgl/sgl/SkBitmapShader16BilerpTemplate.h +++ b/src/core/SkBitmapShader16BilerpTemplate.h diff --git a/libsgl/sgl/SkBitmapShaderTemplate.h b/src/core/SkBitmapShaderTemplate.h index 0174138..0174138 100644 --- a/libsgl/sgl/SkBitmapShaderTemplate.h +++ b/src/core/SkBitmapShaderTemplate.h diff --git a/libsgl/sgl/SkBitmap_scroll.cpp b/src/core/SkBitmap_scroll.cpp index f9f197d..f9f197d 100644 --- a/libsgl/sgl/SkBitmap_scroll.cpp +++ b/src/core/SkBitmap_scroll.cpp diff --git a/libsgl/sgl/SkBlitBWMaskTemplate.h b/src/core/SkBlitBWMaskTemplate.h index e433d36..e433d36 100644 --- a/libsgl/sgl/SkBlitBWMaskTemplate.h +++ b/src/core/SkBlitBWMaskTemplate.h diff --git a/libsgl/sgl/SkBlitRow.h b/src/core/SkBlitRow.h index bb6a29b..bb6a29b 100644 --- a/libsgl/sgl/SkBlitRow.h +++ b/src/core/SkBlitRow.h diff --git a/libsgl/sgl/SkBlitRow_D16.cpp b/src/core/SkBlitRow_D16.cpp index f40df36..f40df36 100644 --- a/libsgl/sgl/SkBlitRow_D16.cpp +++ b/src/core/SkBlitRow_D16.cpp diff --git a/libsgl/sgl/SkBlitRow_D4444.cpp b/src/core/SkBlitRow_D4444.cpp index e60c721..e60c721 100644 --- a/libsgl/sgl/SkBlitRow_D4444.cpp +++ b/src/core/SkBlitRow_D4444.cpp diff --git a/libsgl/sgl/SkBlitter.cpp b/src/core/SkBlitter.cpp index 9208429..9208429 100644 --- a/libsgl/sgl/SkBlitter.cpp +++ b/src/core/SkBlitter.cpp diff --git a/libsgl/sgl/SkBlitter_4444.cpp b/src/core/SkBlitter_4444.cpp index cce94c5..cce94c5 100644 --- a/libsgl/sgl/SkBlitter_4444.cpp +++ b/src/core/SkBlitter_4444.cpp diff --git a/libsgl/sgl/SkBlitter_A1.cpp b/src/core/SkBlitter_A1.cpp index 1a91a26..1a91a26 100644 --- a/libsgl/sgl/SkBlitter_A1.cpp +++ b/src/core/SkBlitter_A1.cpp diff --git a/libsgl/sgl/SkBlitter_A8.cpp b/src/core/SkBlitter_A8.cpp index 18b0881..18b0881 100644 --- a/libsgl/sgl/SkBlitter_A8.cpp +++ b/src/core/SkBlitter_A8.cpp diff --git a/libsgl/sgl/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp index ed2fc0e..ed2fc0e 100644 --- a/libsgl/sgl/SkBlitter_ARGB32.cpp +++ b/src/core/SkBlitter_ARGB32.cpp diff --git a/libsgl/sgl/SkBlitter_RGB16.cpp b/src/core/SkBlitter_RGB16.cpp index b253662..b253662 100644 --- a/libsgl/sgl/SkBlitter_RGB16.cpp +++ b/src/core/SkBlitter_RGB16.cpp diff --git a/libsgl/sgl/SkBlitter_Sprite.cpp b/src/core/SkBlitter_Sprite.cpp index f0da166..f0da166 100644 --- a/libsgl/sgl/SkBlitter_Sprite.cpp +++ b/src/core/SkBlitter_Sprite.cpp diff --git a/libcorecg/SkBuffer.cpp b/src/core/SkBuffer.cpp index 5768ca4..5768ca4 100644 --- a/libcorecg/SkBuffer.cpp +++ b/src/core/SkBuffer.cpp diff --git a/libsgl/sgl/SkCanvas.cpp b/src/core/SkCanvas.cpp index 4088416..4088416 100644 --- a/libsgl/sgl/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp diff --git a/libcorecg/SkChunkAlloc.cpp b/src/core/SkChunkAlloc.cpp index ae37ec0..ae37ec0 100644 --- a/libcorecg/SkChunkAlloc.cpp +++ b/src/core/SkChunkAlloc.cpp diff --git a/libsgl/sgl/SkColor.cpp b/src/core/SkColor.cpp index 4256179..4256179 100644 --- a/libsgl/sgl/SkColor.cpp +++ b/src/core/SkColor.cpp diff --git a/libsgl/sgl/SkColorFilter.cpp b/src/core/SkColorFilter.cpp index bb4be48..bb4be48 100644 --- a/libsgl/sgl/SkColorFilter.cpp +++ b/src/core/SkColorFilter.cpp diff --git a/libsgl/sgl/SkColorTable.cpp b/src/core/SkColorTable.cpp index f991da3..f991da3 100644 --- a/libsgl/sgl/SkColorTable.cpp +++ b/src/core/SkColorTable.cpp diff --git a/libsgl/effects/SkShaderExtras.cpp b/src/core/SkComposeShader.cpp index 84a1647..1e5e202 100644 --- a/libsgl/effects/SkShaderExtras.cpp +++ b/src/core/SkComposeShader.cpp @@ -15,7 +15,7 @@ ** limitations under the License. */ -#include "SkShaderExtras.h" +#include "SkComposeShader.h" #include "SkColorFilter.h" #include "SkColorPriv.h" #include "SkXfermode.h" diff --git a/libcorecg/SkCordic.cpp b/src/core/SkCordic.cpp index 539bc9b..539bc9b 100644 --- a/libcorecg/SkCordic.cpp +++ b/src/core/SkCordic.cpp diff --git a/libcorecg/SkCordic.h b/src/core/SkCordic.h index 9f45a81..9f45a81 100644 --- a/libcorecg/SkCordic.h +++ b/src/core/SkCordic.h diff --git a/libsgl/sgl/SkCoreBlitters.h b/src/core/SkCoreBlitters.h index 5b3497e..5b3497e 100644 --- a/libsgl/sgl/SkCoreBlitters.h +++ b/src/core/SkCoreBlitters.h diff --git a/libcorecg/SkDebug.cpp b/src/core/SkDebug.cpp index 64ea8b4..64ea8b4 100644 --- a/libcorecg/SkDebug.cpp +++ b/src/core/SkDebug.cpp diff --git a/libcorecg/SkDebug_stdio.cpp b/src/core/SkDebug_stdio.cpp index c8a0d81..c8a0d81 100644 --- a/libcorecg/SkDebug_stdio.cpp +++ b/src/core/SkDebug_stdio.cpp diff --git a/libsgl/sgl/SkDeque.cpp b/src/core/SkDeque.cpp index 4f15051..4f15051 100644 --- a/libsgl/sgl/SkDeque.cpp +++ b/src/core/SkDeque.cpp diff --git a/libsgl/sgl/SkDevice.cpp b/src/core/SkDevice.cpp index 139174d..139174d 100644 --- a/libsgl/sgl/SkDevice.cpp +++ b/src/core/SkDevice.cpp diff --git a/libsgl/sgl/SkDither.cpp b/src/core/SkDither.cpp index 53a8573..53a8573 100644 --- a/libsgl/sgl/SkDither.cpp +++ b/src/core/SkDither.cpp diff --git a/libsgl/sgl/SkDraw.cpp b/src/core/SkDraw.cpp index 2f0ddff..d59b813 100644 --- a/libsgl/sgl/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -1989,7 +1989,7 @@ bool SkTriColorShader::setup(const SkPoint pts[], const SkColor colors[], #include "SkColorPriv.h" #include "SkPorterDuff.h" -#include "SkShaderExtras.h" +#include "SkComposeShader.h" #include "SkXfermode.h" static int ScalarTo256(SkScalar v) { diff --git a/libsgl/sgl/SkDrawProcs.h b/src/core/SkDrawProcs.h index d64c088..d64c088 100644 --- a/libsgl/sgl/SkDrawProcs.h +++ b/src/core/SkDrawProcs.h diff --git a/libsgl/sgl/SkEdge.cpp b/src/core/SkEdge.cpp index 6efe1ba..6efe1ba 100644 --- a/libsgl/sgl/SkEdge.cpp +++ b/src/core/SkEdge.cpp diff --git a/libsgl/sgl/SkEdge.h b/src/core/SkEdge.h index 5b0cc75..5b0cc75 100644 --- a/libsgl/sgl/SkEdge.h +++ b/src/core/SkEdge.h diff --git a/libsgl/sgl/SkFP.h b/src/core/SkFP.h index 6c0c526..6c0c526 100644 --- a/libsgl/sgl/SkFP.h +++ b/src/core/SkFP.h diff --git a/libsgl/sgl/SkFilterProc.cpp b/src/core/SkFilterProc.cpp index 814bafe..814bafe 100644 --- a/libsgl/sgl/SkFilterProc.cpp +++ b/src/core/SkFilterProc.cpp diff --git a/libsgl/sgl/SkFilterProc.h b/src/core/SkFilterProc.h index 9af4ed5..9af4ed5 100644 --- a/libsgl/sgl/SkFilterProc.h +++ b/src/core/SkFilterProc.h diff --git a/libsgl/sgl/SkFlattenable.cpp b/src/core/SkFlattenable.cpp index 3558519..3558519 100644 --- a/libsgl/sgl/SkFlattenable.cpp +++ b/src/core/SkFlattenable.cpp diff --git a/libcorecg/SkFloat.cpp b/src/core/SkFloat.cpp index 504c1d3..504c1d3 100644 --- a/libcorecg/SkFloat.cpp +++ b/src/core/SkFloat.cpp diff --git a/libcorecg/SkFloat.h b/src/core/SkFloat.h index 31aaeed..31aaeed 100644 --- a/libcorecg/SkFloat.h +++ b/src/core/SkFloat.h diff --git a/libcorecg/SkFloatBits.cpp b/src/core/SkFloatBits.cpp index 1f15df2..1f15df2 100644 --- a/libcorecg/SkFloatBits.cpp +++ b/src/core/SkFloatBits.cpp diff --git a/libsgl/sgl/SkGeometry.cpp b/src/core/SkGeometry.cpp index 4f22e92..4f22e92 100644 --- a/libsgl/sgl/SkGeometry.cpp +++ b/src/core/SkGeometry.cpp diff --git a/libsgl/sgl/SkGlobals.cpp b/src/core/SkGlobals.cpp index bc72b97..bc72b97 100644 --- a/libsgl/sgl/SkGlobals.cpp +++ b/src/core/SkGlobals.cpp diff --git a/libsgl/sgl/SkGlyphCache.cpp b/src/core/SkGlyphCache.cpp index 6b214df..6b214df 100644 --- a/libsgl/sgl/SkGlyphCache.cpp +++ b/src/core/SkGlyphCache.cpp diff --git a/libsgl/sgl/SkGlyphCache.h b/src/core/SkGlyphCache.h index 2462ea5..2462ea5 100644 --- a/libsgl/sgl/SkGlyphCache.h +++ b/src/core/SkGlyphCache.h diff --git a/libsgl/sgl/SkGraphics.cpp b/src/core/SkGraphics.cpp index ed9ab02..64fbab9 100644 --- a/libsgl/sgl/SkGraphics.cpp +++ b/src/core/SkGraphics.cpp @@ -20,7 +20,6 @@ #include "Sk64.h" #include "SkBlitter.h" #include "SkCanvas.h" -#include "SkDOM.h" #include "SkFloat.h" #include "SkGeometry.h" #include "SkGlobals.h" @@ -510,7 +509,6 @@ void SkGraphics::Init(bool runUnitTests) //////////////////////////////////////////////////////////////////////////// #include "SkGlyphCache.h" -#include "SkImageDecoder.h" void SkGraphics::Term() { SkGraphics::SetFontCacheUsed(0); diff --git a/libsgl/images/SkMMapStream.cpp b/src/core/SkMMapStream.cpp index 2aee945..2aee945 100644 --- a/libsgl/images/SkMMapStream.cpp +++ b/src/core/SkMMapStream.cpp diff --git a/libsgl/sgl/SkMask.cpp b/src/core/SkMask.cpp index b237639..b237639 100644 --- a/libsgl/sgl/SkMask.cpp +++ b/src/core/SkMask.cpp diff --git a/libsgl/sgl/SkMaskFilter.cpp b/src/core/SkMaskFilter.cpp index 56fff97..56fff97 100644 --- a/libsgl/sgl/SkMaskFilter.cpp +++ b/src/core/SkMaskFilter.cpp diff --git a/libcorecg/SkMath.cpp b/src/core/SkMath.cpp index c627d9b..c627d9b 100644 --- a/libcorecg/SkMath.cpp +++ b/src/core/SkMath.cpp diff --git a/libcorecg/SkMatrix.cpp b/src/core/SkMatrix.cpp index 893aea1..893aea1 100644 --- a/libcorecg/SkMatrix.cpp +++ b/src/core/SkMatrix.cpp diff --git a/libcorecg/SkMemory_stdlib.cpp b/src/core/SkMemory_stdlib.cpp index befcda6..f1ac36b 100644 --- a/libcorecg/SkMemory_stdlib.cpp +++ b/src/core/SkMemory_stdlib.cpp @@ -37,7 +37,14 @@ static const char kBlockTrailerTag[] = { 'a', 'i', 'k', 's' }; #define kByteFill 0xCD #define kDeleteFill 0xEF -static SkMutex gBlockMutex; +static SkMutex& get_block_mutex() { + static SkMutex* gBlockMutex; + if (NULL == gBlockMutex) { + gBlockMutex = new SkMutex; + } + return *gBlockMutex; +} + static struct SkBlockHeader* gHeader; struct SkBlockHeader { @@ -53,7 +60,7 @@ struct SkBlockHeader { void* add(size_t realSize) { - SkAutoMutexAcquire ac(gBlockMutex); + SkAutoMutexAcquire ac(get_block_mutex()); InMutexValidate(); fNext = gHeader; #ifdef SK_CHECK_TAGS @@ -73,7 +80,7 @@ struct SkBlockHeader { static void Dump() { - SkAutoMutexAcquire ac(gBlockMutex); + SkAutoMutexAcquire ac(get_block_mutex()); InMutexValidate(); SkBlockHeader* header = gHeader; int count = 0; @@ -113,7 +120,7 @@ struct SkBlockHeader { void remove() const { - SkAutoMutexAcquire ac(gBlockMutex); + SkAutoMutexAcquire ac(get_block_mutex()); SkBlockHeader** findPtr = &gHeader; do { SkBlockHeader* find = *findPtr; @@ -132,7 +139,7 @@ struct SkBlockHeader { static void Validate() { - SkAutoMutexAcquire ac(gBlockMutex); + SkAutoMutexAcquire ac(get_block_mutex()); InMutexValidate(); } diff --git a/libsgl/sgl/SkPackBits.cpp b/src/core/SkPackBits.cpp index 3e92841..3e92841 100644 --- a/libsgl/sgl/SkPackBits.cpp +++ b/src/core/SkPackBits.cpp diff --git a/libsgl/sgl/SkPaint.cpp b/src/core/SkPaint.cpp index bb6b31e..bb6b31e 100644 --- a/libsgl/sgl/SkPaint.cpp +++ b/src/core/SkPaint.cpp diff --git a/libsgl/sgl/SkPath.cpp b/src/core/SkPath.cpp index 82eb980..82eb980 100644 --- a/libsgl/sgl/SkPath.cpp +++ b/src/core/SkPath.cpp diff --git a/libsgl/sgl/SkPathEffect.cpp b/src/core/SkPathEffect.cpp index 2905895..2905895 100644 --- a/libsgl/sgl/SkPathEffect.cpp +++ b/src/core/SkPathEffect.cpp diff --git a/libsgl/picture/SkPathHeap.cpp b/src/core/SkPathHeap.cpp index f6dae5d..f6dae5d 100644 --- a/libsgl/picture/SkPathHeap.cpp +++ b/src/core/SkPathHeap.cpp diff --git a/libsgl/picture/SkPathHeap.h b/src/core/SkPathHeap.h index b8f3bd3..b8f3bd3 100644 --- a/libsgl/picture/SkPathHeap.h +++ b/src/core/SkPathHeap.h diff --git a/libsgl/sgl/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp index ec1510d..ec1510d 100644 --- a/libsgl/sgl/SkPathMeasure.cpp +++ b/src/core/SkPathMeasure.cpp diff --git a/libsgl/picture/SkPicture.cpp b/src/core/SkPicture.cpp index 07cb0a6..07cb0a6 100644 --- a/libsgl/picture/SkPicture.cpp +++ b/src/core/SkPicture.cpp diff --git a/libsgl/picture/SkPictureFlat.cpp b/src/core/SkPictureFlat.cpp index e221e55..e221e55 100644 --- a/libsgl/picture/SkPictureFlat.cpp +++ b/src/core/SkPictureFlat.cpp diff --git a/libsgl/picture/SkPictureFlat.h b/src/core/SkPictureFlat.h index 9e7fc5e..fe9477d 100644 --- a/libsgl/picture/SkPictureFlat.h +++ b/src/core/SkPictureFlat.h @@ -36,6 +36,7 @@ enum DrawType { SAVE, SAVE_LAYER, SCALE, + SET_MATRIX, SKEW, TRANSLATE }; diff --git a/libsgl/picture/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp index 64f8f1c..da17c32 100644 --- a/libsgl/picture/SkPicturePlayback.cpp +++ b/src/core/SkPicturePlayback.cpp @@ -653,6 +653,9 @@ void SkPicturePlayback::draw(SkCanvas& canvas) { SkScalar sy = getScalar(); canvas.scale(sx, sy); } break; + case SET_MATRIX: + canvas.setMatrix(*getMatrix()); + break; case SKEW: { SkScalar sx = getScalar(); SkScalar sy = getScalar(); diff --git a/libsgl/picture/SkPicturePlayback.h b/src/core/SkPicturePlayback.h index b4e69ca..b4e69ca 100644 --- a/libsgl/picture/SkPicturePlayback.h +++ b/src/core/SkPicturePlayback.h diff --git a/libsgl/picture/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp index 6e7c645..4f236d6 100644 --- a/libsgl/picture/SkPictureRecord.cpp +++ b/src/core/SkPictureRecord.cpp @@ -105,6 +105,14 @@ bool SkPictureRecord::concat(const SkMatrix& matrix) { return this->INHERITED::concat(matrix); } +void SkPictureRecord::setMatrix(const SkMatrix& matrix) { + validate(); + addDraw(SET_MATRIX); + addMatrix(matrix); + validate(); + this->INHERITED::setMatrix(matrix); +} + bool SkPictureRecord::clipRect(const SkRect& rect, SkRegion::Op op) { addDraw(CLIP_RECT); addRect(rect); diff --git a/libsgl/picture/SkPictureRecord.h b/src/core/SkPictureRecord.h index d25d23a..b23c747 100644 --- a/libsgl/picture/SkPictureRecord.h +++ b/src/core/SkPictureRecord.h @@ -23,6 +23,7 @@ public: virtual bool rotate(SkScalar degrees); virtual bool skew(SkScalar sx, SkScalar sy); virtual bool concat(const SkMatrix& matrix); + virtual void setMatrix(const SkMatrix& matrix); virtual bool clipRect(const SkRect& rect, SkRegion::Op op); virtual bool clipPath(const SkPath& path, SkRegion::Op op); virtual bool clipRegion(const SkRegion& region, SkRegion::Op op); diff --git a/libsgl/sgl/SkPixelRef.cpp b/src/core/SkPixelRef.cpp index adfc3c0..adfc3c0 100644 --- a/libsgl/sgl/SkPixelRef.cpp +++ b/src/core/SkPixelRef.cpp diff --git a/libcorecg/SkPoint.cpp b/src/core/SkPoint.cpp index 704c2ba..704c2ba 100644 --- a/libcorecg/SkPoint.cpp +++ b/src/core/SkPoint.cpp diff --git a/libsgl/sgl/SkProcSpriteBlitter.cpp b/src/core/SkProcSpriteBlitter.cpp index f727581..f727581 100644 --- a/libsgl/sgl/SkProcSpriteBlitter.cpp +++ b/src/core/SkProcSpriteBlitter.cpp diff --git a/libsgl/sgl/SkPtrRecorder.cpp b/src/core/SkPtrRecorder.cpp index 4f774ec..4f774ec 100644 --- a/libsgl/sgl/SkPtrRecorder.cpp +++ b/src/core/SkPtrRecorder.cpp diff --git a/libsgl/sgl/SkRasterizer.cpp b/src/core/SkRasterizer.cpp index f1d087d..f1d087d 100644 --- a/libsgl/sgl/SkRasterizer.cpp +++ b/src/core/SkRasterizer.cpp diff --git a/libcorecg/SkRect.cpp b/src/core/SkRect.cpp index d602754..d602754 100644 --- a/libcorecg/SkRect.cpp +++ b/src/core/SkRect.cpp diff --git a/libsgl/sgl/SkRefCnt.cpp b/src/core/SkRefCnt.cpp index fea1005..fea1005 100644 --- a/libsgl/sgl/SkRefCnt.cpp +++ b/src/core/SkRefCnt.cpp diff --git a/libcorecg/SkRegion.cpp b/src/core/SkRegion.cpp index b48f3bb..b48f3bb 100644 --- a/libcorecg/SkRegion.cpp +++ b/src/core/SkRegion.cpp diff --git a/libcorecg/SkRegionPriv.h b/src/core/SkRegionPriv.h index 70f8828..70f8828 100644 --- a/libcorecg/SkRegionPriv.h +++ b/src/core/SkRegionPriv.h diff --git a/libsgl/sgl/SkRegion_path.cpp b/src/core/SkRegion_path.cpp index d00baf9..d00baf9 100644 --- a/libsgl/sgl/SkRegion_path.cpp +++ b/src/core/SkRegion_path.cpp diff --git a/libsgl/sgl/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index 854c4de..854c4de 100644 --- a/libsgl/sgl/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp diff --git a/libsgl/sgl/SkScan.cpp b/src/core/SkScan.cpp index 013b0ea..013b0ea 100644 --- a/libsgl/sgl/SkScan.cpp +++ b/src/core/SkScan.cpp diff --git a/libsgl/sgl/SkScanPriv.h b/src/core/SkScanPriv.h index 43dfdef..43dfdef 100644 --- a/libsgl/sgl/SkScanPriv.h +++ b/src/core/SkScanPriv.h diff --git a/libsgl/sgl/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp index 9cdeeaa..9cdeeaa 100644 --- a/libsgl/sgl/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp diff --git a/libsgl/sgl/SkScan_Antihair.cpp b/src/core/SkScan_Antihair.cpp index 04e4690..04e4690 100644 --- a/libsgl/sgl/SkScan_Antihair.cpp +++ b/src/core/SkScan_Antihair.cpp diff --git a/libsgl/sgl/SkScan_Hairline.cpp b/src/core/SkScan_Hairline.cpp index 6a66754..6a66754 100644 --- a/libsgl/sgl/SkScan_Hairline.cpp +++ b/src/core/SkScan_Hairline.cpp diff --git a/libsgl/sgl/SkScan_Path.cpp b/src/core/SkScan_Path.cpp index 8b58991..8b58991 100644 --- a/libsgl/sgl/SkScan_Path.cpp +++ b/src/core/SkScan_Path.cpp diff --git a/libsgl/sgl/SkShader.cpp b/src/core/SkShader.cpp index dd9c859..dd9c859 100644 --- a/libsgl/sgl/SkShader.cpp +++ b/src/core/SkShader.cpp diff --git a/libcorecg/SkSinTable.h b/src/core/SkSinTable.h index 9b4477d..9b4477d 100644 --- a/libcorecg/SkSinTable.h +++ b/src/core/SkSinTable.h diff --git a/libsgl/sgl/SkSpriteBlitter.h b/src/core/SkSpriteBlitter.h index 9f7764d..9f7764d 100644 --- a/libsgl/sgl/SkSpriteBlitter.h +++ b/src/core/SkSpriteBlitter.h diff --git a/libsgl/sgl/SkSpriteBlitterTemplate.h b/src/core/SkSpriteBlitterTemplate.h index 2ab2b3a..2ab2b3a 100644 --- a/libsgl/sgl/SkSpriteBlitterTemplate.h +++ b/src/core/SkSpriteBlitterTemplate.h diff --git a/libsgl/sgl/SkSpriteBlitter_ARGB32.cpp b/src/core/SkSpriteBlitter_ARGB32.cpp index 6addde7..6addde7 100644 --- a/libsgl/sgl/SkSpriteBlitter_ARGB32.cpp +++ b/src/core/SkSpriteBlitter_ARGB32.cpp diff --git a/libsgl/sgl/SkSpriteBlitter_RGB16.cpp b/src/core/SkSpriteBlitter_RGB16.cpp index a158637..a158637 100644 --- a/libsgl/sgl/SkSpriteBlitter_RGB16.cpp +++ b/src/core/SkSpriteBlitter_RGB16.cpp diff --git a/libsgl/images/SkStream.cpp b/src/core/SkStream.cpp index b199a1b..b199a1b 100644 --- a/libsgl/images/SkStream.cpp +++ b/src/core/SkStream.cpp diff --git a/libcorecg/SkString.cpp b/src/core/SkString.cpp index 2e5d946..2e5d946 100644 --- a/libcorecg/SkString.cpp +++ b/src/core/SkString.cpp diff --git a/libsgl/sgl/SkStroke.cpp b/src/core/SkStroke.cpp index 86dff48..86dff48 100644 --- a/libsgl/sgl/SkStroke.cpp +++ b/src/core/SkStroke.cpp diff --git a/libsgl/sgl/SkStrokerPriv.cpp b/src/core/SkStrokerPriv.cpp index 07833ca..07833ca 100644 --- a/libsgl/sgl/SkStrokerPriv.cpp +++ b/src/core/SkStrokerPriv.cpp diff --git a/libsgl/sgl/SkStrokerPriv.h b/src/core/SkStrokerPriv.h index ecb9bde..ecb9bde 100644 --- a/libsgl/sgl/SkStrokerPriv.h +++ b/src/core/SkStrokerPriv.h diff --git a/libsgl/sgl/SkTSearch.cpp b/src/core/SkTSearch.cpp index bab348f..bab348f 100644 --- a/libsgl/sgl/SkTSearch.cpp +++ b/src/core/SkTSearch.cpp diff --git a/libsgl/sgl/SkTSort.h b/src/core/SkTSort.h index fba49e2..fba49e2 100644 --- a/libsgl/sgl/SkTSort.h +++ b/src/core/SkTSort.h diff --git a/libsgl/sgl/SkTemplatesPriv.h b/src/core/SkTemplatesPriv.h index b0a95a0..b0a95a0 100644 --- a/libsgl/sgl/SkTemplatesPriv.h +++ b/src/core/SkTemplatesPriv.h diff --git a/libsgl/sgl/SkTypeface.cpp b/src/core/SkTypeface.cpp index 9821c51..4604f6d 100644 --- a/libsgl/sgl/SkTypeface.cpp +++ b/src/core/SkTypeface.cpp @@ -43,10 +43,9 @@ SkTypeface* SkTypeface::CreateFromStream(SkStream* stream) return SkFontHost::CreateTypeface(stream); } -#include "SkMMapStream.h" SkTypeface* SkTypeface::CreateFromFile(const char path[]) { - return SkFontHost::CreateTypeface(SkNEW_ARGS(SkMMAPStream, (path))); + return SkFontHost::CreateTypefaceFromFile(path); } /////////////////////////////////////////////////////////////////////////////// diff --git a/libsgl/sgl/SkUnPreMultiply.cpp b/src/core/SkUnPreMultiply.cpp index 371af32..371af32 100644 --- a/libsgl/sgl/SkUnPreMultiply.cpp +++ b/src/core/SkUnPreMultiply.cpp diff --git a/libcorecg/SkUtils.cpp b/src/core/SkUtils.cpp index 20f7ddc..20f7ddc 100644 --- a/libcorecg/SkUtils.cpp +++ b/src/core/SkUtils.cpp diff --git a/libsgl/sgl/SkWriter32.cpp b/src/core/SkWriter32.cpp index 61d0051..61d0051 100644 --- a/libsgl/sgl/SkWriter32.cpp +++ b/src/core/SkWriter32.cpp diff --git a/libsgl/sgl/SkXfermode.cpp b/src/core/SkXfermode.cpp index e8a202d..e8a202d 100644 --- a/libsgl/sgl/SkXfermode.cpp +++ b/src/core/SkXfermode.cpp diff --git a/libsgl/effects/Sk1DPathEffect.cpp b/src/effects/Sk1DPathEffect.cpp index fe299c9..fe299c9 100644 --- a/libsgl/effects/Sk1DPathEffect.cpp +++ b/src/effects/Sk1DPathEffect.cpp diff --git a/libsgl/effects/Sk2DPathEffect.cpp b/src/effects/Sk2DPathEffect.cpp index 405b194..405b194 100644 --- a/libsgl/effects/Sk2DPathEffect.cpp +++ b/src/effects/Sk2DPathEffect.cpp diff --git a/libsgl/effects/SkAvoidXfermode.cpp b/src/effects/SkAvoidXfermode.cpp index eed4012..eed4012 100644 --- a/libsgl/effects/SkAvoidXfermode.cpp +++ b/src/effects/SkAvoidXfermode.cpp diff --git a/libsgl/effects/SkBlurDrawLooper.cpp b/src/effects/SkBlurDrawLooper.cpp index 6ad0136..6ad0136 100644 --- a/libsgl/effects/SkBlurDrawLooper.cpp +++ b/src/effects/SkBlurDrawLooper.cpp diff --git a/libsgl/effects/SkBlurMask.cpp b/src/effects/SkBlurMask.cpp index a7b3202..a7b3202 100644 --- a/libsgl/effects/SkBlurMask.cpp +++ b/src/effects/SkBlurMask.cpp diff --git a/libsgl/effects/SkBlurMask.h b/src/effects/SkBlurMask.h index 8f61d54..8f61d54 100644 --- a/libsgl/effects/SkBlurMask.h +++ b/src/effects/SkBlurMask.h diff --git a/libsgl/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp index 2db60a5..2db60a5 100644 --- a/libsgl/effects/SkBlurMaskFilter.cpp +++ b/src/effects/SkBlurMaskFilter.cpp diff --git a/libsgl/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp index 50be1ad..50be1ad 100644 --- a/libsgl/effects/SkColorFilters.cpp +++ b/src/effects/SkColorFilters.cpp diff --git a/libsgl/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp index 07c8d2f..07c8d2f 100644 --- a/libsgl/effects/SkColorMatrixFilter.cpp +++ b/src/effects/SkColorMatrixFilter.cpp diff --git a/libsgl/effects/SkCornerPathEffect.cpp b/src/effects/SkCornerPathEffect.cpp index 43d571a..43d571a 100644 --- a/libsgl/effects/SkCornerPathEffect.cpp +++ b/src/effects/SkCornerPathEffect.cpp diff --git a/libsgl/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp index 48581b5..48581b5 100644 --- a/libsgl/effects/SkDashPathEffect.cpp +++ b/src/effects/SkDashPathEffect.cpp diff --git a/libsgl/effects/SkDiscretePathEffect.cpp b/src/effects/SkDiscretePathEffect.cpp index 6286045..6286045 100644 --- a/libsgl/effects/SkDiscretePathEffect.cpp +++ b/src/effects/SkDiscretePathEffect.cpp diff --git a/libsgl/effects/SkEmbossMask.cpp b/src/effects/SkEmbossMask.cpp index 28e38a1..28e38a1 100644 --- a/libsgl/effects/SkEmbossMask.cpp +++ b/src/effects/SkEmbossMask.cpp diff --git a/libsgl/effects/SkEmbossMask.h b/src/effects/SkEmbossMask.h index 8e56d6f..8e56d6f 100644 --- a/libsgl/effects/SkEmbossMask.h +++ b/src/effects/SkEmbossMask.h diff --git a/libsgl/effects/SkEmbossMaskFilter.cpp b/src/effects/SkEmbossMaskFilter.cpp index fcfad9d..fcfad9d 100644 --- a/libsgl/effects/SkEmbossMaskFilter.cpp +++ b/src/effects/SkEmbossMaskFilter.cpp diff --git a/libsgl/effects/SkEmbossMask_Table.h b/src/effects/SkEmbossMask_Table.h index 775fe25..775fe25 100644 --- a/libsgl/effects/SkEmbossMask_Table.h +++ b/src/effects/SkEmbossMask_Table.h diff --git a/libsgl/effects/SkGradientShader.cpp b/src/effects/SkGradientShader.cpp index a1674cb..a1674cb 100644 --- a/libsgl/effects/SkGradientShader.cpp +++ b/src/effects/SkGradientShader.cpp diff --git a/libsgl/effects/SkKernel33MaskFilter.cpp b/src/effects/SkKernel33MaskFilter.cpp index a30ea4a..a30ea4a 100644 --- a/libsgl/effects/SkKernel33MaskFilter.cpp +++ b/src/effects/SkKernel33MaskFilter.cpp diff --git a/libsgl/effects/SkLayerDrawLooper.cpp b/src/effects/SkLayerDrawLooper.cpp index f2d8ba8..f2d8ba8 100644 --- a/libsgl/effects/SkLayerDrawLooper.cpp +++ b/src/effects/SkLayerDrawLooper.cpp diff --git a/libsgl/effects/SkLayerRasterizer.cpp b/src/effects/SkLayerRasterizer.cpp index 390e3a3..390e3a3 100644 --- a/libsgl/effects/SkLayerRasterizer.cpp +++ b/src/effects/SkLayerRasterizer.cpp diff --git a/libsgl/effects/SkPaintFlagsDrawFilter.cpp b/src/effects/SkPaintFlagsDrawFilter.cpp index ed2df88..ed2df88 100644 --- a/libsgl/effects/SkPaintFlagsDrawFilter.cpp +++ b/src/effects/SkPaintFlagsDrawFilter.cpp diff --git a/libsgl/effects/SkPixelXorXfermode.cpp b/src/effects/SkPixelXorXfermode.cpp index a5599e2..a5599e2 100644 --- a/libsgl/effects/SkPixelXorXfermode.cpp +++ b/src/effects/SkPixelXorXfermode.cpp diff --git a/libsgl/effects/SkRadialGradient_Table.h b/src/effects/SkRadialGradient_Table.h index 2336237..2336237 100644 --- a/libsgl/effects/SkRadialGradient_Table.h +++ b/src/effects/SkRadialGradient_Table.h diff --git a/libsgl/effects/SkTransparentShader.cpp b/src/effects/SkTransparentShader.cpp index 6b79839..6b79839 100644 --- a/libsgl/effects/SkTransparentShader.cpp +++ b/src/effects/SkTransparentShader.cpp diff --git a/libsgl/gl/SkGL.cpp b/src/gl/SkGL.cpp index 0634709..0634709 100644 --- a/libsgl/gl/SkGL.cpp +++ b/src/gl/SkGL.cpp diff --git a/libsgl/gl/SkGL.h b/src/gl/SkGL.h index d4cd3b6..d4cd3b6 100644 --- a/libsgl/gl/SkGL.h +++ b/src/gl/SkGL.h diff --git a/libsgl/gl/SkGLCanvas.cpp b/src/gl/SkGLCanvas.cpp index 2e93209..f7bc96d 100644 --- a/libsgl/gl/SkGLCanvas.cpp +++ b/src/gl/SkGLCanvas.cpp @@ -4,6 +4,7 @@ #include "SkDraw.h" #include "SkDrawProcs.h" #include "SkGL.h" +#include "SkGlyphCache.h" #include "SkTemplates.h" #include "SkUtils.h" #include "SkXfermode.h" diff --git a/libsgl/gl/SkGLDevice.cpp b/src/gl/SkGLDevice.cpp index 70968e2..70968e2 100644 --- a/libsgl/gl/SkGLDevice.cpp +++ b/src/gl/SkGLDevice.cpp diff --git a/libsgl/gl/SkGLDevice.h b/src/gl/SkGLDevice.h index 0fc9e47..0fc9e47 100644 --- a/libsgl/gl/SkGLDevice.h +++ b/src/gl/SkGLDevice.h diff --git a/libsgl/gl/SkGLDevice_FBO.cpp b/src/gl/SkGLDevice_FBO.cpp index 552d619..552d619 100644 --- a/libsgl/gl/SkGLDevice_FBO.cpp +++ b/src/gl/SkGLDevice_FBO.cpp diff --git a/libsgl/gl/SkGLDevice_FBO.h b/src/gl/SkGLDevice_FBO.h index d695ff0..d695ff0 100644 --- a/libsgl/gl/SkGLDevice_FBO.h +++ b/src/gl/SkGLDevice_FBO.h diff --git a/libsgl/gl/SkGLDevice_SWLayer.cpp b/src/gl/SkGLDevice_SWLayer.cpp index 4b75d4c..4b75d4c 100644 --- a/libsgl/gl/SkGLDevice_SWLayer.cpp +++ b/src/gl/SkGLDevice_SWLayer.cpp diff --git a/libsgl/gl/SkGLDevice_SWLayer.h b/src/gl/SkGLDevice_SWLayer.h index 7e61370..7e61370 100644 --- a/libsgl/gl/SkGLDevice_SWLayer.h +++ b/src/gl/SkGLDevice_SWLayer.h diff --git a/libsgl/gl/SkGLTextCache.cpp b/src/gl/SkGLTextCache.cpp index 141e100..141e100 100644 --- a/libsgl/gl/SkGLTextCache.cpp +++ b/src/gl/SkGLTextCache.cpp diff --git a/libsgl/gl/SkGLTextCache.h b/src/gl/SkGLTextCache.h index eb552aa..eb552aa 100644 --- a/libsgl/gl/SkGLTextCache.h +++ b/src/gl/SkGLTextCache.h diff --git a/libsgl/gl/SkTextureCache.cpp b/src/gl/SkTextureCache.cpp index 17b37ca..17b37ca 100644 --- a/libsgl/gl/SkTextureCache.cpp +++ b/src/gl/SkTextureCache.cpp diff --git a/libsgl/gl/SkTextureCache.h b/src/gl/SkTextureCache.h index 0bc3091..0bc3091 100644 --- a/libsgl/gl/SkTextureCache.h +++ b/src/gl/SkTextureCache.h diff --git a/libsgl/images/SkBitmap_RLEPixels.h b/src/images/SkBitmap_RLEPixels.h index c83bc69..c83bc69 100644 --- a/libsgl/images/SkBitmap_RLEPixels.h +++ b/src/images/SkBitmap_RLEPixels.h diff --git a/libsgl/images/SkCreateRLEPixelRef.cpp b/src/images/SkCreateRLEPixelRef.cpp index 5756237..5756237 100644 --- a/libsgl/images/SkCreateRLEPixelRef.cpp +++ b/src/images/SkCreateRLEPixelRef.cpp diff --git a/libsgl/images/SkFDStream.cpp b/src/images/SkFDStream.cpp index db4a51a..db4a51a 100644 --- a/libsgl/images/SkFDStream.cpp +++ b/src/images/SkFDStream.cpp diff --git a/libsgl/images/SkFlipPixelRef.cpp b/src/images/SkFlipPixelRef.cpp index 95403cc..95403cc 100644 --- a/libsgl/images/SkFlipPixelRef.cpp +++ b/src/images/SkFlipPixelRef.cpp diff --git a/libsgl/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp index 18b52d6..2d477ef 100644 --- a/libsgl/images/SkImageDecoder.cpp +++ b/src/images/SkImageDecoder.cpp @@ -155,36 +155,3 @@ bool SkImageDecoder::DecodeStream(SkStream* stream, SkBitmap* bm, return success; } -/////////////////////////////////////////////////////////////////////////////// - -#ifdef SK_SUPPORT_IMAGE_ENCODE - -SkImageEncoder::~SkImageEncoder() {} - -bool SkImageEncoder::encodeStream(SkWStream* stream, const SkBitmap& bm, - int quality) { - quality = SkMin32(100, SkMax32(0, quality)); - return this->onEncode(stream, bm, quality); -} - -bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, - int quality) { - quality = SkMin32(100, SkMax32(0, quality)); - SkFILEWStream stream(file); - return this->onEncode(&stream, bm, quality); -} - -bool SkImageEncoder::EncodeFile(const char file[], const SkBitmap& bm, Type t, - int quality) { - SkAutoTDelete<SkImageEncoder> enc(SkImageEncoder::Create(t)); - return enc.get() && enc.get()->encodeFile(file, bm, quality); -} - -bool SkImageEncoder::EncodeStream(SkWStream* stream, const SkBitmap& bm, Type t, - int quality) { - SkAutoTDelete<SkImageEncoder> enc(SkImageEncoder::Create(t)); - return enc.get() && enc.get()->encodeStream(stream, bm, quality); -} - -#endif - diff --git a/libsgl/images/SkImageDecoder_fpdfemb.cpp b/src/images/SkImageDecoder_fpdfemb.cpp index 7f37e3d..7f37e3d 100644 --- a/libsgl/images/SkImageDecoder_fpdfemb.cpp +++ b/src/images/SkImageDecoder_fpdfemb.cpp diff --git a/libsgl/images/SkImageDecoder_libbmp.cpp b/src/images/SkImageDecoder_libbmp.cpp index 32a7a6d..32a7a6d 100644 --- a/libsgl/images/SkImageDecoder_libbmp.cpp +++ b/src/images/SkImageDecoder_libbmp.cpp diff --git a/libsgl/images/SkImageDecoder_libgif.cpp b/src/images/SkImageDecoder_libgif.cpp index 519366a..519366a 100644 --- a/libsgl/images/SkImageDecoder_libgif.cpp +++ b/src/images/SkImageDecoder_libgif.cpp diff --git a/libsgl/images/SkImageDecoder_libico.cpp b/src/images/SkImageDecoder_libico.cpp index b179a6b..b179a6b 100644 --- a/libsgl/images/SkImageDecoder_libico.cpp +++ b/src/images/SkImageDecoder_libico.cpp diff --git a/libsgl/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp index 492de23..5133997 100644 --- a/libsgl/images/SkImageDecoder_libjpeg.cpp +++ b/src/images/SkImageDecoder_libjpeg.cpp @@ -15,6 +15,7 @@ */ #include "SkImageDecoder.h" +#include "SkImageEncoder.h" #include "SkColorPriv.h" #include "SkDither.h" #include "SkScaledBitmapSampler.h" @@ -501,8 +502,6 @@ bool SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, /////////////////////////////////////////////////////////////////////////////// -#ifdef SK_SUPPORT_IMAGE_ENCODE - #include "SkColorPriv.h" // taken from jcolor.c in libjpeg @@ -795,8 +794,6 @@ SkImageEncoder* SkImageEncoder_JPEG_Factory() { return SkNEW(SkJPEGImageEncoder); } -#endif /* SK_SUPPORT_IMAGE_ENCODE */ - ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// diff --git a/libsgl/images/SkImageDecoder_libpng.cpp b/src/images/SkImageDecoder_libpng.cpp index 862ebf1..1371ecc 100644 --- a/libsgl/images/SkImageDecoder_libpng.cpp +++ b/src/images/SkImageDecoder_libpng.cpp @@ -16,6 +16,7 @@ */ #include "SkImageDecoder.h" +#include "SkImageEncoder.h" #include "SkColor.h" #include "SkColorPriv.h" #include "SkDither.h" @@ -443,8 +444,6 @@ bool SkPNGImageDecoder::onDecode(SkStream* sk_stream, SkBitmap* decodedBitmap, /////////////////////////////////////////////////////////////////////////////// -#ifdef SK_SUPPORT_IMAGE_ENCODE - #include "SkColorPriv.h" #include "SkUnPreMultiply.h" @@ -792,4 +791,3 @@ SkImageEncoder* SkImageEncoder_PNG_Factory() { return SkNEW(SkPNGImageEncoder); } -#endif /* SK_SUPPORT_IMAGE_ENCODE */ diff --git a/libsgl/images/SkImageDecoder_libpvjpeg.cpp b/src/images/SkImageDecoder_libpvjpeg.cpp index 9177741..9177741 100644 --- a/libsgl/images/SkImageDecoder_libpvjpeg.cpp +++ b/src/images/SkImageDecoder_libpvjpeg.cpp diff --git a/libsgl/images/SkImageDecoder_wbmp.cpp b/src/images/SkImageDecoder_wbmp.cpp index 9d188f6..9d188f6 100644 --- a/libsgl/images/SkImageDecoder_wbmp.cpp +++ b/src/images/SkImageDecoder_wbmp.cpp diff --git a/src/images/SkImageEncoder.cpp b/src/images/SkImageEncoder.cpp new file mode 100644 index 0000000..d359905 --- /dev/null +++ b/src/images/SkImageEncoder.cpp @@ -0,0 +1,48 @@ +/* + * Copyright 2009, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "SkImageEncoder.h" +#include "SkBitmap.h" +#include "SkStream.h" +#include "SkTemplates.h" + +SkImageEncoder::~SkImageEncoder() {} + +bool SkImageEncoder::encodeStream(SkWStream* stream, const SkBitmap& bm, + int quality) { + quality = SkMin32(100, SkMax32(0, quality)); + return this->onEncode(stream, bm, quality); +} + +bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, + int quality) { + quality = SkMin32(100, SkMax32(0, quality)); + SkFILEWStream stream(file); + return this->onEncode(&stream, bm, quality); +} + +bool SkImageEncoder::EncodeFile(const char file[], const SkBitmap& bm, Type t, + int quality) { + SkAutoTDelete<SkImageEncoder> enc(SkImageEncoder::Create(t)); + return enc.get() && enc.get()->encodeFile(file, bm, quality); +} + +bool SkImageEncoder::EncodeStream(SkWStream* stream, const SkBitmap& bm, Type t, + int quality) { + SkAutoTDelete<SkImageEncoder> enc(SkImageEncoder::Create(t)); + return enc.get() && enc.get()->encodeStream(stream, bm, quality); +} + diff --git a/libsgl/images/SkImageRef.cpp b/src/images/SkImageRef.cpp index 90c37b6..90c37b6 100644 --- a/libsgl/images/SkImageRef.cpp +++ b/src/images/SkImageRef.cpp diff --git a/libsgl/images/SkImageRefPool.cpp b/src/images/SkImageRefPool.cpp index e322507..e322507 100644 --- a/libsgl/images/SkImageRefPool.cpp +++ b/src/images/SkImageRefPool.cpp diff --git a/libsgl/images/SkImageRefPool.h b/src/images/SkImageRefPool.h index b2eb7b3..b2eb7b3 100644 --- a/libsgl/images/SkImageRefPool.h +++ b/src/images/SkImageRefPool.h diff --git a/libsgl/images/SkImageRef_GlobalPool.cpp b/src/images/SkImageRef_GlobalPool.cpp index 1f0bc43..1f0bc43 100644 --- a/libsgl/images/SkImageRef_GlobalPool.cpp +++ b/src/images/SkImageRef_GlobalPool.cpp diff --git a/libsgl/images/SkMovie.cpp b/src/images/SkMovie.cpp index 7186ed5..7186ed5 100644 --- a/libsgl/images/SkMovie.cpp +++ b/src/images/SkMovie.cpp diff --git a/libsgl/images/SkMovie_gif.cpp b/src/images/SkMovie_gif.cpp index ca9c812..ca9c812 100644 --- a/libsgl/images/SkMovie_gif.cpp +++ b/src/images/SkMovie_gif.cpp diff --git a/libcorecg/SkPageFlipper.cpp b/src/images/SkPageFlipper.cpp index 526ba09..526ba09 100644 --- a/libcorecg/SkPageFlipper.cpp +++ b/src/images/SkPageFlipper.cpp diff --git a/libsgl/images/SkScaledBitmapSampler.cpp b/src/images/SkScaledBitmapSampler.cpp index 15f4432..15f4432 100644 --- a/libsgl/images/SkScaledBitmapSampler.cpp +++ b/src/images/SkScaledBitmapSampler.cpp diff --git a/libsgl/images/SkScaledBitmapSampler.h b/src/images/SkScaledBitmapSampler.h index 0bb9924..0bb9924 100644 --- a/libsgl/images/SkScaledBitmapSampler.h +++ b/src/images/SkScaledBitmapSampler.h diff --git a/libsgl/images/bmpdecoderhelper.cpp b/src/images/bmpdecoderhelper.cpp index acabf44..acabf44 100644 --- a/libsgl/images/bmpdecoderhelper.cpp +++ b/src/images/bmpdecoderhelper.cpp diff --git a/libsgl/images/bmpdecoderhelper.h b/src/images/bmpdecoderhelper.h index 07f0ae5..07f0ae5 100644 --- a/libsgl/images/bmpdecoderhelper.h +++ b/src/images/bmpdecoderhelper.h diff --git a/libsgl/images/fpdfemb.h b/src/images/fpdfemb.h index 3c77116..3c77116 100644 --- a/libsgl/images/fpdfemb.h +++ b/src/images/fpdfemb.h diff --git a/libsgl/images/fpdfemb_ext.h b/src/images/fpdfemb_ext.h index d82c4df..d82c4df 100644 --- a/libsgl/images/fpdfemb_ext.h +++ b/src/images/fpdfemb_ext.h diff --git a/libsgl/ports/SkFontHost_FONTPATH.cpp b/src/ports/SkFontHost_FONTPATH.cpp index 3cbccaf..3cbccaf 100644 --- a/libsgl/ports/SkFontHost_FONTPATH.cpp +++ b/src/ports/SkFontHost_FONTPATH.cpp diff --git a/libsgl/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 5855eec..5855eec 100644 --- a/libsgl/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp diff --git a/libsgl/ports/SkFontHost_android.cpp b/src/ports/SkFontHost_android.cpp index 0922e7b..1cd2e3b 100644 --- a/libsgl/ports/SkFontHost_android.cpp +++ b/src/ports/SkFontHost_android.cpp @@ -625,6 +625,11 @@ SkTypeface* SkFontHost::CreateTypeface(SkStream* stream) return SkNEW_ARGS(StreamTypeface, (style, false, NULL, stream)); } +SkTypeface* SkFontHost::CreateTypefaceFromFile(const char path[]) +{ + return SkFontHost::CreateTypeface(SkNEW_ARGS(SkMMAPStream, (path))); +} + /////////////////////////////////////////////////////////////////////////////// size_t SkFontHost::ShouldPurgeFontCache(size_t sizeAllocatedSoFar) diff --git a/libsgl/ports/SkFontHost_ascender.cpp b/src/ports/SkFontHost_ascender.cpp index 2148850..2148850 100644 --- a/libsgl/ports/SkFontHost_ascender.cpp +++ b/src/ports/SkFontHost_ascender.cpp diff --git a/libsgl/ports/SkFontHost_gamma.cpp b/src/ports/SkFontHost_gamma.cpp index 0b95bce..0b95bce 100644 --- a/libsgl/ports/SkFontHost_gamma.cpp +++ b/src/ports/SkFontHost_gamma.cpp diff --git a/libsgl/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp index f75718d..f75718d 100644 --- a/libsgl/ports/SkFontHost_linux.cpp +++ b/src/ports/SkFontHost_linux.cpp diff --git a/libsgl/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp index af44cf5..4f51dea 100755 --- a/libsgl/ports/SkFontHost_mac.cpp +++ b/src/ports/SkFontHost_mac.cpp @@ -1,563 +1,579 @@ -/*
+/* ** Copyright 2006, The Android Open Source Project - **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
-*/
-
-#include "SkFontHost.h"
-#include "SkDescriptor.h"
-
-// Give 1MB font cache budget
-#define FONT_CACHE_MEMORY_BUDGET (1024 * 1024)
-
-const char* gDefaultfont = "Arial"; // hard code for now
-static SkMutex gFTMutex;
-
-inline SkPoint F32PtToSkPoint(const Float32Point p)
-{
- SkPoint sp = { SkFloatToFixed(p.x),SkFloatToFixed(p.y) };
- return sp;
-}
-
-static inline uint32_t _rotl(uint32_t v, uint32_t r)
-{
- return (v << r | v >> (32 - r));
-}
-
-// This will generate a unique ID based on the fontname + fontstyle
-// and also used by upper layer
-uint32_t FontFaceChecksum(const char *name,SkTypeface::Style style)
-{
- if (!name) return style;
-
- char* q = (char*)name;
-
- // From "Performance in Practice of String Hashing Functions"
- // Ramakrishna & Zobel
- const uint32_t L = 5;
- const uint32_t R = 2;
-
- uint32_t h = 0x12345678;
- while (*q) {
- uint32_t ql = tolower(*q);
- h ^= ((h << L) + (h >> R) + ql);
- q ++;
- }
-
- // add style
- h = _rotl(h, 3) ^ style;
-
- return h;
-}
-
-#pragma mark -
-struct SkFaceRec {
- SkFaceRec* fNext;
- uint32_t fRefCnt;
- ATSUFontID fFontID;
- ATSUStyle fStyle;
-
- SkFaceRec() : fFontID(0), fRefCnt(0), fStyle(NULL) {};
-
- ~SkFaceRec() {
- if (fStyle) {
- ::ATSUDisposeStyle(fStyle);
- fStyle = NULL;
- }
- }
-
- uint32_t ref() {
- return ++fRefCnt;
- }
-};
-
-// Font Face list
-static SkFaceRec* gFaceRecHead = NULL;
-
-static SkFaceRec* find_ft_face(const ATSUFontID fontID) {
- SkFaceRec* rec = gFaceRecHead;
- while (rec) {
- if (rec->fFontID == fontID) {
- return rec;
- }
- rec = rec->fNext;
- }
-
- return NULL;
-}
-
-static SkFaceRec* insert_ft_face(const ATSUFontID afontID, const ATSUStyle atsuStyle) {
- SkFaceRec* rec = find_ft_face(afontID);
- if (rec) {
- return rec; // found?
- }
-
- rec = SkNEW(SkFaceRec);
- rec->fFontID = afontID;
- rec->fStyle = atsuStyle;
- rec->fNext = gFaceRecHead;
- gFaceRecHead = rec;
-
- return rec;
-}
-
-static void unref_ft_face(const ATSUFontID fontID) {
-
- SkFaceRec* rec = gFaceRecHead;
- SkFaceRec* prev = NULL;
- while (rec) {
- SkFaceRec* next = rec->fNext;
- if (rec->fFontID == fontID) {
- if (--rec->fRefCnt == 0) {
- if (prev)
- prev->fNext = next;
- else
- gFaceRecHead = next;
-
- SkDELETE(rec);
- }
- return;
- }
- prev = rec;
- rec = next;
- }
- SkASSERT("shouldn't get here, face not in list");
-}
-
-#pragma mark -
-
-// have to do this because SkTypeface::SkTypeface() is protected
-class SkTypeface_Mac : public SkTypeface {
-public:
- SkTypeface_Mac(SkTypeface::Style style, uint32_t id) : SkTypeface(style, id) {}
-
- ~SkTypeface_Mac() {}
-};
-
-#pragma mark -
-
-static SkTypeface* CreateTypeface_(const char *name, const SkTypeface::Style style) {
-
- OSStatus err;
- ATSUStyle atsuStyle;
- ::ATSUCreateStyle(&atsuStyle);
- if (name != NULL) {
- static const ATSUAttributeTag fontTag = kATSUFontTag;
- static const ByteCount fontTagSize = sizeof(ATSUFontID);
-
- ATSUFontID fontID = 0;
-#if 1
- err = ::ATSUFindFontFromName(
- name,strlen(name),kFontNoNameCode, /* instead of regular, kFontFamilyName returns bold and/or italic sometimes, but why this works?? */
- kFontMacintoshPlatform,kFontNoScriptCode,kFontNoLanguageCode,&fontID);
-#else
- CFStringRef cfontName = CFStringCreateWithCString(NULL, name, kCFStringEncodingASCII);
- ATSFontRef fontRef = ::ATSFontFindFromName(cfontName,kATSOptionFlagsDefault);
- fontID = ::FMGetFontFromATSFontRef(fontRef);
- CFRelease(cfontName);
-#endif
- if (0 != fontID) {
- const ATSUAttributeValuePtr values[] = { &fontID };
- err = ::ATSUSetAttributes(atsuStyle,1,&fontTag,&fontTagSize,values);
- }
- else {
- }
- }
- if (style != SkTypeface::kNormal) {
- Boolean fontItalic = ((style & SkTypeface::kItalic) != 0);
- Boolean fontBold = ((style & SkTypeface::kBold) != 0);
- const ATSUAttributeTag tags[2] = { kATSUQDBoldfaceTag, kATSUQDItalicTag };
- const ATSUAttributeValuePtr values[2] = { &fontBold, &fontItalic };
- const ByteCount sizes[2] = { sizeof(Boolean), sizeof(Boolean) };
- err = ::ATSUSetAttributes(atsuStyle,2,tags,sizes,values);
- }
-
- uint32_t cs = FontFaceChecksum(name,style);
- SkTypeface_Mac* ptypeface = new SkTypeface_Mac(style,cs);
-
- if (NULL == ptypeface) {
- SkASSERT(false);
- return NULL;
- }
-
- SkFaceRec* rec = insert_ft_face(cs, atsuStyle);
- SkASSERT(rec);
-
- return ptypeface;
-}
-
-static SkTypeface* CreateTypeface_(const SkFaceRec* rec, const SkTypeface::Style style) {
-
- OSStatus err;
- ATSUStyle atsuStyle;
- err = ::ATSUCreateAndCopyStyle(rec->fStyle, &atsuStyle);
-
- Boolean fontItalic = ((style & SkTypeface::kItalic) != 0);
- Boolean fontBold = ((style & SkTypeface::kBold) != 0);
- const ATSUAttributeTag tags[2] = { kATSUQDBoldfaceTag, kATSUQDItalicTag };
- const ATSUAttributeValuePtr values[2] = { &fontBold, &fontItalic };
- const ByteCount sizes[2] = { sizeof(Boolean), sizeof(Boolean) };
- err = ::ATSUSetAttributes(atsuStyle,2,tags,sizes,values);
-
- // get old font id and name
- ATSUFontID fontID = 0;
- ByteCount actual = 0;
- err = ::ATSUGetAttribute(rec->fStyle,kATSUFontTag,sizeof(ATSUFontID),&fontID,&actual);
-
- ByteCount actualLength = 0;
- char *fontname = NULL;
- err = ::ATSUFindFontName(fontID , kFontFamilyName, kFontUnicodePlatform, kFontNoScriptCode,
- kFontNoLanguageCode , 0 , NULL , &actualLength , NULL );
- if ( err == noErr)
- {
- actualLength += 1 ;
- fontname = (char*)malloc( actualLength );
- err = ::ATSUFindFontName(fontID, kFontFamilyName, kFontUnicodePlatform, kFontNoScriptCode,
- kFontNoLanguageCode, actualLength, fontname , NULL, NULL);
- }
-
- SkTypeface_Mac* ptypeface = NULL;
- if (fontname == NULL) {
- ptypeface = new SkTypeface_Mac(style,rec->fFontID);
- return ptypeface;
- }
- else {
- uint32_t cs = FontFaceChecksum(fontname,style);
- ptypeface = new SkTypeface_Mac(style, cs);
-
- if (NULL == ptypeface) {
- SkASSERT(false);
- return NULL;
- }
-
- free(fontname);
-
- insert_ft_face(cs,atsuStyle);
- }
- return ptypeface;
-}
-
-#pragma mark -
-
-class SkScalerContext_Mac : public SkScalerContext {
-public:
- SkScalerContext_Mac(const SkDescriptor* desc);
- virtual ~SkScalerContext_Mac();
-
-protected:
- virtual unsigned generateGlyphCount() const;
- virtual uint16_t generateCharToGlyph(SkUnichar uni);
- virtual void generateAdvance(SkGlyph* glyph);
- virtual void generateMetrics(SkGlyph* glyph);
- virtual void generateImage(const SkGlyph& glyph);
- virtual void generatePath(const SkGlyph& glyph, SkPath* path);
- virtual void generateLineHeight(SkPoint* ascent, SkPoint* descent);
- virtual void generateFontMetrics(SkPaint::FontMetrics* mX, SkPaint::FontMetrics* mY);
- virtual SkDeviceContext getDC() { return NULL; } // not implemented on Mac
-
-private:
- ATSUTextLayout fLayout;
- ATSUStyle fStyle;
-
- static OSStatus MoveTo(const Float32Point *pt, void *cb);
- static OSStatus Line(const Float32Point *pt, void *cb);
- static OSStatus Curve(const Float32Point *pt1, const Float32Point *pt2, const Float32Point *pt3, void *cb);
- static OSStatus Close(void *cb);
-};
-
-SkScalerContext_Mac::SkScalerContext_Mac(const SkDescriptor* desc)
- : SkScalerContext(desc), fLayout(0), fStyle(0)
-{
- SkAutoMutexAcquire ac(gFTMutex);
- OSStatus err;
-
- SkFaceRec* rec = find_ft_face(fRec.fFontID);
- if (rec) {
- rec->ref();
- err = ::ATSUCreateAndCopyStyle(rec->fStyle, &fStyle);
- }
- else {
- SkASSERT(false);
- // create a default
- err = ::ATSUCreateStyle(&fStyle);
- }
-
- uint32_t size = SkFixedFloor(fRec.fTextSize);
- Fixed fixedSize = IntToFixed(size);
- static const ATSUAttributeTag sizeTag = kATSUSizeTag;
- static const ByteCount sizeTagSize = sizeof(Fixed);
- const ATSUAttributeValuePtr values[] = { &fixedSize };
- err = ::ATSUSetAttributes(fStyle,1,&sizeTag,&sizeTagSize,values);
-
- err = ::ATSUCreateTextLayout(&fLayout);
-}
-
-SkScalerContext_Mac::~SkScalerContext_Mac()
-{
- unref_ft_face(fRec.fFontID);
-
- ::ATSUDisposeTextLayout(fLayout);
- ::ATSUDisposeStyle(fStyle);
-}
-
-unsigned SkScalerContext_Mac::generateGlyphCount() const
-{
- return 0xFFFF;
-}
-
-uint16_t SkScalerContext_Mac::generateCharToGlyph(SkUnichar uni)
-{
- SkAutoMutexAcquire ac(gFTMutex);
-
- OSStatus err;
- UniChar achar = uni;
- err = ::ATSUSetTextPointerLocation(fLayout,&achar,0,1,1);
- err = ::ATSUSetRunStyle(fLayout,fStyle,kATSUFromTextBeginning,kATSUToTextEnd);
-
- ATSLayoutRecord *layoutPtr;
- ItemCount count;
- ATSGlyphRef glyph;
-
- err = ::ATSUDirectGetLayoutDataArrayPtrFromTextLayout(fLayout,0,kATSUDirectDataLayoutRecordATSLayoutRecordCurrent,(void**)&layoutPtr,&count);
- glyph = layoutPtr->glyphID;
- ::ATSUDirectReleaseLayoutDataArrayPtr(NULL,kATSUDirectDataLayoutRecordATSLayoutRecordCurrent,(void**)&layoutPtr);
- return glyph;
-}
-
-void SkScalerContext_Mac::generateAdvance(SkGlyph* glyph) {
- this->generateMetrics(glyph);
-}
-
-void SkScalerContext_Mac::generateMetrics(SkGlyph* glyph)
-{
- GlyphID glyphID = glyph->fID;
- ATSGlyphScreenMetrics metrics= { 0 };
-
- glyph->fRsbDelta = 0;
- glyph->fLsbDelta = 0;
-
- OSStatus err = ATSUGlyphGetScreenMetrics(fStyle,1,&glyphID,0,true,true,&metrics);
- if (err == noErr) {
- glyph->fAdvanceX = SkFloatToFixed(metrics.deviceAdvance.x);
- glyph->fAdvanceY = SkFloatToFixed(metrics.deviceAdvance.y);
- //glyph->fWidth = metrics.width;
- //glyph->fHeight = metrics.height;
- glyph->fWidth = metrics.width + ceil(metrics.sideBearing.x - metrics.otherSideBearing.x);
- glyph->fHeight = metrics.height + ceil(metrics.sideBearing.y - metrics.otherSideBearing.y) + 1;
-
- glyph->fTop = -metrics.topLeft.y;
- glyph->fLeft = metrics.topLeft.x;
- }
-}
-
-void SkScalerContext_Mac::generateFontMetrics(SkPaint::FontMetrics* mx, SkPaint::FontMetrics* my) {
- //SkASSERT(false);
- if (mx)
- memset(mx, 0, sizeof(SkPaint::FontMetrics));
- if (my)
- memset(my, 0, sizeof(SkPaint::FontMetrics));
- return;
-}
-
-void SkScalerContext_Mac::generateImage(const SkGlyph& glyph)
-{
- SkAutoMutexAcquire ac(gFTMutex);
-
- GlyphID glyphID = glyph.fID;
- ATSGlyphScreenMetrics metrics= { 0 };
-
- SkASSERT(fLayout);
- OSStatus err = ::ATSUGlyphGetScreenMetrics(fStyle,1,&glyphID,0,true,true,&metrics);
-
-// uint32_t w = metrics.width;
-// uint32_t h = metrics.height;
-// uint32_t pitch = (w + 3) & ~0x3;
-// if (pitch != glyph.rowBytes()) {
-// SkASSERT(false); // it's different from previously cacluated in generateMetrics(), so the size of glyph.fImage buffer is incorrect!
-// }
-
- CGColorSpaceRef greyColorSpace = ::CGColorSpaceCreateWithName(kCGColorSpaceGenericGray);
- CGContextRef contextRef = ::CGBitmapContextCreate((uint8_t*)glyph.fImage, glyph.fWidth, glyph.fHeight, 8, glyph.rowBytes(), greyColorSpace, kCGImageAlphaNone);
- if (!contextRef) {
- SkASSERT(false);
- return;
- }
-
- ::CGContextSetFillColorSpace(contextRef, greyColorSpace);
- ::CGContextSetStrokeColorSpace(contextRef, greyColorSpace);
-
- ::CGContextSetGrayFillColor(contextRef, 0.0, 1.0);
- ::CGContextFillRect(contextRef, ::CGRectMake(0, 0, glyph.fWidth, glyph.fHeight));
-
- ::CGContextSetGrayFillColor(contextRef, 1.0, 1.0);
- ::CGContextSetGrayStrokeColor(contextRef, 1.0, 1.0);
- ::CGContextSetTextDrawingMode(contextRef, kCGTextFill);
-
- ATSUAttributeTag tag = kATSUCGContextTag;
- ByteCount size = sizeof(CGContextRef);
- ATSUAttributeValuePtr value = &contextRef;
- err = ::ATSUSetLayoutControls(fLayout,1,&tag,&size,&value);
- err = ::ATSUDrawText(fLayout,kATSUFromTextBeginning,kATSUToTextEnd,FloatToFixed(-metrics.topLeft.x),FloatToFixed(glyph.fHeight-metrics.topLeft.y));
- ::CGContextRelease(contextRef);
-}
-
-void SkScalerContext_Mac::generatePath(const SkGlyph& glyph, SkPath* path)
-{
- SkAutoMutexAcquire ac(gFTMutex);
- OSStatus err,result;
-
- err = ::ATSUGlyphGetCubicPaths(
- fStyle,glyph.fID,
- &SkScalerContext_Mac::MoveTo,
- &SkScalerContext_Mac::Line,
- &SkScalerContext_Mac::Curve,
- &SkScalerContext_Mac::Close,
- path,&result);
- SkASSERT(err == noErr);
-}
-
-void SkScalerContext_Mac::generateLineHeight(SkPoint* ascent, SkPoint* descent)
-{
- ATSUTextMeasurement textAscent, textDescent;
- ByteCount actual = 0;
- OSStatus err = ::ATSUGetAttribute(fStyle,kATSULineAscentTag,sizeof(ATSUTextMeasurement),&textAscent,&actual);
- ascent->set(0,textAscent);
- err = ::ATSUGetAttribute(fStyle,kATSULineDescentTag,sizeof(ATSUTextMeasurement),&textDescent,&actual);
- descent->set(0,textDescent);
-}
-
-OSStatus SkScalerContext_Mac::MoveTo(const Float32Point *pt, void *cb)
-{
- reinterpret_cast<SkPath*>(cb)->moveTo(F32PtToSkPoint(*pt));
- return noErr;
-}
-
-OSStatus SkScalerContext_Mac::Line(const Float32Point *pt, void *cb)
-{
- reinterpret_cast<SkPath*>(cb)->lineTo(F32PtToSkPoint(*pt));
- return noErr;
-}
-
-OSStatus SkScalerContext_Mac::Curve(const Float32Point *pt1, const Float32Point *pt2, const Float32Point *pt3, void *cb)
-{
- reinterpret_cast<SkPath*>(cb)->cubicTo(F32PtToSkPoint(*pt1),F32PtToSkPoint(*pt2),F32PtToSkPoint(*pt3));
- return noErr;
-}
-
-OSStatus SkScalerContext_Mac::Close(void *cb)
-{
- reinterpret_cast<SkPath*>(cb)->close();
- return noErr;
-}
-
-#pragma mark -
-
-void SkFontHost::Serialize(const SkTypeface* face, SkWStream* stream) {
- SkASSERT(!"SkFontHost::Serialize unimplemented");
-}
-
-SkTypeface* SkFontHost::Deserialize(SkStream* stream) {
- SkASSERT(!"SkFontHost::Deserialize unimplemented");
- return NULL;
-}
-
-SkTypeface* SkFontHost::CreateTypeface(SkStream* stream) {
-
- //Should not be used on Mac, keep linker happy
- SkASSERT(false);
- return CreateTypeface_(gDefaultfont,SkTypeface::kNormal);
-}
-
-SkScalerContext* SkFontHost::CreateScalerContext(const SkDescriptor* desc)
-{
- return new SkScalerContext_Mac(desc);
-}
-
-SkScalerContext* SkFontHost::CreateFallbackScalerContext(const SkScalerContext::Rec& rec)
-{
- SkAutoDescriptor ad(sizeof(rec) + sizeof(gDefaultfont) + SkDescriptor::ComputeOverhead(2));
- SkDescriptor* desc = ad.getDesc();
-
- desc->init();
- SkScalerContext::Rec* newRec =
- (SkScalerContext::Rec*)desc->addEntry(kRec_SkDescriptorTag, sizeof(rec), &rec);
-
- CreateTypeface_(gDefaultfont,SkTypeface::kNormal);
- newRec->fFontID = FontFaceChecksum(gDefaultfont,SkTypeface::kNormal);
- desc->computeChecksum();
-
- return SkFontHost::CreateScalerContext(desc);
-}
-
-
- /** Return the closest matching typeface given either an existing family
- (specified by a typeface in that family) or by a familyName, and a
- requested style.
- 1) If familyFace is null, use famillyName.
- 2) If famillyName is null, use familyFace.
- 3) If both are null, return the default font that best matches style
- This MUST not return NULL.
- */
-
-SkTypeface* SkFontHost::FindTypeface(const SkTypeface* familyFace, const char familyName[], SkTypeface::Style style) {
-
- SkAutoMutexAcquire ac(gFTMutex);
-
- // clip to legal style bits
- style = (SkTypeface::Style)(style & SkTypeface::kBoldItalic);
-
- SkTypeface* tf = NULL;
-
- if (NULL == familyFace && NULL == familyName) {
- tf = CreateTypeface_(gDefaultfont,style);
- }
- else {
- if (NULL != familyFace) {
- uint32_t id = familyFace->uniqueID();
- SkFaceRec* rec = find_ft_face(id);
- if (!rec) {
- SkASSERT(false);
- tf = CreateTypeface_(gDefaultfont,style);
- }
- else {
- tf = CreateTypeface_(rec,style);
- }
- }
- else {
- tf = CreateTypeface_(familyName,style);
- }
- }
-
- if (NULL == tf) {
- tf = CreateTypeface_(gDefaultfont,style);
- }
- return tf;
-
-}
-
-size_t SkFontHost::ShouldPurgeFontCache(size_t sizeAllocatedSoFar) {
- if (sizeAllocatedSoFar > FONT_CACHE_MEMORY_BUDGET)
- return sizeAllocatedSoFar - FONT_CACHE_MEMORY_BUDGET;
- else
- return 0; // nothing to do
-}
-
-int SkFontHost::ComputeGammaFlag(const SkPaint& paint) {
- return 0;
-}
-
-void SkFontHost::GetGammaTables(const uint8_t* tables[2]) {
- tables[0] = NULL; // black gamma (e.g. exp=1.4)
- tables[1] = NULL; // white gamma (e.g. exp= 1/1.4)
-}
-
+ ** + ** Licensed under the Apache License, Version 2.0 (the "License"); + ** you may not use this file except in compliance with the License. + ** You may obtain a copy of the License at + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** Unless required by applicable law or agreed to in writing, software + ** distributed under the License is distributed on an "AS IS" BASIS, + ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ** See the License for the specific language governing permissions and + ** limitations under the License. +*/ + +#include "SkFontHost.h" +#include "SkDescriptor.h" + +// Give 1MB font cache budget +#define FONT_CACHE_MEMORY_BUDGET (1024 * 1024) + +const char* gDefaultfont = "Arial"; // hard code for now +static SkMutex gFTMutex; + +static inline SkPoint F32PtToSkPoint(const Float32Point p) { + SkPoint sp = { SkFloatToScalar(p.x), SkFloatToScalar(p.y) }; + return sp; +} + +static inline uint32_t _rotl(uint32_t v, uint32_t r) { + return (v << r | v >> (32 - r)); +} + +// This will generate a unique ID based on the fontname + fontstyle +// and also used by upper layer +uint32_t FontFaceChecksum(const char *name,SkTypeface::Style style) +{ + if (!name) return style; + + char* q = (char*)name; + + // From "Performance in Practice of String Hashing Functions" + // Ramakrishna & Zobel + const uint32_t L = 5; + const uint32_t R = 2; + + uint32_t h = 0x12345678; + while (*q) { + uint32_t ql = tolower(*q); + h ^= ((h << L) + (h >> R) + ql); + q ++; + } + + // add style + h = _rotl(h, 3) ^ style; + + return h; +} + +#pragma mark - +struct SkFaceRec { + SkFaceRec* fNext; + uint32_t fRefCnt; + ATSUFontID fFontID; + ATSUStyle fStyle; + + SkFaceRec() : fFontID(0), fRefCnt(0), fStyle(NULL) {}; + + ~SkFaceRec() { + if (fStyle) { + ::ATSUDisposeStyle(fStyle); + fStyle = NULL; + } + } + + uint32_t ref() { + return ++fRefCnt; + } +}; + +// Font Face list +static SkFaceRec* gFaceRecHead = NULL; + +static SkFaceRec* find_ft_face(const ATSUFontID fontID) { + SkFaceRec* rec = gFaceRecHead; + while (rec) { + if (rec->fFontID == fontID) { + return rec; + } + rec = rec->fNext; + } + + return NULL; +} + +static SkFaceRec* insert_ft_face(const ATSUFontID afontID, const ATSUStyle atsuStyle) { + SkFaceRec* rec = find_ft_face(afontID); + if (rec) { + return rec; // found? + } + + rec = SkNEW(SkFaceRec); + rec->fFontID = afontID; + rec->fStyle = atsuStyle; + rec->fNext = gFaceRecHead; + gFaceRecHead = rec; + + return rec; +} + +static void unref_ft_face(const ATSUFontID fontID) { + + SkFaceRec* rec = gFaceRecHead; + SkFaceRec* prev = NULL; + while (rec) { + SkFaceRec* next = rec->fNext; + if (rec->fFontID == fontID) { + if (--rec->fRefCnt == 0) { + if (prev) + prev->fNext = next; + else + gFaceRecHead = next; + + SkDELETE(rec); + } + return; + } + prev = rec; + rec = next; + } + SkASSERT("shouldn't get here, face not in list"); +} + +#pragma mark - + +// have to do this because SkTypeface::SkTypeface() is protected +class SkTypeface_Mac : public SkTypeface { +public: + SkTypeface_Mac(SkTypeface::Style style, uint32_t id) : SkTypeface(style, id) {} + + ~SkTypeface_Mac() {} +}; + +#pragma mark - + +static SkTypeface* CreateTypeface_(const char *name, const SkTypeface::Style style) { + + OSStatus err; + ATSUStyle atsuStyle; + ::ATSUCreateStyle(&atsuStyle); + if (name != NULL) { + static const ATSUAttributeTag fontTag = kATSUFontTag; + static const ByteCount fontTagSize = sizeof(ATSUFontID); + + ATSUFontID fontID = 0; +#if 1 + err = ::ATSUFindFontFromName( + name,strlen(name),kFontNoNameCode, /* instead of regular, kFontFamilyName returns bold and/or italic sometimes, but why this works?? */ + kFontMacintoshPlatform,kFontNoScriptCode,kFontNoLanguageCode,&fontID); +#else + CFStringRef cfontName = CFStringCreateWithCString(NULL, name, kCFStringEncodingASCII); + ATSFontRef fontRef = ::ATSFontFindFromName(cfontName,kATSOptionFlagsDefault); + fontID = ::FMGetFontFromATSFontRef(fontRef); + CFRelease(cfontName); +#endif + if (0 != fontID) { + const ATSUAttributeValuePtr values[] = { &fontID }; + err = ::ATSUSetAttributes(atsuStyle,1,&fontTag,&fontTagSize,values); + } + else { + } + } + if (style != SkTypeface::kNormal) { + Boolean fontItalic = ((style & SkTypeface::kItalic) != 0); + Boolean fontBold = ((style & SkTypeface::kBold) != 0); + const ATSUAttributeTag tags[2] = { kATSUQDBoldfaceTag, kATSUQDItalicTag }; + const ATSUAttributeValuePtr values[2] = { &fontBold, &fontItalic }; + const ByteCount sizes[2] = { sizeof(Boolean), sizeof(Boolean) }; + err = ::ATSUSetAttributes(atsuStyle,2,tags,sizes,values); + } + + uint32_t cs = FontFaceChecksum(name,style); + SkTypeface_Mac* ptypeface = new SkTypeface_Mac(style,cs); + + if (NULL == ptypeface) { + SkASSERT(false); + return NULL; + } + + SkFaceRec* rec = insert_ft_face(cs, atsuStyle); + SkASSERT(rec); + + return ptypeface; +} + +static SkTypeface* CreateTypeface_(const SkFaceRec* rec, const SkTypeface::Style style) { + + OSStatus err; + ATSUStyle atsuStyle; + err = ::ATSUCreateAndCopyStyle(rec->fStyle, &atsuStyle); + + Boolean fontItalic = ((style & SkTypeface::kItalic) != 0); + Boolean fontBold = ((style & SkTypeface::kBold) != 0); + const ATSUAttributeTag tags[2] = { kATSUQDBoldfaceTag, kATSUQDItalicTag }; + const ATSUAttributeValuePtr values[2] = { &fontBold, &fontItalic }; + const ByteCount sizes[2] = { sizeof(Boolean), sizeof(Boolean) }; + err = ::ATSUSetAttributes(atsuStyle,2,tags,sizes,values); + + // get old font id and name + ATSUFontID fontID = 0; + ByteCount actual = 0; + err = ::ATSUGetAttribute(rec->fStyle,kATSUFontTag,sizeof(ATSUFontID),&fontID,&actual); + + ByteCount actualLength = 0; + char *fontname = NULL; + err = ::ATSUFindFontName(fontID , kFontFamilyName, kFontUnicodePlatform, kFontNoScriptCode, + kFontNoLanguageCode , 0 , NULL , &actualLength , NULL ); + if ( err == noErr) + { + actualLength += 1 ; + fontname = (char*)malloc( actualLength ); + err = ::ATSUFindFontName(fontID, kFontFamilyName, kFontUnicodePlatform, kFontNoScriptCode, + kFontNoLanguageCode, actualLength, fontname , NULL, NULL); + } + + SkTypeface_Mac* ptypeface = NULL; + if (fontname == NULL) { + ptypeface = new SkTypeface_Mac(style,rec->fFontID); + return ptypeface; + } + else { + uint32_t cs = FontFaceChecksum(fontname,style); + ptypeface = new SkTypeface_Mac(style, cs); + + if (NULL == ptypeface) { + SkASSERT(false); + return NULL; + } + + free(fontname); + + insert_ft_face(cs,atsuStyle); + } + return ptypeface; +} + +#pragma mark - + +class SkScalerContext_Mac : public SkScalerContext { +public: + SkScalerContext_Mac(const SkDescriptor* desc); + virtual ~SkScalerContext_Mac(); + +protected: + virtual unsigned generateGlyphCount() const; + virtual uint16_t generateCharToGlyph(SkUnichar uni); + virtual void generateAdvance(SkGlyph* glyph); + virtual void generateMetrics(SkGlyph* glyph); + virtual void generateImage(const SkGlyph& glyph); + virtual void generatePath(const SkGlyph& glyph, SkPath* path); + virtual void generateLineHeight(SkPoint* ascent, SkPoint* descent); + virtual void generateFontMetrics(SkPaint::FontMetrics* mX, SkPaint::FontMetrics* mY); +// virtual SkDeviceContext getDC() { return NULL; } // not implemented on Mac + +private: + ATSUTextLayout fLayout; + ATSUStyle fStyle; + CGColorSpaceRef fGrayColorSpace; + + static OSStatus MoveTo(const Float32Point *pt, void *cb); + static OSStatus Line(const Float32Point *pt, void *cb); + static OSStatus Curve(const Float32Point *pt1, const Float32Point *pt2, const Float32Point *pt3, void *cb); + static OSStatus Close(void *cb); +}; + +SkScalerContext_Mac::SkScalerContext_Mac(const SkDescriptor* desc) + : SkScalerContext(desc), fLayout(0), fStyle(0) +{ + SkAutoMutexAcquire ac(gFTMutex); + OSStatus err; + + SkFaceRec* rec = find_ft_face(fRec.fFontID); + if (rec) { + rec->ref(); + err = ::ATSUCreateAndCopyStyle(rec->fStyle, &fStyle); + } + else { + SkASSERT(false); + // create a default + err = ::ATSUCreateStyle(&fStyle); + } + + uint32_t size = SkScalarFloor(fRec.fTextSize); + Fixed fixedSize = IntToFixed(size); + static const ATSUAttributeTag sizeTag = kATSUSizeTag; + static const ByteCount sizeTagSize = sizeof(Fixed); + const ATSUAttributeValuePtr values[] = { &fixedSize }; + err = ::ATSUSetAttributes(fStyle,1,&sizeTag,&sizeTagSize,values); + + err = ::ATSUCreateTextLayout(&fLayout); + + fGrayColorSpace = ::CGColorSpaceCreateDeviceGray(); +} + +SkScalerContext_Mac::~SkScalerContext_Mac() +{ + ::CGColorSpaceRelease(fGrayColorSpace); + + unref_ft_face(fRec.fFontID); + + ::ATSUDisposeTextLayout(fLayout); + ::ATSUDisposeStyle(fStyle); +} + +unsigned SkScalerContext_Mac::generateGlyphCount() const +{ + return 0xFFFF; +} + +uint16_t SkScalerContext_Mac::generateCharToGlyph(SkUnichar uni) +{ + SkAutoMutexAcquire ac(gFTMutex); + + OSStatus err; + UniChar achar = uni; + err = ::ATSUSetTextPointerLocation(fLayout,&achar,0,1,1); + err = ::ATSUSetRunStyle(fLayout,fStyle,kATSUFromTextBeginning,kATSUToTextEnd); + + ATSLayoutRecord *layoutPtr; + ItemCount count; + ATSGlyphRef glyph; + + err = ::ATSUDirectGetLayoutDataArrayPtrFromTextLayout(fLayout,0,kATSUDirectDataLayoutRecordATSLayoutRecordCurrent,(void**)&layoutPtr,&count); + glyph = layoutPtr->glyphID; + ::ATSUDirectReleaseLayoutDataArrayPtr(NULL,kATSUDirectDataLayoutRecordATSLayoutRecordCurrent,(void**)&layoutPtr); + return glyph; +} + +static void set_glyph_metrics_on_error(SkGlyph* glyph) { + glyph->fRsbDelta = 0; + glyph->fLsbDelta = 0; + glyph->fWidth = 0; + glyph->fHeight = 0; + glyph->fTop = 0; + glyph->fLeft = 0; + glyph->fAdvanceX = 0; + glyph->fAdvanceY = 0; +} + +void SkScalerContext_Mac::generateAdvance(SkGlyph* glyph) { + this->generateMetrics(glyph); +} + +void SkScalerContext_Mac::generateMetrics(SkGlyph* glyph) { + GlyphID glyphID = glyph->getGlyphID(fBaseGlyphCount); + ATSGlyphScreenMetrics metrics; + + OSStatus err = ATSUGlyphGetScreenMetrics(fStyle, 1, &glyphID, 0, true, true, + &metrics); + if (noErr != err) { + set_glyph_metrics_on_error(glyph); + } else { + glyph->fAdvanceX = SkFloatToFixed(metrics.deviceAdvance.x); + glyph->fAdvanceY = -SkFloatToFixed(metrics.deviceAdvance.y); + glyph->fWidth = metrics.width; + glyph->fHeight = metrics.height; + glyph->fLeft = sk_float_round2int(metrics.topLeft.x); + glyph->fTop = -sk_float_round2int(metrics.topLeft.y); + } +} + +void SkScalerContext_Mac::generateFontMetrics(SkPaint::FontMetrics* mx, + SkPaint::FontMetrics* my) { +#if 0 + OSStatus ATSFontGetVerticalMetrics ( + ATSFontRef iFont, + ATSOptionFlags iOptions, + ATSFontMetrics *oMetrics + ); +#endif + //SkASSERT(false); + if (mx) + memset(mx, 0, sizeof(SkPaint::FontMetrics)); + if (my) + memset(my, 0, sizeof(SkPaint::FontMetrics)); + return; +} + +void SkScalerContext_Mac::generateImage(const SkGlyph& glyph) +{ + SkAutoMutexAcquire ac(gFTMutex); + SkASSERT(fLayout); + OSStatus err; + + bzero(glyph.fImage, glyph.fHeight * glyph.rowBytes()); + CGContextRef contextRef = ::CGBitmapContextCreate(glyph.fImage, + glyph.fWidth, glyph.fHeight, 8, + glyph.rowBytes(), fGrayColorSpace, + kCGImageAlphaNone); + if (!contextRef) { + SkASSERT(false); + return; + } + + ::CGContextSetGrayFillColor(contextRef, 1.0, 1.0); + ::CGContextSetTextDrawingMode(contextRef, kCGTextFill); + + ATSUAttributeTag tag = kATSUCGContextTag; + ByteCount size = sizeof(CGContextRef); + ATSUAttributeValuePtr value = &contextRef; + err = ::ATSUSetLayoutControls(fLayout, 1, &tag, &size, &value); + SkASSERT(!err); + err = ::ATSUDrawText(fLayout, kATSUFromTextBeginning, kATSUToTextEnd, + SkIntToFixed(-glyph.fLeft), + SkIntToFixed(glyph.fTop + glyph.fHeight)); + SkASSERT(!err); + ::CGContextRelease(contextRef); +} + +void SkScalerContext_Mac::generatePath(const SkGlyph& glyph, SkPath* path) +{ + SkAutoMutexAcquire ac(gFTMutex); + OSStatus err,result; + + err = ::ATSUGlyphGetCubicPaths( + fStyle,glyph.fID, + &SkScalerContext_Mac::MoveTo, + &SkScalerContext_Mac::Line, + &SkScalerContext_Mac::Curve, + &SkScalerContext_Mac::Close, + path,&result); + SkASSERT(err == noErr); +} + +void SkScalerContext_Mac::generateLineHeight(SkPoint* ascent, SkPoint* descent) +{ + ATSUTextMeasurement textAscent, textDescent; + ByteCount actual = 0; + OSStatus err = ::ATSUGetAttribute(fStyle,kATSULineAscentTag,sizeof(ATSUTextMeasurement),&textAscent,&actual); + ascent->set(0,textAscent); + err = ::ATSUGetAttribute(fStyle,kATSULineDescentTag,sizeof(ATSUTextMeasurement),&textDescent,&actual); + descent->set(0,textDescent); +} + +OSStatus SkScalerContext_Mac::MoveTo(const Float32Point *pt, void *cb) +{ + reinterpret_cast<SkPath*>(cb)->moveTo(F32PtToSkPoint(*pt)); + return noErr; +} + +OSStatus SkScalerContext_Mac::Line(const Float32Point *pt, void *cb) +{ + reinterpret_cast<SkPath*>(cb)->lineTo(F32PtToSkPoint(*pt)); + return noErr; +} + +OSStatus SkScalerContext_Mac::Curve(const Float32Point *pt1, + const Float32Point *pt2, + const Float32Point *pt3, void *cb) +{ + reinterpret_cast<SkPath*>(cb)->cubicTo(F32PtToSkPoint(*pt1), + F32PtToSkPoint(*pt2), + F32PtToSkPoint(*pt3)); + return noErr; +} + +OSStatus SkScalerContext_Mac::Close(void *cb) +{ + reinterpret_cast<SkPath*>(cb)->close(); + return noErr; +} + +#pragma mark - + +void SkFontHost::Serialize(const SkTypeface* face, SkWStream* stream) { + SkASSERT(!"SkFontHost::Serialize unimplemented"); +} + +SkTypeface* SkFontHost::Deserialize(SkStream* stream) { + SkASSERT(!"SkFontHost::Deserialize unimplemented"); + return NULL; +} + +SkTypeface* SkFontHost::CreateTypeface(SkStream* stream) { + + //Should not be used on Mac, keep linker happy + SkASSERT(false); + return CreateTypeface_(gDefaultfont,SkTypeface::kNormal); +} + +SkTypeface* SkFontHost::CreateTypefaceFromFile(const char path[]) { + // TODO + return CreateTypeface_(gDefaultfont,SkTypeface::kNormal); +} + +SkScalerContext* SkFontHost::CreateScalerContext(const SkDescriptor* desc) +{ + return new SkScalerContext_Mac(desc); +} + +SkScalerContext* SkFontHost::CreateFallbackScalerContext(const SkScalerContext::Rec& rec) +{ + SkAutoDescriptor ad(sizeof(rec) + sizeof(gDefaultfont) + SkDescriptor::ComputeOverhead(2)); + SkDescriptor* desc = ad.getDesc(); + + desc->init(); + SkScalerContext::Rec* newRec = + (SkScalerContext::Rec*)desc->addEntry(kRec_SkDescriptorTag, sizeof(rec), &rec); + + CreateTypeface_(gDefaultfont,SkTypeface::kNormal); + newRec->fFontID = FontFaceChecksum(gDefaultfont,SkTypeface::kNormal); + desc->computeChecksum(); + + return SkFontHost::CreateScalerContext(desc); +} + + + /** Return the closest matching typeface given either an existing family + (specified by a typeface in that family) or by a familyName, and a + requested style. + 1) If familyFace is null, use famillyName. + 2) If famillyName is null, use familyFace. + 3) If both are null, return the default font that best matches style + This MUST not return NULL. + */ + +SkTypeface* SkFontHost::FindTypeface(const SkTypeface* familyFace, const char familyName[], SkTypeface::Style style) { + + SkAutoMutexAcquire ac(gFTMutex); + + // clip to legal style bits + style = (SkTypeface::Style)(style & SkTypeface::kBoldItalic); + + SkTypeface* tf = NULL; + + if (NULL == familyFace && NULL == familyName) { + tf = CreateTypeface_(gDefaultfont,style); + } + else { + if (NULL != familyFace) { + uint32_t id = familyFace->uniqueID(); + SkFaceRec* rec = find_ft_face(id); + if (!rec) { + SkASSERT(false); + tf = CreateTypeface_(gDefaultfont,style); + } + else { + tf = CreateTypeface_(rec,style); + } + } + else { + tf = CreateTypeface_(familyName,style); + } + } + + if (NULL == tf) { + tf = CreateTypeface_(gDefaultfont,style); + } + return tf; + +} + +size_t SkFontHost::ShouldPurgeFontCache(size_t sizeAllocatedSoFar) { + if (sizeAllocatedSoFar > FONT_CACHE_MEMORY_BUDGET) + return sizeAllocatedSoFar - FONT_CACHE_MEMORY_BUDGET; + else + return 0; // nothing to do +} + +int SkFontHost::ComputeGammaFlag(const SkPaint& paint) { + return 0; +} + +void SkFontHost::GetGammaTables(const uint8_t* tables[2]) { + tables[0] = NULL; // black gamma (e.g. exp=1.4) + tables[1] = NULL; // white gamma (e.g. exp= 1/1.4) +} + diff --git a/libsgl/ports/SkFontHost_none.cpp b/src/ports/SkFontHost_none.cpp index b45cf16..09854ae 100644 --- a/libsgl/ports/SkFontHost_none.cpp +++ b/src/ports/SkFontHost_none.cpp @@ -41,6 +41,11 @@ SkTypeface* SkFontHost::CreateTypeface(SkStream*) { return NULL; } +SkTypeface* SkFontHost::CreateTypefaceFromFile(char const*) { + SkASSERT(!"SkFontHost::CreateTypefaceFromFile unimplemented"); + return NULL; +} + /////////////////////////////////////////////////////////////////////////////// void SkFontHost::Serialize(const SkTypeface* face, SkWStream* stream) { @@ -65,6 +70,7 @@ SkScalerContext* SkFontHost::CreateFallbackScalerContext( return NULL; } + /////////////////////////////////////////////////////////////////////////////// size_t SkFontHost::ShouldPurgeFontCache(size_t sizeAllocatedSoFar) { diff --git a/libsgl/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index c2ee51e..c2ee51e 100644 --- a/libsgl/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp diff --git a/libsgl/ports/SkGlobals_global.cpp b/src/ports/SkGlobals_global.cpp index d87568b..d87568b 100644 --- a/libsgl/ports/SkGlobals_global.cpp +++ b/src/ports/SkGlobals_global.cpp diff --git a/src/ports/SkImageDecoder_CG.cpp b/src/ports/SkImageDecoder_CG.cpp new file mode 100644 index 0000000..5594eac --- /dev/null +++ b/src/ports/SkImageDecoder_CG.cpp @@ -0,0 +1,196 @@ +/* Copyright 2008, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +#include <Carbon/Carbon.h> +#include "SkImageDecoder.h" +#include "SkImageEncoder.h" +#include "SkMovie.h" +#include "SkStream.h" +#include "SkTemplates.h" + +static void malloc_release_proc(void* info, const void* data, size_t size) { + sk_free(info); +} + +static CGDataProviderRef SkStreamToDataProvider(SkStream* stream) { + // TODO: use callbacks, so we don't have to load all the data into RAM + size_t len = stream->getLength(); + void* data = sk_malloc_throw(len); + stream->read(data, len); + + return CGDataProviderCreateWithData(data, data, len, malloc_release_proc); +} + +static CGImageSourceRef SkStreamToCGImageSource(SkStream* stream) { + CGDataProviderRef data = SkStreamToDataProvider(stream); + CGImageSourceRef imageSrc = CGImageSourceCreateWithDataProvider(data, 0); + CGDataProviderRelease(data); + return imageSrc; +} + +class SkImageDecoder_CG : public SkImageDecoder { +protected: + virtual bool onDecode(SkStream* stream, SkBitmap* bm, + SkBitmap::Config pref, Mode); +}; + +#define BITMAP_INFO (kCGBitmapByteOrder32Big | kCGImageAlphaPremultipliedLast) + +bool SkImageDecoder_CG::onDecode(SkStream* stream, SkBitmap* bm, + SkBitmap::Config pref, Mode mode) { + CGImageSourceRef imageSrc = SkStreamToCGImageSource(stream); + + if (NULL == imageSrc) { + return false; + } + SkAutoTCallVProc<const void, CFRelease> arsrc(imageSrc); + + CGImageRef image = CGImageSourceCreateImageAtIndex(imageSrc, 0, NULL); + if (NULL == image) { + return false; + } + SkAutoTCallVProc<CGImage, CGImageRelease> arimage(image); + + const int width = CGImageGetWidth(image); + const int height = CGImageGetHeight(image); + bm->setConfig(SkBitmap::kARGB_8888_Config, width, height); + if (SkImageDecoder::kDecodeBounds_Mode == mode) { + return true; + } + + if (!this->allocPixelRef(bm, NULL)) { + return false; + } + + bm->lockPixels(); + bm->eraseColor(0); + + CGColorSpaceRef cs = CGColorSpaceCreateDeviceRGB(); + CGContextRef cg = CGBitmapContextCreate(bm->getPixels(), width, height, + 8, bm->rowBytes(), cs, BITMAP_INFO); + CGContextDrawImage(cg, CGRectMake(0, 0, width, height), image); + CGContextRelease(cg); + CGColorSpaceRelease(cs); + + bm->unlockPixels(); + return true; +} + +/////////////////////////////////////////////////////////////////////////////// + +SkImageDecoder* SkImageDecoder::Factory(SkStream* stream) { + return SkNEW(SkImageDecoder_CG); +} + +bool SkImageDecoder::SupportsFormat(Format format) { + return true; +} + +///////////////////////////////////////////////////////////////////////// + +SkMovie* SkMovie::DecodeStream(SkStream* stream) { + return NULL; +} + +///////////////////////////////////////////////////////////////////////// + +static size_t consumer_put(void* info, const void* buffer, size_t count) { + SkWStream* stream = reinterpret_cast<SkWStream*>(info); + return stream->write(buffer, count) ? count : 0; +} + +static void consumer_release(void* info) { + // we do nothing, since by design we don't "own" the stream (i.e. info) +} + +static CGDataConsumerRef SkStreamToCGDataConsumer(SkWStream* stream) { + CGDataConsumerCallbacks procs; + procs.putBytes = consumer_put; + procs.releaseConsumer = consumer_release; + // we don't own/reference the stream, so it our consumer must not live + // longer that our caller's ownership of the stream + return CGDataConsumerCreate(stream, &procs); +} + +static CGImageDestinationRef SkStreamToImageDestination(SkWStream* stream, + CFStringRef type) { + CGDataConsumerRef consumer = SkStreamToCGDataConsumer(stream); + if (NULL == consumer) { + return NULL; + } + SkAutoTCallVProc<const void, CFRelease> arconsumer(consumer); + + return CGImageDestinationCreateWithDataConsumer(consumer, type, 1, NULL); +} + +class SkImageEncoder_CG : public SkImageEncoder { +public: + SkImageEncoder_CG(Type t) : fType(t) {} + +protected: + virtual bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality); + +private: + Type fType; +}; + +extern CGImageRef SkCreateCGImageRef(const SkBitmap&); + +/* Encode bitmaps via CGImageDestination. We setup a DataConsumer which writes + to our SkWStream. Since we don't reference/own the SkWStream, our consumer + must only live for the duration of the onEncode() method. + */ +bool SkImageEncoder_CG::onEncode(SkWStream* stream, const SkBitmap& bm, + int quality) { + CFStringRef type; + switch (fType) { + case kJPEG_Type: + type = kUTTypeJPEG; + break; + case kPNG_Type: + type = kUTTypePNG; + break; + default: + return false; + } + + CGImageDestinationRef dst = SkStreamToImageDestination(stream, type); + if (NULL == dst) { + return false; + } + SkAutoTCallVProc<const void, CFRelease> ardst(dst); + + CGImageRef image = SkCreateCGImageRef(bm); + if (NULL == image) { + return false; + } + SkAutoTCallVProc<CGImage, CGImageRelease> agimage(image); + + CGImageDestinationAddImage(dst, image, NULL); + CGImageDestinationFinalize(dst); + return true; +} + +SkImageEncoder* SkImageEncoder::Create(Type t) { + switch (t) { + case kJPEG_Type: + case kPNG_Type: + break; + default: + return NULL; + } + return SkNEW_ARGS(SkImageEncoder_CG, (t)); +} + diff --git a/src/ports/SkImageDecoder_Factory.cpp b/src/ports/SkImageDecoder_Factory.cpp new file mode 100644 index 0000000..5c45a43 --- /dev/null +++ b/src/ports/SkImageDecoder_Factory.cpp @@ -0,0 +1,85 @@ +/* libs/graphics/ports/SkImageDecoder_Factory.cpp +** +** Copyright 2006, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +#include "SkImageDecoder.h" +#include "SkMovie.h" +#include "SkStream.h" + +extern SkImageDecoder* SkImageDecoder_GIF_Factory(SkStream*); +extern SkImageDecoder* SkImageDecoder_BMP_Factory(SkStream*); +extern SkImageDecoder* SkImageDecoder_ICO_Factory(SkStream*); +extern SkImageDecoder* SkImageDecoder_PNG_Factory(SkStream*); +extern SkImageDecoder* SkImageDecoder_WBMP_Factory(SkStream*); +extern SkImageDecoder* SkImageDecoder_JPEG_Factory(SkStream*); + +typedef SkImageDecoder* (*SkImageDecoderFactoryProc)(SkStream*); + +struct CodecFormat { + SkImageDecoderFactoryProc fProc; + SkImageDecoder::Format fFormat; +}; + +static const CodecFormat gPairs[] = { + { SkImageDecoder_GIF_Factory, SkImageDecoder::kGIF_Format }, + { SkImageDecoder_PNG_Factory, SkImageDecoder::kPNG_Format }, + { SkImageDecoder_ICO_Factory, SkImageDecoder::kICO_Format }, + { SkImageDecoder_WBMP_Factory, SkImageDecoder::kWBMP_Format }, + { SkImageDecoder_BMP_Factory, SkImageDecoder::kBMP_Format }, + { SkImageDecoder_JPEG_Factory, SkImageDecoder::kJPEG_Format } +}; + +SkImageDecoder* SkImageDecoder::Factory(SkStream* stream) { + for (size_t i = 0; i < SK_ARRAY_COUNT(gPairs); i++) { + SkImageDecoder* codec = gPairs[i].fProc(stream); + stream->rewind(); + if (NULL != codec) { + return codec; + } + } + return NULL; +} + +bool SkImageDecoder::SupportsFormat(Format format) { + for (size_t i = 0; i < SK_ARRAY_COUNT(gPairs); i++) { + if (gPairs[i].fFormat == format) { + return true; + } + } + return false; +} + +///////////////////////////////////////////////////////////////////////// + +typedef SkMovie* (*SkMovieFactoryProc)(SkStream*); + +extern SkMovie* SkMovie_GIF_Factory(SkStream*); + +static const SkMovieFactoryProc gMovieProcs[] = { + SkMovie_GIF_Factory +}; + +SkMovie* SkMovie::DecodeStream(SkStream* stream) { + for (unsigned i = 0; i < SK_ARRAY_COUNT(gMovieProcs); i++) { + SkMovie* movie = gMovieProcs[i](stream); + if (NULL != movie) { + return movie; + } + stream->rewind(); + } + return NULL; +} + diff --git a/libsgl/ports/SkImageDecoder_Factory.cpp b/src/ports/SkImageDecoder_empty.cpp index d0053cf..740af7d 100644 --- a/libsgl/ports/SkImageDecoder_Factory.cpp +++ b/src/ports/SkImageDecoder_empty.cpp @@ -34,12 +34,14 @@ struct CodecFormat { }; static const CodecFormat gPairs[] = { +#if 0 { SkImageDecoder_GIF_Factory, SkImageDecoder::kGIF_Format }, { SkImageDecoder_PNG_Factory, SkImageDecoder::kPNG_Format }, { SkImageDecoder_ICO_Factory, SkImageDecoder::kICO_Format }, { SkImageDecoder_WBMP_Factory, SkImageDecoder::kWBMP_Format }, { SkImageDecoder_BMP_Factory, SkImageDecoder::kBMP_Format }, { SkImageDecoder_JPEG_Factory, SkImageDecoder::kJPEG_Format } +#endif }; SkImageDecoder* SkImageDecoder::Factory(SkStream* stream) { @@ -69,7 +71,9 @@ typedef SkMovie* (*SkMovieFactoryProc)(SkStream*); extern SkMovie* SkMovie_GIF_Factory(SkStream*); static const SkMovieFactoryProc gMovieProcs[] = { +#if 0 SkMovie_GIF_Factory +#endif }; SkMovie* SkMovie::DecodeStream(SkStream* stream) { @@ -85,20 +89,19 @@ SkMovie* SkMovie::DecodeStream(SkStream* stream) { ///////////////////////////////////////////////////////////////////////// -#ifdef SK_SUPPORT_IMAGE_ENCODE - extern SkImageEncoder* SkImageEncoder_JPEG_Factory(); extern SkImageEncoder* SkImageEncoder_PNG_Factory(); SkImageEncoder* SkImageEncoder::Create(Type t) { switch (t) { +#if 0 case kJPEG_Type: return SkImageEncoder_JPEG_Factory(); case kPNG_Type: return SkImageEncoder_PNG_Factory(); +#endif default: return NULL; } } -#endif diff --git a/src/ports/SkImageEncoder_Factory.cpp b/src/ports/SkImageEncoder_Factory.cpp new file mode 100644 index 0000000..cdd7c04 --- /dev/null +++ b/src/ports/SkImageEncoder_Factory.cpp @@ -0,0 +1,32 @@ +/* + * Copyright 2009, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "SkImageEncoder.h" + +extern SkImageEncoder* SkImageEncoder_JPEG_Factory(); +extern SkImageEncoder* SkImageEncoder_PNG_Factory(); + +SkImageEncoder* SkImageEncoder::Create(Type t) { + switch (t) { + case kJPEG_Type: + return SkImageEncoder_JPEG_Factory(); + case kPNG_Type: + return SkImageEncoder_PNG_Factory(); + default: + return NULL; + } +} + diff --git a/libsgl/ports/SkImageRef_ashmem.cpp b/src/ports/SkImageRef_ashmem.cpp index a904bae..a904bae 100644 --- a/libsgl/ports/SkImageRef_ashmem.cpp +++ b/src/ports/SkImageRef_ashmem.cpp diff --git a/libsgl/ports/SkImageRef_ashmem.h b/src/ports/SkImageRef_ashmem.h index 193a01d..193a01d 100644 --- a/libsgl/ports/SkImageRef_ashmem.h +++ b/src/ports/SkImageRef_ashmem.h diff --git a/libsgl/ports/SkOSEvent_android.cpp b/src/ports/SkOSEvent_android.cpp index 59d6191..59d6191 100644 --- a/libsgl/ports/SkOSEvent_android.cpp +++ b/src/ports/SkOSEvent_android.cpp diff --git a/libsgl/ports/SkOSEvent_dummy.cpp b/src/ports/SkOSEvent_dummy.cpp index f061b6e..f061b6e 100644 --- a/libsgl/ports/SkOSEvent_dummy.cpp +++ b/src/ports/SkOSEvent_dummy.cpp diff --git a/libsgl/ports/SkOSFile_stdio.cpp b/src/ports/SkOSFile_stdio.cpp index 7438f7b..7438f7b 100644 --- a/libsgl/ports/SkOSFile_stdio.cpp +++ b/src/ports/SkOSFile_stdio.cpp diff --git a/libsgl/ports/SkThread_none.cpp b/src/ports/SkThread_none.cpp index 37a3834..37a3834 100644 --- a/libsgl/ports/SkThread_none.cpp +++ b/src/ports/SkThread_none.cpp diff --git a/libsgl/ports/SkThread_pthread.cpp b/src/ports/SkThread_pthread.cpp index 4ee857d..4ee857d 100644 --- a/libsgl/ports/SkThread_pthread.cpp +++ b/src/ports/SkThread_pthread.cpp diff --git a/libsgl/ports/SkThread_win.cpp b/src/ports/SkThread_win.cpp index d3f3e21..d3f3e21 100644 --- a/libsgl/ports/SkThread_win.cpp +++ b/src/ports/SkThread_win.cpp diff --git a/libsgl/ports/SkTime_Unix.cpp b/src/ports/SkTime_Unix.cpp index 1bf3a76..1bf3a76 100644 --- a/libsgl/ports/SkTime_Unix.cpp +++ b/src/ports/SkTime_Unix.cpp diff --git a/libsgl/ports/SkXMLParser_empty.cpp b/src/ports/SkXMLParser_empty.cpp index 9a27306..9a27306 100644 --- a/libsgl/ports/SkXMLParser_empty.cpp +++ b/src/ports/SkXMLParser_empty.cpp diff --git a/libsgl/ports/SkXMLParser_expat.cpp b/src/ports/SkXMLParser_expat.cpp index 7694d50..7694d50 100644 --- a/libsgl/ports/SkXMLParser_expat.cpp +++ b/src/ports/SkXMLParser_expat.cpp diff --git a/libsgl/ports/SkXMLParser_tinyxml.cpp b/src/ports/SkXMLParser_tinyxml.cpp index 7f57b80..7f57b80 100644 --- a/libsgl/ports/SkXMLParser_tinyxml.cpp +++ b/src/ports/SkXMLParser_tinyxml.cpp diff --git a/libsgl/ports/SkXMLPullParser_expat.cpp b/src/ports/SkXMLPullParser_expat.cpp index 949c7a9..949c7a9 100644 --- a/libsgl/ports/SkXMLPullParser_expat.cpp +++ b/src/ports/SkXMLPullParser_expat.cpp diff --git a/libsgl/ports/sk_predefined_gamma.h b/src/ports/sk_predefined_gamma.h index 0818b30..0818b30 100644 --- a/libsgl/ports/sk_predefined_gamma.h +++ b/src/ports/sk_predefined_gamma.h diff --git a/libsgl/svg/SkSVG.cpp b/src/svg/SkSVG.cpp index bcd62bf..bcd62bf 100644 --- a/libsgl/svg/SkSVG.cpp +++ b/src/svg/SkSVG.cpp diff --git a/libsgl/svg/SkSVGCircle.cpp b/src/svg/SkSVGCircle.cpp index d27521d..d27521d 100644 --- a/libsgl/svg/SkSVGCircle.cpp +++ b/src/svg/SkSVGCircle.cpp diff --git a/libsgl/svg/SkSVGCircle.h b/src/svg/SkSVGCircle.h index 343a367..343a367 100644 --- a/libsgl/svg/SkSVGCircle.h +++ b/src/svg/SkSVGCircle.h diff --git a/libsgl/svg/SkSVGClipPath.cpp b/src/svg/SkSVGClipPath.cpp index bd71429..bd71429 100644 --- a/libsgl/svg/SkSVGClipPath.cpp +++ b/src/svg/SkSVGClipPath.cpp diff --git a/libsgl/svg/SkSVGClipPath.h b/src/svg/SkSVGClipPath.h index 6fa17b8..6fa17b8 100644 --- a/libsgl/svg/SkSVGClipPath.h +++ b/src/svg/SkSVGClipPath.h diff --git a/libsgl/svg/SkSVGDefs.cpp b/src/svg/SkSVGDefs.cpp index 0499075..0499075 100644 --- a/libsgl/svg/SkSVGDefs.cpp +++ b/src/svg/SkSVGDefs.cpp diff --git a/libsgl/svg/SkSVGDefs.h b/src/svg/SkSVGDefs.h index 45f0106..45f0106 100644 --- a/libsgl/svg/SkSVGDefs.h +++ b/src/svg/SkSVGDefs.h diff --git a/libsgl/svg/SkSVGElements.cpp b/src/svg/SkSVGElements.cpp index 8e195c7..8e195c7 100644 --- a/libsgl/svg/SkSVGElements.cpp +++ b/src/svg/SkSVGElements.cpp diff --git a/libsgl/svg/SkSVGElements.h b/src/svg/SkSVGElements.h index ed3f921..ed3f921 100644 --- a/libsgl/svg/SkSVGElements.h +++ b/src/svg/SkSVGElements.h diff --git a/libsgl/svg/SkSVGEllipse.cpp b/src/svg/SkSVGEllipse.cpp index 3752b83..3752b83 100644 --- a/libsgl/svg/SkSVGEllipse.cpp +++ b/src/svg/SkSVGEllipse.cpp diff --git a/libsgl/svg/SkSVGEllipse.h b/src/svg/SkSVGEllipse.h index 566f16c..566f16c 100644 --- a/libsgl/svg/SkSVGEllipse.h +++ b/src/svg/SkSVGEllipse.h diff --git a/libsgl/svg/SkSVGFeColorMatrix.cpp b/src/svg/SkSVGFeColorMatrix.cpp index a758704..a758704 100644 --- a/libsgl/svg/SkSVGFeColorMatrix.cpp +++ b/src/svg/SkSVGFeColorMatrix.cpp diff --git a/libsgl/svg/SkSVGFeColorMatrix.h b/src/svg/SkSVGFeColorMatrix.h index 431d532..431d532 100644 --- a/libsgl/svg/SkSVGFeColorMatrix.h +++ b/src/svg/SkSVGFeColorMatrix.h diff --git a/libsgl/svg/SkSVGFilter.cpp b/src/svg/SkSVGFilter.cpp index 1d32e56..1d32e56 100644 --- a/libsgl/svg/SkSVGFilter.cpp +++ b/src/svg/SkSVGFilter.cpp diff --git a/libsgl/svg/SkSVGFilter.h b/src/svg/SkSVGFilter.h index 6ec9bd5..6ec9bd5 100644 --- a/libsgl/svg/SkSVGFilter.h +++ b/src/svg/SkSVGFilter.h diff --git a/libsgl/svg/SkSVGG.cpp b/src/svg/SkSVGG.cpp index f73b8b8..f73b8b8 100644 --- a/libsgl/svg/SkSVGG.cpp +++ b/src/svg/SkSVGG.cpp diff --git a/libsgl/svg/SkSVGG.h b/src/svg/SkSVGG.h index 4c5c68a..4c5c68a 100644 --- a/libsgl/svg/SkSVGG.h +++ b/src/svg/SkSVGG.h diff --git a/libsgl/svg/SkSVGGradient.cpp b/src/svg/SkSVGGradient.cpp index c89bdc9..c89bdc9 100644 --- a/libsgl/svg/SkSVGGradient.cpp +++ b/src/svg/SkSVGGradient.cpp diff --git a/libsgl/svg/SkSVGGradient.h b/src/svg/SkSVGGradient.h index 873b258..873b258 100644 --- a/libsgl/svg/SkSVGGradient.h +++ b/src/svg/SkSVGGradient.h diff --git a/libsgl/svg/SkSVGGroup.cpp b/src/svg/SkSVGGroup.cpp index 069aa56..069aa56 100644 --- a/libsgl/svg/SkSVGGroup.cpp +++ b/src/svg/SkSVGGroup.cpp diff --git a/libsgl/svg/SkSVGGroup.h b/src/svg/SkSVGGroup.h index 2e34cbb..2e34cbb 100644 --- a/libsgl/svg/SkSVGGroup.h +++ b/src/svg/SkSVGGroup.h diff --git a/libsgl/svg/SkSVGImage.cpp b/src/svg/SkSVGImage.cpp index b641c9f..b641c9f 100644 --- a/libsgl/svg/SkSVGImage.cpp +++ b/src/svg/SkSVGImage.cpp diff --git a/libsgl/svg/SkSVGImage.h b/src/svg/SkSVGImage.h index 2f73b0d..2f73b0d 100644 --- a/libsgl/svg/SkSVGImage.h +++ b/src/svg/SkSVGImage.h diff --git a/libsgl/svg/SkSVGLine.cpp b/src/svg/SkSVGLine.cpp index 105822a..105822a 100644 --- a/libsgl/svg/SkSVGLine.cpp +++ b/src/svg/SkSVGLine.cpp diff --git a/libsgl/svg/SkSVGLine.h b/src/svg/SkSVGLine.h index f2cfce9..f2cfce9 100644 --- a/libsgl/svg/SkSVGLine.h +++ b/src/svg/SkSVGLine.h diff --git a/libsgl/svg/SkSVGLinearGradient.cpp b/src/svg/SkSVGLinearGradient.cpp index a474d15..a474d15 100644 --- a/libsgl/svg/SkSVGLinearGradient.cpp +++ b/src/svg/SkSVGLinearGradient.cpp diff --git a/libsgl/svg/SkSVGLinearGradient.h b/src/svg/SkSVGLinearGradient.h index 85e28e7..85e28e7 100644 --- a/libsgl/svg/SkSVGLinearGradient.h +++ b/src/svg/SkSVGLinearGradient.h diff --git a/libsgl/svg/SkSVGMask.cpp b/src/svg/SkSVGMask.cpp index eb93118..eb93118 100644 --- a/libsgl/svg/SkSVGMask.cpp +++ b/src/svg/SkSVGMask.cpp diff --git a/libsgl/svg/SkSVGMask.h b/src/svg/SkSVGMask.h index 6e349b4..6e349b4 100644 --- a/libsgl/svg/SkSVGMask.h +++ b/src/svg/SkSVGMask.h diff --git a/libsgl/svg/SkSVGMetadata.cpp b/src/svg/SkSVGMetadata.cpp index 7c9e6ba..7c9e6ba 100644 --- a/libsgl/svg/SkSVGMetadata.cpp +++ b/src/svg/SkSVGMetadata.cpp diff --git a/libsgl/svg/SkSVGMetadata.h b/src/svg/SkSVGMetadata.h index f3b5b6c..f3b5b6c 100644 --- a/libsgl/svg/SkSVGMetadata.h +++ b/src/svg/SkSVGMetadata.h diff --git a/libsgl/svg/SkSVGPaintState.cpp b/src/svg/SkSVGPaintState.cpp index 7fc90c7..7fc90c7 100644 --- a/libsgl/svg/SkSVGPaintState.cpp +++ b/src/svg/SkSVGPaintState.cpp diff --git a/libsgl/svg/SkSVGParser.cpp b/src/svg/SkSVGParser.cpp index b55c5ed..b55c5ed 100644 --- a/libsgl/svg/SkSVGParser.cpp +++ b/src/svg/SkSVGParser.cpp diff --git a/libsgl/svg/SkSVGPath.cpp b/src/svg/SkSVGPath.cpp index a916c30..a916c30 100644 --- a/libsgl/svg/SkSVGPath.cpp +++ b/src/svg/SkSVGPath.cpp diff --git a/libsgl/svg/SkSVGPath.h b/src/svg/SkSVGPath.h index 8a0c210..8a0c210 100644 --- a/libsgl/svg/SkSVGPath.h +++ b/src/svg/SkSVGPath.h diff --git a/libsgl/svg/SkSVGPolygon.cpp b/src/svg/SkSVGPolygon.cpp index 283422c..283422c 100644 --- a/libsgl/svg/SkSVGPolygon.cpp +++ b/src/svg/SkSVGPolygon.cpp diff --git a/libsgl/svg/SkSVGPolygon.h b/src/svg/SkSVGPolygon.h index 1f27c5c..1f27c5c 100644 --- a/libsgl/svg/SkSVGPolygon.h +++ b/src/svg/SkSVGPolygon.h diff --git a/libsgl/svg/SkSVGPolyline.cpp b/src/svg/SkSVGPolyline.cpp index 8432c95..8432c95 100644 --- a/libsgl/svg/SkSVGPolyline.cpp +++ b/src/svg/SkSVGPolyline.cpp diff --git a/libsgl/svg/SkSVGPolyline.h b/src/svg/SkSVGPolyline.h index 7f25129..7f25129 100644 --- a/libsgl/svg/SkSVGPolyline.h +++ b/src/svg/SkSVGPolyline.h diff --git a/libsgl/svg/SkSVGRadialGradient.cpp b/src/svg/SkSVGRadialGradient.cpp index bba8b94..bba8b94 100644 --- a/libsgl/svg/SkSVGRadialGradient.cpp +++ b/src/svg/SkSVGRadialGradient.cpp diff --git a/libsgl/svg/SkSVGRadialGradient.h b/src/svg/SkSVGRadialGradient.h index 5b04186..5b04186 100644 --- a/libsgl/svg/SkSVGRadialGradient.h +++ b/src/svg/SkSVGRadialGradient.h diff --git a/libsgl/svg/SkSVGRect.cpp b/src/svg/SkSVGRect.cpp index 03fdfdc..03fdfdc 100644 --- a/libsgl/svg/SkSVGRect.cpp +++ b/src/svg/SkSVGRect.cpp diff --git a/libsgl/svg/SkSVGRect.h b/src/svg/SkSVGRect.h index d06372b..d06372b 100644 --- a/libsgl/svg/SkSVGRect.h +++ b/src/svg/SkSVGRect.h diff --git a/libsgl/svg/SkSVGSVG.cpp b/src/svg/SkSVGSVG.cpp index 1678fc1..1678fc1 100644 --- a/libsgl/svg/SkSVGSVG.cpp +++ b/src/svg/SkSVGSVG.cpp diff --git a/libsgl/svg/SkSVGSVG.h b/src/svg/SkSVGSVG.h index f331ccd..f331ccd 100644 --- a/libsgl/svg/SkSVGSVG.h +++ b/src/svg/SkSVGSVG.h diff --git a/libsgl/svg/SkSVGStop.cpp b/src/svg/SkSVGStop.cpp index 0d1d76c..0d1d76c 100644 --- a/libsgl/svg/SkSVGStop.cpp +++ b/src/svg/SkSVGStop.cpp diff --git a/libsgl/svg/SkSVGStop.h b/src/svg/SkSVGStop.h index dd11d18..dd11d18 100644 --- a/libsgl/svg/SkSVGStop.h +++ b/src/svg/SkSVGStop.h diff --git a/libsgl/svg/SkSVGSymbol.cpp b/src/svg/SkSVGSymbol.cpp index f8729d7..f8729d7 100644 --- a/libsgl/svg/SkSVGSymbol.cpp +++ b/src/svg/SkSVGSymbol.cpp diff --git a/libsgl/svg/SkSVGSymbol.h b/src/svg/SkSVGSymbol.h index c1439dc..c1439dc 100644 --- a/libsgl/svg/SkSVGSymbol.h +++ b/src/svg/SkSVGSymbol.h diff --git a/libsgl/svg/SkSVGText.cpp b/src/svg/SkSVGText.cpp index 1c18a74..1c18a74 100644 --- a/libsgl/svg/SkSVGText.cpp +++ b/src/svg/SkSVGText.cpp diff --git a/libsgl/svg/SkSVGText.h b/src/svg/SkSVGText.h index 98b0155..98b0155 100644 --- a/libsgl/svg/SkSVGText.h +++ b/src/svg/SkSVGText.h diff --git a/libsgl/svg/SkSVGUse.cpp b/src/svg/SkSVGUse.cpp index ba7b256..ba7b256 100644 --- a/libsgl/svg/SkSVGUse.cpp +++ b/src/svg/SkSVGUse.cpp diff --git a/libsgl/svg/SkSVGUse.h b/src/svg/SkSVGUse.h index ff85ce6..ff85ce6 100644 --- a/libsgl/svg/SkSVGUse.h +++ b/src/svg/SkSVGUse.h diff --git a/libsgl/effects/SkCamera.cpp b/src/utils/SkCamera.cpp index b02499f..b02499f 100644 --- a/libsgl/effects/SkCamera.cpp +++ b/src/utils/SkCamera.cpp diff --git a/libsgl/effects/SkColorMatrix.cpp b/src/utils/SkColorMatrix.cpp index 0a20990..0a20990 100644 --- a/libsgl/effects/SkColorMatrix.cpp +++ b/src/utils/SkColorMatrix.cpp diff --git a/libsgl/effects/SkCullPoints.cpp b/src/utils/SkCullPoints.cpp index 23d00b6..23d00b6 100644 --- a/libsgl/effects/SkCullPoints.cpp +++ b/src/utils/SkCullPoints.cpp diff --git a/libsgl/effects/SkDumpCanvas.cpp b/src/utils/SkDumpCanvas.cpp index fb203ef..fb203ef 100644 --- a/libsgl/effects/SkDumpCanvas.cpp +++ b/src/utils/SkDumpCanvas.cpp diff --git a/libcorecg/SkInterpolator.cpp b/src/utils/SkInterpolator.cpp index e4ecd95..e4ecd95 100644 --- a/libcorecg/SkInterpolator.cpp +++ b/src/utils/SkInterpolator.cpp diff --git a/libsgl/effects/SkNinePatch.cpp b/src/utils/SkNinePatch.cpp index b8e11fb..b8e11fb 100644 --- a/libsgl/effects/SkNinePatch.cpp +++ b/src/utils/SkNinePatch.cpp diff --git a/libsgl/effects/SkProxyCanvas.cpp b/src/utils/SkProxyCanvas.cpp index 2a02b45..2a02b45 100644 --- a/libsgl/effects/SkProxyCanvas.cpp +++ b/src/utils/SkProxyCanvas.cpp diff --git a/libsgl/effects/SkUnitMappers.cpp b/src/utils/SkUnitMappers.cpp index 0363a2b..0363a2b 100644 --- a/libsgl/effects/SkUnitMappers.cpp +++ b/src/utils/SkUnitMappers.cpp diff --git a/xcode/ports/SkBitmap_Mac.cpp b/src/utils/mac/SkBitmap_Mac.cpp index 06c2b27..06c2b27 100644 --- a/xcode/ports/SkBitmap_Mac.cpp +++ b/src/utils/mac/SkBitmap_Mac.cpp diff --git a/src/utils/mac/SkCreateCGImageRef.cpp b/src/utils/mac/SkCreateCGImageRef.cpp new file mode 100644 index 0000000..6c9415e --- /dev/null +++ b/src/utils/mac/SkCreateCGImageRef.cpp @@ -0,0 +1,67 @@ +#include "SkCGUtils.h" +#include "SkBitmap.h" + +extern CGImageRef SkCreateCGImageRef(const SkBitmap&); + +static void SkBitmap_ReleaseInfo(void* info, const void* pixelData, size_t size) { + SkBitmap* bitmap = reinterpret_cast<SkBitmap*>(info); + delete bitmap; +} + +static SkBitmap* prepareForImageRef(const SkBitmap& bm, + size_t* bitsPerComponent, + CGBitmapInfo* info) { + switch (bm.config()) { + case SkBitmap::kARGB_8888_Config: + *bitsPerComponent = 8; + // try to match our argb ordering in SkColorPriv + *info = kCGBitmapByteOrder32Big | + kCGImageAlphaPremultipliedLast; + break; + case SkBitmap::kRGB_565_Config: + // doesn't see quite right. Are they thinking 1555? + *bitsPerComponent = 5; + *info = kCGBitmapByteOrder16Little; + break; + case SkBitmap::kARGB_4444_Config: + *bitsPerComponent = 4; + *info = kCGBitmapByteOrder16Little | kCGImageAlphaPremultipliedLast; + break; + default: + return NULL; + } + + return new SkBitmap(bm); +} + +CGImageRef SkCreateCGImageRef(const SkBitmap& bm) { + size_t bitsPerComponent; + CGBitmapInfo info; + + SkBitmap* bitmap = prepareForImageRef(bm, &bitsPerComponent, &info); + if (NULL == bitmap) { + return NULL; + } + + const int w = bitmap->width(); + const int h = bitmap->height(); + const size_t s = bitmap->getSize(); + + // our provider "owns" the bitmap*, and will take care of deleting it + // we initially lock it, so we can access the pixels. The bitmap will be deleted in the release + // proc, which will in turn unlock the pixels + bitmap->lockPixels(); + CGDataProviderRef dataRef = CGDataProviderCreateWithData(bitmap, bitmap->getPixels(), s, + SkBitmap_ReleaseInfo); + + CGColorSpaceRef space = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); + CGImageRef ref = CGImageCreate(w, h, bitsPerComponent, + bitmap->bytesPerPixel() * 8, + bitmap->rowBytes(), space, info, dataRef, + NULL, false, kCGRenderingIntentDefault); + CGColorSpaceRelease(space); + CGDataProviderRelease(dataRef); + return ref; +} + + diff --git a/xcode/ports/SkOSWindow_Mac.cpp b/src/utils/mac/SkOSWindow_Mac.cpp index 0937a11..40ed57c 100644 --- a/xcode/ports/SkOSWindow_Mac.cpp +++ b/src/utils/mac/SkOSWindow_Mac.cpp @@ -2,6 +2,9 @@ #if defined(SK_BUILD_FOR_MAC) && !defined(SK_USE_WXWIDGETS) +#include <Carbon/Carbon.h> +#include "SkCGUtils.h" + #include "SkWindow.h" #include "SkCanvas.h" #include "SkOSMenu.h" @@ -28,13 +31,93 @@ static SkOSWindow* gCurrOSWin; static EventTargetRef gEventTarget; static EventQueueRef gCurrEventQ; +static OSStatus MyDrawEventHandler(EventHandlerCallRef myHandler, + EventRef event, void *userData) { + // NOTE: GState is save/restored by the HIView system doing the callback, + // so the draw handler doesn't need to do it + + OSStatus status = noErr; + CGContextRef context; + HIRect bounds; + + // Get the CGContextRef + status = GetEventParameter (event, kEventParamCGContextRef, + typeCGContextRef, NULL, + sizeof (CGContextRef), + NULL, + &context); + + if (status != noErr) { + SkDebugf("Got error %d getting the context!\n", status); + return status; + } + + // Get the bounding rectangle + HIViewGetBounds ((HIViewRef) userData, &bounds); + + gCurrOSWin->doPaint(context); + return status; +} + #define SK_MacEventClass FOUR_CHAR_CODE('SKec') #define SK_MacEventKind FOUR_CHAR_CODE('SKek') #define SK_MacEventParamName FOUR_CHAR_CODE('SKev') #define SK_MacEventSinkIDParamName FOUR_CHAR_CODE('SKes') +static void set_bindingside(HISideBinding* side, HIViewRef parent, HIBindingKind kind) { + side->toView = parent; + side->kind = kind; + side->offset = 0; +} + +static void set_axisscale(HIAxisScale* axis, HIViewRef parent) { + axis->toView = parent; + axis->kind = kHILayoutScaleAbsolute; + axis->ratio = 1; +} + +static void set_axisposition(HIAxisPosition* pos, HIViewRef parent, HIPositionKind kind) { + pos->toView = parent; + pos->kind = kind; + pos->offset = 0; +} + SkOSWindow::SkOSWindow(void* hWnd) : fHWND(hWnd) -{ +{ + OSStatus result; + WindowRef wr = (WindowRef)hWnd; + + HIViewRef imageView, parent; + HIViewRef rootView = HIViewGetRoot(wr); + HIViewFindByID(rootView, kHIViewWindowContentID, &parent); + result = HIImageViewCreate(NULL, &imageView); + SkASSERT(result == noErr); + + result = HIViewAddSubview(parent, imageView); + SkASSERT(result == noErr); + + fHVIEW = imageView; + + HIViewSetVisible(imageView, true); + HIViewPlaceInSuperviewAt(imageView, 0, 0); + + if (true) { + HILayoutInfo layout; + layout.version = kHILayoutInfoVersionZero; + set_bindingside(&layout.binding.left, parent, kHILayoutBindLeft); + set_bindingside(&layout.binding.top, parent, kHILayoutBindTop); + set_bindingside(&layout.binding.right, parent, kHILayoutBindRight); + set_bindingside(&layout.binding.bottom, parent, kHILayoutBindBottom); + set_axisscale(&layout.scale.x, parent); + set_axisscale(&layout.scale.y, parent); + set_axisposition(&layout.position.x, parent, kHILayoutPositionLeft); + set_axisposition(&layout.position.y, rootView, kHILayoutPositionTop); + HIViewSetLayoutInfo(imageView, &layout); + } + + HIImageViewSetOpaque(imageView, true); + HIImageViewSetScaleToFit(imageView, false); + static const EventTypeSpec gTypes[] = { { kEventClassKeyboard, kEventRawKeyDown }, { kEventClassKeyboard, kEventRawKeyUp }, @@ -43,21 +126,20 @@ SkOSWindow::SkOSWindow(void* hWnd) : fHWND(hWnd) { kEventClassMouse, kEventMouseUp }, { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent }, { kEventClassWindow, kEventWindowBoundsChanged }, - { kEventClassWindow, kEventWindowDrawContent }, +// { kEventClassWindow, kEventWindowDrawContent }, { SK_MacEventClass, SK_MacEventKind } }; EventHandlerUPP handlerUPP = NewEventHandlerUPP(SkOSWindow::EventHandler); int count = SK_ARRAY_COUNT(gTypes); - OSStatus result; - result = InstallEventHandler(GetWindowEventTarget((WindowRef)hWnd), handlerUPP, + result = InstallEventHandler(GetWindowEventTarget(wr), handlerUPP, count, gTypes, this, nil); SkASSERT(result == noErr); - + gCurrOSWin = this; gCurrEventQ = GetCurrentEventQueue(); - gEventTarget = GetWindowEventTarget((WindowRef)hWnd); + gEventTarget = GetWindowEventTarget(wr); static bool gOnce = true; if (gOnce) { @@ -68,9 +150,28 @@ SkOSWindow::SkOSWindow(void* hWnd) : fHWND(hWnd) void SkOSWindow::doPaint(void* ctx) { +#if 0 this->update(NULL); - this->getBitmap().drawToPort((WindowRef)fHWND, (CGContextRef)ctx); + const SkBitmap& bm = this->getBitmap(); + CGImageRef img = SkCreateCGImageRef(bm); + + if (img) { + CGRect r = CGRectMake(0, 0, bm.width(), bm.height()); + + CGContextRef cg = reinterpret_cast<CGContextRef>(ctx); + + CGContextSaveGState(cg); + CGContextTranslateCTM(cg, 0, r.size.height); + CGContextScaleCTM(cg, 1, -1); + + CGContextDrawImage(cg, r, img); + + CGContextRestoreGState(cg); + + CGImageRelease(img); + } +#endif } void SkOSWindow::updateSize() @@ -79,17 +180,36 @@ void SkOSWindow::updateSize() GetWindowBounds((WindowRef)fHWND, kWindowContentRgn, &r); this->resize(r.right - r.left, r.bottom - r.top); + +#if 0 + HIRect frame; + HIViewRef imageView = (HIViewRef)getHVIEW(); + HIViewRef parent = HIViewGetSuperview(imageView); + + HIViewGetBounds(imageView, &frame); + SkDebugf("------ %d bounds %g %g %g %g\n", r.right - r.left, + frame.origin.x, frame.origin.y, frame.size.width, frame.size.height); +#endif } void SkOSWindow::onHandleInval(const SkIRect& r) { - Rect rect; - - rect.left = r.fLeft; - rect.top = r.fTop; - rect.right = r.fRight; - rect.bottom = r.fBottom; - InvalWindowRect((WindowRef)fHWND, &rect); + SkEvent* evt = new SkEvent("inval-imageview"); + evt->post(this->getSinkID()); +} + +bool SkOSWindow::onEvent(const SkEvent& evt) { + if (evt.isType("inval-imageview")) { + this->update(NULL); + + const SkBitmap& bm = this->getBitmap(); + + CGImageRef img = SkCreateCGImageRef(bm); + HIImageViewSetImage((HIViewRef)getHVIEW(), img); + CGImageRelease(img); + return true; + } + return INHERITED::onEvent(evt); } void SkOSWindow::onSetTitle(const char title[]) diff --git a/libsgl/views/SkBGViewArtist.cpp b/src/views/SkBGViewArtist.cpp index 07da123..07da123 100644 --- a/libsgl/views/SkBGViewArtist.cpp +++ b/src/views/SkBGViewArtist.cpp diff --git a/libsgl/views/SkBorderView.cpp b/src/views/SkBorderView.cpp index 3356782..3356782 100644 --- a/libsgl/views/SkBorderView.cpp +++ b/src/views/SkBorderView.cpp diff --git a/libsgl/views/SkEvent.cpp b/src/views/SkEvent.cpp index 67549b4..67549b4 100644 --- a/libsgl/views/SkEvent.cpp +++ b/src/views/SkEvent.cpp diff --git a/libsgl/views/SkEventSink.cpp b/src/views/SkEventSink.cpp index c8fe35c..c8fe35c 100644 --- a/libsgl/views/SkEventSink.cpp +++ b/src/views/SkEventSink.cpp diff --git a/libsgl/views/SkImageView.cpp b/src/views/SkImageView.cpp index f19e913..f19e913 100644 --- a/libsgl/views/SkImageView.cpp +++ b/src/views/SkImageView.cpp diff --git a/libsgl/views/SkListView.cpp b/src/views/SkListView.cpp index 27218a9..27218a9 100644 --- a/libsgl/views/SkListView.cpp +++ b/src/views/SkListView.cpp diff --git a/libsgl/views/SkListWidget.cpp b/src/views/SkListWidget.cpp index 82e5d78..82e5d78 100644 --- a/libsgl/views/SkListWidget.cpp +++ b/src/views/SkListWidget.cpp diff --git a/libsgl/views/SkMetaData.cpp b/src/views/SkMetaData.cpp index c366bd3..c366bd3 100644 --- a/libsgl/views/SkMetaData.cpp +++ b/src/views/SkMetaData.cpp diff --git a/libsgl/views/SkOSFile.cpp b/src/views/SkOSFile.cpp index c8eeeea..c8eeeea 100644 --- a/libsgl/views/SkOSFile.cpp +++ b/src/views/SkOSFile.cpp diff --git a/libsgl/views/SkOSMenu.cpp b/src/views/SkOSMenu.cpp index 3760ddd..3760ddd 100644 --- a/libsgl/views/SkOSMenu.cpp +++ b/src/views/SkOSMenu.cpp diff --git a/libsgl/views/SkOSSound.cpp b/src/views/SkOSSound.cpp index 13cd037..13cd037 100644 --- a/libsgl/views/SkOSSound.cpp +++ b/src/views/SkOSSound.cpp diff --git a/libsgl/views/SkParsePaint.cpp b/src/views/SkParsePaint.cpp index 7bf0244..7bf0244 100644 --- a/libsgl/views/SkParsePaint.cpp +++ b/src/views/SkParsePaint.cpp diff --git a/libsgl/views/SkProgressBarView.cpp b/src/views/SkProgressBarView.cpp index 21349a5..21349a5 100644 --- a/libsgl/views/SkProgressBarView.cpp +++ b/src/views/SkProgressBarView.cpp diff --git a/libsgl/views/SkProgressView.cpp b/src/views/SkProgressView.cpp index a34c284..a34c284 100644 --- a/libsgl/views/SkProgressView.cpp +++ b/src/views/SkProgressView.cpp diff --git a/libsgl/views/SkScrollBarView.cpp b/src/views/SkScrollBarView.cpp index 2e087bd..2e087bd 100644 --- a/libsgl/views/SkScrollBarView.cpp +++ b/src/views/SkScrollBarView.cpp diff --git a/libsgl/views/SkStackViewLayout.cpp b/src/views/SkStackViewLayout.cpp index ae2e9e8..ae2e9e8 100644 --- a/libsgl/views/SkStackViewLayout.cpp +++ b/src/views/SkStackViewLayout.cpp diff --git a/libsgl/views/SkTagList.cpp b/src/views/SkTagList.cpp index 4576ce6..4576ce6 100644 --- a/libsgl/views/SkTagList.cpp +++ b/src/views/SkTagList.cpp diff --git a/libsgl/views/SkTagList.h b/src/views/SkTagList.h index 5f428e4..5f428e4 100644 --- a/libsgl/views/SkTagList.h +++ b/src/views/SkTagList.h diff --git a/libsgl/views/SkTextBox.cpp b/src/views/SkTextBox.cpp index 657f648..657f648 100644 --- a/libsgl/views/SkTextBox.cpp +++ b/src/views/SkTextBox.cpp diff --git a/libsgl/views/SkView.cpp b/src/views/SkView.cpp index a027744..a027744 100644 --- a/libsgl/views/SkView.cpp +++ b/src/views/SkView.cpp diff --git a/libsgl/views/SkViewInflate.cpp b/src/views/SkViewInflate.cpp index 8f5489d..8f5489d 100644 --- a/libsgl/views/SkViewInflate.cpp +++ b/src/views/SkViewInflate.cpp diff --git a/libsgl/views/SkViewPriv.cpp b/src/views/SkViewPriv.cpp index b03ca8c..b03ca8c 100644 --- a/libsgl/views/SkViewPriv.cpp +++ b/src/views/SkViewPriv.cpp diff --git a/libsgl/views/SkViewPriv.h b/src/views/SkViewPriv.h index 06ce59b..06ce59b 100644 --- a/libsgl/views/SkViewPriv.h +++ b/src/views/SkViewPriv.h diff --git a/libsgl/views/SkWidget.cpp b/src/views/SkWidget.cpp index 8d945f1..8d945f1 100644 --- a/libsgl/views/SkWidget.cpp +++ b/src/views/SkWidget.cpp diff --git a/libsgl/views/SkWidgetViews.cpp b/src/views/SkWidgetViews.cpp index e7eb772..e7eb772 100644 --- a/libsgl/views/SkWidgetViews.cpp +++ b/src/views/SkWidgetViews.cpp diff --git a/libsgl/views/SkWidgets.cpp b/src/views/SkWidgets.cpp index fe87cd6..fe87cd6 100644 --- a/libsgl/views/SkWidgets.cpp +++ b/src/views/SkWidgets.cpp diff --git a/libsgl/views/SkWindow.cpp b/src/views/SkWindow.cpp index 5d00d4f..c8403d4 100644 --- a/libsgl/views/SkWindow.cpp +++ b/src/views/SkWindow.cpp @@ -62,8 +62,6 @@ void SkWindow::setConfig(SkBitmap::Config config) this->resize(fBitmap.width(), fBitmap.height(), config); } -#include "SkImageDecoder.h" - void SkWindow::resize(int width, int height, SkBitmap::Config config) { if (config == SkBitmap::kNo_Config) @@ -78,8 +76,6 @@ void SkWindow::resize(int width, int height, SkBitmap::Config config) this->setSize(SkIntToScalar(width), SkIntToScalar(height)); this->inval(NULL); } - - SkImageDecoder::SetDeviceConfig(fConfig); } void SkWindow::eraseARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b) @@ -252,10 +248,11 @@ void SkWindow::addMenu(SkOSMenu* menu) this->onAddMenu(menu); } -void SkWindow::setTitle(const char title[]) -{ - if (NULL == title) +void SkWindow::setTitle(const char title[]) { + if (NULL == title) { title = ""; + } + fTitle.set(title); this->onSetTitle(title); } diff --git a/libsgl/xml/SkBML_Verbs.h b/src/xml/SkBML_Verbs.h index 86bfede..86bfede 100644 --- a/libsgl/xml/SkBML_Verbs.h +++ b/src/xml/SkBML_Verbs.h diff --git a/libsgl/xml/SkBML_XMLParser.cpp b/src/xml/SkBML_XMLParser.cpp index 53b7f61..53b7f61 100644 --- a/libsgl/xml/SkBML_XMLParser.cpp +++ b/src/xml/SkBML_XMLParser.cpp diff --git a/libsgl/xml/SkDOM.cpp b/src/xml/SkDOM.cpp index a9fc31e..a9fc31e 100644 --- a/libsgl/xml/SkDOM.cpp +++ b/src/xml/SkDOM.cpp diff --git a/libsgl/xml/SkJS.cpp b/src/xml/SkJS.cpp index 03ccba6..03ccba6 100644 --- a/libsgl/xml/SkJS.cpp +++ b/src/xml/SkJS.cpp diff --git a/libsgl/xml/SkJSDisplayable.cpp b/src/xml/SkJSDisplayable.cpp index d52a7c9..848b9f9 100644 --- a/libsgl/xml/SkJSDisplayable.cpp +++ b/src/xml/SkJSDisplayable.cpp @@ -179,9 +179,7 @@ JS_INIT(Sk, Set) JS_INIT(Sk, Skew) // JS_INIT(Sk, 3D_Camera) // JS_INIT(Sk, 3D_Patch) -#ifdef SK_SUPPORT_IMAGE_ENCODE JS_INIT(Sk, Snapshot) -#endif // JS_INIT(SkDraw, Stroke) JS_INIT(Sk, Text) JS_INIT(Sk, TextOnPath) @@ -451,9 +449,7 @@ void SkJS::InitializeDisplayables(const SkBitmap& bitmap, JSContext *cx, JSObjec SkewInit(cx, obj, proto); // 3D_CameraInit(cx, obj, proto); // 3D_PatchInit(cx, obj, proto); - #ifdef SK_SUPPORT_IMAGE_ENCODE SnapshotInit(cx, obj, proto); - #endif // StrokeInit(cx, obj, proto); TextInit(cx, obj, proto); TextOnPathInit(cx, obj, proto); diff --git a/libsgl/xml/SkParse.cpp b/src/xml/SkParse.cpp index e740280..e740280 100644 --- a/libsgl/xml/SkParse.cpp +++ b/src/xml/SkParse.cpp diff --git a/libsgl/xml/SkParseColor.cpp b/src/xml/SkParseColor.cpp index eca2e38..c451253 100644 --- a/libsgl/xml/SkParseColor.cpp +++ b/src/xml/SkParseColor.cpp @@ -500,7 +500,7 @@ const char* SkParse::FindColor(const char* value, SkColor* colorPtr) { return FindNamedColor(value, strlen(value), colorPtr); } -#ifdef SK_DEBUG +#ifdef SK_SUPPORT_UNITTEST void SkParse::TestColor() { if (false) CreateTable(); // regenerates data table in the output window diff --git a/libsgl/xml/SkXMLParser.cpp b/src/xml/SkXMLParser.cpp index da33307..da33307 100644 --- a/libsgl/xml/SkXMLParser.cpp +++ b/src/xml/SkXMLParser.cpp diff --git a/libsgl/xml/SkXMLPullParser.cpp b/src/xml/SkXMLPullParser.cpp index 5df75b7..5df75b7 100644 --- a/libsgl/xml/SkXMLPullParser.cpp +++ b/src/xml/SkXMLPullParser.cpp diff --git a/libsgl/xml/SkXMLWriter.cpp b/src/xml/SkXMLWriter.cpp index 4685d81..4685d81 100644 --- a/libsgl/xml/SkXMLWriter.cpp +++ b/src/xml/SkXMLWriter.cpp diff --git a/test/test.cpp b/test/test.cpp deleted file mode 100644 index 8d2e1f2..0000000 --- a/test/test.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "test.h" - -namespace skia { - -#define MAX_REC_COUNT 1000 - -struct Rec { - Test::Factory fFact; - void* fData; -}; -static Rec gRecs[MAX_REC_COUNT]; -static int gRecCount; - -void Test::Register(Factory fact, void* data) { - SkASSERT(gRecCount < MAX_REC_COUNT); - - gRecs[gRecCount].fFact = fact; - gRecs[gRecCount].fData = data; - gRecCount++; -} - -Test::Registrar::Registrar(Factory fact, void* data) { - Test::Register(fact, data); -} - -Test::Init::Init(void (*proc)()) { - proc(); -} - -Test* Test::Iter::next() { - if (fIndex < gRecCount) { - Test* test = gRecs[fIndex].fFact(gRecs[fIndex].fData); - fIndex++; - return test; - } - return NULL; -} - -int Test::Iter::Count() { return gRecCount; } - -} // namespace - diff --git a/test/test.h b/test/test.h deleted file mode 100644 index 114638d..0000000 --- a/test/test.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef SkiaTest_DEFINED -#define SkiaTest_DEFINED - -#include "SkCanvas.h" -#include "SkPoint.h" -#include "SkString.h" - -namespace skia { - - class Test { - public: - virtual ~Test() {} - - enum StringType { - kTitle, - kDescription - }; - - virtual void getSize(SkIPoint* size) = 0; - virtual void draw(SkCanvas*) = 0; - virtual bool getString(StringType, SkString*) = 0; - - /////////////////////////////////////////////////////////////////////// - - class Iter { - public: - Iter() : fIndex(0) {} - - void reset() { fIndex = 0; } - Test* next(); - - static int Count(); - private: - int fIndex; - }; - - /////////////////////////////////////////////////////////////////////// - - typedef Test* (*Factory)(void*); - static void Register(Factory, void*); - - class Registrar { - public: - Registrar(Factory, void*); - }; - - class Init { - public: - Init(void (*)()); - }; - }; - -} - -#endif - diff --git a/test/test_drawcolor.cpp b/test/test_drawcolor.cpp deleted file mode 100644 index 6b6b254..0000000 --- a/test/test_drawcolor.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "test.h" - -namespace skia { - -class draw_color_test : public Test { -public: - enum { kSizeX = 32, kSizeY = 32 }; - - draw_color_test(SkColor color) : fColor(color) {} - - virtual void getSize(SkIPoint* size) { - size->set(kSizeX, kSizeY); - } - - virtual void draw(SkCanvas* canvas) { - canvas->drawColor(fColor); - } - - virtual bool getString(StringType st, SkString* str) { - switch (st) { - case kTitle: - str->printf("DrawColor %X", fColor); - return true; - case kDescription: - str->printf("Call drawColor(%X) on the entire canvas", fColor); - return true; - default: - return false; - } - } - -private: - SkColor fColor; -}; - -static Test* factory(void* color) { - return new draw_color_test(reinterpret_cast<SkColor>(color)); -} - -static void init() { - static const SkColor gColors[] = { - SK_ColorBLACK, SK_ColorWHITE, - SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE, - SK_ColorCYAN, SK_ColorMAGENTA, SK_ColorYELLOW - }; - for (size_t i = 0; i < SK_ARRAY_COUNT(gColors); i++) { - Test::Register(factory, reinterpret_cast<void*>(gColors[i])); - } -} -static Test::Init i(init); - -} // namespace - diff --git a/test/test_drawrect.cpp b/test/test_drawrect.cpp deleted file mode 100644 index 35daad1..0000000 --- a/test/test_drawrect.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include "test.h" - -namespace skia { - -class drawrect_test : public Test { -public: - enum { kSizeX = 510, kSizeY = 510 }; - - drawrect_test() {} - - virtual void getSize(SkIPoint* size) { - size->set(kSizeX, kSizeY); - } - - virtual void draw(SkCanvas* canvas) { - SkRect r; - SkPaint p; - - p.setAntiAlias(true); - r.set(SkIntToScalar(10), SkIntToScalar(10), - SkIntToScalar(10+80), SkIntToScalar(10+80)); - - static const SkPaint::Style gStyles[] = { - SkPaint::kStroke_Style, - SkPaint::kStrokeAndFill_Style - }; - static const SkScalar gWidths[] = { 0, SkIntToScalar(9) }; - static const SkPaint::Join gJoins[] = { - SkPaint::kMiter_Join, - SkPaint::kRound_Join, - SkPaint::kBevel_Join - }; - - const SkScalar dx = r.width() + SkIntToScalar(20); - const SkScalar dy = r.height() + SkIntToScalar(10); - - canvas->drawRect(r, p); - for (size_t k = 0; k < SK_ARRAY_COUNT(gJoins); k++) { - p.setStrokeJoin(gJoins[k]); - canvas->translate(0, dy); - canvas->save(SkCanvas::kMatrix_SaveFlag); - for (size_t i = 0; i < SK_ARRAY_COUNT(gStyles); i++) { - p.setStyle(gStyles[i]); - for (size_t j = 0; j < SK_ARRAY_COUNT(gWidths); j++) { - p.setStrokeWidth(gWidths[j]); - canvas->drawRect(r, p); - canvas->translate(dx, 0); - } - } - canvas->restore(); - } - } - - virtual bool getString(StringType st, SkString* str) { - switch (st) { - case kTitle: - str->set("drawRect"); - return true; - case kDescription: - str->set("Call drawRect with different stroke widths and joins"); - return true; - default: - return false; - } - } -}; - -static Test* factory(void*) { - return new drawrect_test; -} -static Test::Registrar reg(factory, 0); - -} - diff --git a/xcode/benchmarks/benchmarks.xcodeproj/project.pbxproj b/xcode/benchmarks/benchmarks.xcodeproj/project.pbxproj deleted file mode 100644 index 3c4ef47..0000000 --- a/xcode/benchmarks/benchmarks.xcodeproj/project.pbxproj +++ /dev/null @@ -1,267 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 42; - objects = { - -/* Begin PBXBuildFile section */ - 00BE44C30EE9D4980008420F /* libskia2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00BE44C10EE9D4880008420F /* libskia2.a */; }; - 8DD76F650486A84900D96B5E /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* main.cpp */; settings = {ATTRIBUTES = (); }; }; - 8DD76F6A0486A84900D96B5E /* benchmarks.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = C6859E8B029090EE04C91782 /* benchmarks.1 */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 00BE44C00EE9D4880008420F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00BE44BC0EE9D4880008420F /* skia2.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC046055464E500DB518D; - remoteInfo = skia2; - }; - 00BE44E80EE9D6ED0008420F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00BE44BC0EE9D4880008420F /* skia2.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC045055464E500DB518D; - remoteInfo = skia2; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 8DD76F690486A84900D96B5E /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - 8DD76F6A0486A84900D96B5E /* benchmarks.1 in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 00BE44BC0EE9D4880008420F /* skia2.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = skia2.xcodeproj; path = ../skia2.xcodeproj; sourceTree = SOURCE_ROOT; }; - 08FB7796FE84155DC02AAC07 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; - 8DD76F6C0486A84900D96B5E /* benchmarks */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = benchmarks; sourceTree = BUILT_PRODUCTS_DIR; }; - C6859E8B029090EE04C91782 /* benchmarks.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = benchmarks.1; sourceTree = "<group>"; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8DD76F660486A84900D96B5E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 00BE44C30EE9D4980008420F /* libskia2.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00BE44BD0EE9D4880008420F /* Products */ = { - isa = PBXGroup; - children = ( - 00BE44C10EE9D4880008420F /* libskia2.a */, - ); - name = Products; - sourceTree = "<group>"; - }; - 08FB7794FE84155DC02AAC07 /* benchmarks */ = { - isa = PBXGroup; - children = ( - 08FB7795FE84155DC02AAC07 /* Source */, - C6859E8C029090F304C91782 /* Documentation */, - 1AB674ADFE9D54B511CA2CBB /* Products */, - 00BE44BC0EE9D4880008420F /* skia2.xcodeproj */, - ); - name = benchmarks; - sourceTree = "<group>"; - }; - 08FB7795FE84155DC02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 08FB7796FE84155DC02AAC07 /* main.cpp */, - ); - name = Source; - sourceTree = "<group>"; - }; - 1AB674ADFE9D54B511CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8DD76F6C0486A84900D96B5E /* benchmarks */, - ); - name = Products; - sourceTree = "<group>"; - }; - C6859E8C029090F304C91782 /* Documentation */ = { - isa = PBXGroup; - children = ( - C6859E8B029090EE04C91782 /* benchmarks.1 */, - ); - name = Documentation; - sourceTree = "<group>"; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8DD76F620486A84900D96B5E /* benchmarks */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "benchmarks" */; - buildPhases = ( - 8DD76F640486A84900D96B5E /* Sources */, - 8DD76F660486A84900D96B5E /* Frameworks */, - 8DD76F690486A84900D96B5E /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - 00BE44E90EE9D6ED0008420F /* PBXTargetDependency */, - ); - name = benchmarks; - productInstallPath = "$(HOME)/bin"; - productName = benchmarks; - productReference = 8DD76F6C0486A84900D96B5E /* benchmarks */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "benchmarks" */; - compatibilityVersion = "Xcode 2.4"; - hasScannedForEncodings = 1; - mainGroup = 08FB7794FE84155DC02AAC07 /* benchmarks */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 00BE44BD0EE9D4880008420F /* Products */; - ProjectRef = 00BE44BC0EE9D4880008420F /* skia2.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8DD76F620486A84900D96B5E /* benchmarks */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 00BE44C10EE9D4880008420F /* libskia2.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libskia2.a; - remoteRef = 00BE44C00EE9D4880008420F /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXSourcesBuildPhase section */ - 8DD76F640486A84900D96B5E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8DD76F650486A84900D96B5E /* main.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 00BE44E90EE9D6ED0008420F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = skia2; - targetProxy = 00BE44E80EE9D6ED0008420F /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1DEB923208733DC60010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "_GLIBCXX_DEBUG=1", - "_GLIBCXX_DEBUG_PEDANTIC=1", - ); - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = benchmarks; - ZERO_LINK = YES; - }; - name = Debug; - }; - 1DEB923308733DC60010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_MODEL_TUNING = G5; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = benchmarks; - }; - name = Release; - }; - 1DEB923608733DC60010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREPROCESSOR_DEFINITIONS = ( - SK_BUILD_FOR_MAC, - SK_DEBUG, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - USER_HEADER_SEARCH_PATHS = "../../include/**"; - }; - name = Debug; - }; - 1DEB923708733DC60010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = ( - ppc, - i386, - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - SK_BUILD_FOR_MAC, - SK_RELEASE, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - USER_HEADER_SEARCH_PATHS = "../../include/**"; - VALID_ARCHS = "i386 x86_64"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "benchmarks" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB923208733DC60010E9CD /* Debug */, - 1DEB923308733DC60010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "benchmarks" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB923608733DC60010E9CD /* Debug */, - 1DEB923708733DC60010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/xcode/benchmarks/main.cpp b/xcode/benchmarks/main.cpp deleted file mode 100644 index 635ddfd..0000000 --- a/xcode/benchmarks/main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include <iostream> -#include "SkCanvas.h" -#include "SkBitmap.h" -#include "SkPaint.h" -#include "SkImageDecoder.h" - -int main (int argc, char * const argv[]) { - // insert code here... - std::cout << "Begin test\n"; - - const int W = 256; - const int H = 256; - const SkScalar w = SkIntToScalar(W); - const SkScalar h = SkIntToScalar(H); - - SkBitmap bm; - bm.setConfig(SkBitmap::kARGB_8888_Config, W, H); - bm.allocPixels(); - - SkCanvas canvas(bm); - - SkPaint paint; - paint.setAntiAlias(true); - - canvas.drawColor(SK_ColorWHITE); - canvas.drawCircle(w/2, h/2, w/3, paint); - - SkImageEncoder::EncodeFile("../../bench1.png", bm, - SkImageEncoder::kPNG_Type); - - std::cout << "End test\n"; - return 0; -} diff --git a/xcode/hostapp/test.cpp b/xcode/hostapp/test.cpp new file mode 100644 index 0000000..4f66a82 --- /dev/null +++ b/xcode/hostapp/test.cpp @@ -0,0 +1,65 @@ +#include <Carbon/Carbon.h> +#include "SkCGUtils.h" +#include "SkCanvas.h" +#include "SkPaint.h" + +extern "C" void SkiaDraw(CGContextRef cg, CGRect bounds); + +static void sampleDraw(SkCanvas* canvas) { + canvas->drawColor(0xFF0000FF); + + SkPaint paint; + paint.setAntiAlias(true); + + canvas->drawCircle(SkIntToScalar(100), SkIntToScalar(100), + SkIntToScalar(90), paint); + + const char text[] = "fry42"; + const size_t len = strlen(text); + + paint.setColor(SK_ColorWHITE); + paint.setTextSize(SkIntToScalar(50)); + canvas->drawText(text, len, SkIntToScalar(100), SkIntToScalar(50), paint); + paint.setTextAlign(SkPaint::kCenter_Align); + canvas->drawText(text, len, SkIntToScalar(100), SkIntToScalar(100), paint); + paint.setTextAlign(SkPaint::kRight_Align); + canvas->drawText(text, len, SkIntToScalar(100), SkIntToScalar(150), paint); +} + +static CGImageRef gImage; + +void SkiaDraw(CGContextRef cg, CGRect bounds) { + if (NULL == gImage) { + SkBitmap bitmap; + bitmap.setConfig(SkBitmap::kARGB_8888_Config, 640, 480); + bitmap.allocPixels(); + + SkCanvas canvas(bitmap); + sampleDraw(&canvas); + + gImage = SkCreateCGImageRef(bitmap); + } + + float components[] = { 1, 1, 1, 1 }; + + CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); + CGColorRef color = CGColorCreate(colorspace, components); + + CGContextSetFillColorWithColor(cg, color); + CGColorRelease(color); + CGColorSpaceRelease(colorspace); + + CGContextFillRect(cg, bounds); + + CGRect r = CGRectMake(0, 0, 640, 480); + + CGContextSaveGState(cg); + CGContextTranslateCTM(cg, 0, r.size.height); + CGContextScaleCTM(cg, 1, -1); + + CGContextDrawImage(cg, r, gImage); + + CGContextRestoreGState(cg); +} + + |