├── README.md ├── demo ├── ReadMe.txt ├── Resource.h ├── demo.ico ├── demo.rc ├── demo.vcxproj ├── demo.vcxproj.filters ├── small.ico ├── src │ ├── AnimatorView.cpp │ ├── AnimatorView.h │ ├── DemoView.cpp │ ├── DemoView.h │ ├── DemoWidget.cpp │ ├── DemoWidget.h │ ├── GdiView.cpp │ ├── GdiView.h │ ├── GdiplusAnimatorView.cpp │ ├── GdiplusAnimatorView.h │ ├── GdiplusView.cpp │ ├── GdiplusView.h │ ├── PrimitiveView.cpp │ ├── PrimitiveView.h │ ├── SkiaAnimatorView.cpp │ ├── SkiaAnimatorView.h │ ├── SkiaView.cpp │ ├── SkiaView.h │ ├── demo.cpp │ └── demo.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── myui.sln ├── res ├── flower.png └── qq.png └── ui ├── include ├── Brush.h ├── Canvas.h ├── Color.h ├── Image.h ├── KFont.h ├── KFontFamily.h ├── KPen.h ├── KPoint.h ├── KRect.h ├── KRegion.cpp ├── KRegion.h ├── KSolidBrush.h ├── KString.h ├── Matrix.h ├── Panel.h ├── Pen.h ├── Rect.h ├── Size.h ├── SolidBrush.h ├── UIDefine.h ├── View.h ├── eventHandler.h └── widget.h ├── src ├── Brush.cpp ├── Canvas.cpp ├── Color.cpp ├── Image.cpp ├── KFont.cpp ├── KFontFamily.cpp ├── KPen.cpp ├── KPoint.cpp ├── KRect.cpp ├── KSolidBrush.cpp ├── KString.cpp ├── Matrix.cpp ├── Panel.cpp ├── Pen.cpp ├── Pen.h ├── Point.cpp ├── Point.h ├── Rect.cpp ├── RootView.cpp ├── RootView.h ├── SolidBrush.cpp ├── StringHelper.cpp ├── StringHelper.h ├── eventHandler.cpp ├── graphics │ ├── Gdi │ │ ├── GdiGraphics.cpp │ │ ├── GdiGraphics.h │ │ ├── GdiHelper.cpp │ │ ├── GdiHelper.h │ │ ├── GdiImage.cpp │ │ └── GdiImage.h │ ├── GdiPlus │ │ ├── GdiPlusGraphics.cpp │ │ ├── GdiPlusGraphics.h │ │ ├── GdiPlusImage.cpp │ │ ├── GdiPlusImage.h │ │ ├── GdiplusHelper.cpp │ │ ├── GdiplusHelper.h │ │ ├── GdiplusRegion.cpp │ │ └── GdiplusRegion.h │ ├── Graphics.cpp │ ├── Graphics.h │ └── skia │ │ ├── SkiaGraphics.cpp │ │ ├── SkiaGraphics.h │ │ ├── SkiaHelper.cpp │ │ ├── SkiaHelper.h │ │ ├── SkiaImage.cpp │ │ ├── SkiaImage.h │ │ ├── SkiaRegion.cpp │ │ ├── SkiaRegion.h │ │ ├── gskiabitmap.cpp │ │ ├── gskiabitmap.h │ │ ├── gskiabitmaploader.cpp │ │ ├── gskiabitmaploader.h │ │ ├── gskiagraphic.cpp │ │ ├── gskiagraphic.h │ │ ├── gskiahelper.cpp │ │ └── gskiahelper.h ├── view.cpp └── widget.cpp ├── stdafx.cpp ├── stdafx.h ├── targetver.h ├── third_party ├── libpng │ ├── projects │ │ ├── vc100 │ │ │ ├── libpng.vcxproj │ │ │ └── libpng.vcxproj.filters │ │ └── vc80 │ │ │ └── libpng.vcproj │ └── src │ │ ├── png.c │ │ ├── png.h │ │ ├── pngconf.h │ │ ├── pngdebug.h │ │ ├── pngerror.c │ │ ├── pngget.c │ │ ├── pnginfo.h │ │ ├── pnglibconf.h │ │ ├── pngmem.c │ │ ├── pngpread.c │ │ ├── pngpriv.h │ │ ├── pngread.c │ │ ├── pngrio.c │ │ ├── pngrtran.c │ │ ├── pngrutil.c │ │ ├── pngset.c │ │ ├── pngstruct.h │ │ ├── pngtrans.c │ │ ├── pngwio.c │ │ ├── pngwrite.c │ │ ├── pngwtran.c │ │ └── pngwutil.c ├── skia │ ├── include │ │ ├── animator │ │ │ ├── SkAnimator.h │ │ │ └── SkAnimatorView.h │ │ ├── config │ │ │ ├── SkUserConfig.h │ │ │ └── sk_stdint.h │ │ ├── core │ │ │ ├── Sk64.h │ │ │ ├── SkAdvancedTypefaceMetrics.h │ │ │ ├── SkAnnotation.h │ │ │ ├── SkBitmap.h │ │ │ ├── SkBlitRow.h │ │ │ ├── SkBounder.h │ │ │ ├── SkCanvas.h │ │ │ ├── SkChecksum.h │ │ │ ├── SkChunkAlloc.h │ │ │ ├── SkClipStack.h │ │ │ ├── SkColor.h │ │ │ ├── SkColorFilter.h │ │ │ ├── SkColorPriv.h │ │ │ ├── SkColorShader.h │ │ │ ├── SkColorTable.h │ │ │ ├── SkComposeShader.h │ │ │ ├── SkData.h │ │ │ ├── SkDataSet.h │ │ │ ├── SkDeque.h │ │ │ ├── SkDevice.h │ │ │ ├── SkDither.h │ │ │ ├── SkDraw.h │ │ │ ├── SkDrawFilter.h │ │ │ ├── SkDrawLooper.h │ │ │ ├── SkEmptyShader.h │ │ │ ├── SkEndian.h │ │ │ ├── SkFixed.h │ │ │ ├── SkFlate.h │ │ │ ├── SkFlattenable.h │ │ │ ├── SkFlattenableBuffers.h │ │ │ ├── SkFloatBits.h │ │ │ ├── SkFloatingPoint.h │ │ │ ├── SkFontHost.h │ │ │ ├── SkGeometry.h │ │ │ ├── SkGraphics.h │ │ │ ├── SkImage.h │ │ │ ├── SkImageFilter.h │ │ │ ├── SkInstCnt.h │ │ │ ├── SkLineClipper.h │ │ │ ├── SkMMapStream.h │ │ │ ├── SkMallocPixelRef.h │ │ │ ├── SkMask.h │ │ │ ├── SkMaskFilter.h │ │ │ ├── SkMath.h │ │ │ ├── SkMatrix.h │ │ │ ├── SkMetaData.h │ │ │ ├── SkOSFile.h │ │ │ ├── SkPackBits.h │ │ │ ├── SkPaint.h │ │ │ ├── SkPath.h │ │ │ ├── SkPathEffect.h │ │ │ ├── SkPathMeasure.h │ │ │ ├── SkPicture.h │ │ │ ├── SkPixelRef.h │ │ │ ├── SkPoint.h │ │ │ ├── SkPostConfig.h │ │ │ ├── SkPreConfig.h │ │ │ ├── SkRRect.h │ │ │ ├── SkRandom.h │ │ │ ├── SkRasterizer.h │ │ │ ├── SkReader32.h │ │ │ ├── SkRect.h │ │ │ ├── SkRefCnt.h │ │ │ ├── SkRegion.h │ │ │ ├── SkScalar.h │ │ │ ├── SkScalarCompare.h │ │ │ ├── SkSerializationHelpers.h │ │ │ ├── SkShader.h │ │ │ ├── SkSize.h │ │ │ ├── SkStream.h │ │ │ ├── SkString.h │ │ │ ├── SkStrokeRec.h │ │ │ ├── SkSurface.h │ │ │ ├── SkTArray.h │ │ │ ├── SkTDArray.h │ │ │ ├── SkTDStack.h │ │ │ ├── SkTDict.h │ │ │ ├── SkTInternalLList.h │ │ │ ├── SkTLazy.h │ │ │ ├── SkTRegistry.h │ │ │ ├── SkTScopedPtr.h │ │ │ ├── SkTSearch.h │ │ │ ├── SkTemplates.h │ │ │ ├── SkThread.h │ │ │ ├── SkThread_platform.h │ │ │ ├── SkTileGridPicture.h │ │ │ ├── SkTime.h │ │ │ ├── SkTrace.h │ │ │ ├── SkTypeface.h │ │ │ ├── SkTypes.h │ │ │ ├── SkUnPreMultiply.h │ │ │ ├── SkUnitMapper.h │ │ │ ├── SkUtils.h │ │ │ ├── SkWeakRefCnt.h │ │ │ ├── SkWriter32.h │ │ │ └── SkXfermode.h │ │ ├── device │ │ │ └── xps │ │ │ │ ├── SkConstexprMath.h │ │ │ │ └── SkXPSDevice.h │ │ ├── effects │ │ │ ├── Sk1DPathEffect.h │ │ │ ├── Sk2DPathEffect.h │ │ │ ├── SkArithmeticMode.h │ │ │ ├── SkAvoidXfermode.h │ │ │ ├── SkBitmapSource.h │ │ │ ├── SkBlendImageFilter.h │ │ │ ├── SkBlurDrawLooper.h │ │ │ ├── SkBlurImageFilter.h │ │ │ ├── SkBlurMaskFilter.h │ │ │ ├── SkColorFilterImageFilter.h │ │ │ ├── SkColorMatrix.h │ │ │ ├── SkColorMatrixFilter.h │ │ │ ├── SkCornerPathEffect.h │ │ │ ├── SkDashPathEffect.h │ │ │ ├── SkDiscretePathEffect.h │ │ │ ├── SkDrawExtraPathEffect.h │ │ │ ├── SkEmbossMaskFilter.h │ │ │ ├── SkGradientShader.h │ │ │ ├── SkKernel33MaskFilter.h │ │ │ ├── SkLayerDrawLooper.h │ │ │ ├── SkLayerRasterizer.h │ │ │ ├── SkLightingImageFilter.h │ │ │ ├── SkMagnifierImageFilter.h │ │ │ ├── SkMatrixConvolutionImageFilter.h │ │ │ ├── SkMergeImageFilter.h │ │ │ ├── SkMorphologyImageFilter.h │ │ │ ├── SkOffsetImageFilter.h │ │ │ ├── SkPaintFlagsDrawFilter.h │ │ │ ├── SkPixelXorXfermode.h │ │ │ ├── SkPorterDuff.h │ │ │ ├── SkSingleInputImageFilter.h │ │ │ ├── SkStippleMaskFilter.h │ │ │ ├── SkTableColorFilter.h │ │ │ ├── SkTableMaskFilter.h │ │ │ ├── SkTestImageFilters.h │ │ │ └── SkTransparentShader.h │ │ ├── gpu │ │ │ ├── GrAARectRenderer.h │ │ │ ├── GrBackendEffectFactory.h │ │ │ ├── GrCacheID.h │ │ │ ├── GrClipData.h │ │ │ ├── GrColor.h │ │ │ ├── GrConfig.h │ │ │ ├── GrContext.h │ │ │ ├── GrContextFactory.h │ │ │ ├── GrEffect.h │ │ │ ├── GrEffectStage.h │ │ │ ├── GrEffectUnitTest.h │ │ │ ├── GrFontScaler.h │ │ │ ├── GrGlyph.h │ │ │ ├── GrInstanceCounter.h │ │ │ ├── GrKey.h │ │ │ ├── GrNoncopyable.h │ │ │ ├── GrPaint.h │ │ │ ├── GrPathRendererChain.h │ │ │ ├── GrPoint.h │ │ │ ├── GrRect.h │ │ │ ├── GrRefCnt.h │ │ │ ├── GrRenderTarget.h │ │ │ ├── GrResource.h │ │ │ ├── GrSurface.h │ │ │ ├── GrTBackendEffectFactory.h │ │ │ ├── GrTextContext.h │ │ │ ├── GrTexture.h │ │ │ ├── GrTextureAccess.h │ │ │ ├── GrTypes.h │ │ │ ├── GrUserConfig.h │ │ │ ├── SkGpuDevice.h │ │ │ ├── SkGr.h │ │ │ ├── SkGrPixelRef.h │ │ │ ├── SkGrTexturePixelRef.h │ │ │ └── gl │ │ │ │ ├── GrGLConfig.h │ │ │ │ ├── GrGLConfig_chrome.h │ │ │ │ ├── GrGLFunctions.h │ │ │ │ ├── GrGLInterface.h │ │ │ │ ├── SkANGLEGLContext.h │ │ │ │ ├── SkDebugGLContext.h │ │ │ │ ├── SkGLContext.h │ │ │ │ ├── SkMesaGLContext.h │ │ │ │ ├── SkNativeGLContext.h │ │ │ │ └── SkNullGLContext.h │ │ ├── images │ │ │ ├── SkBitmapFactory.h │ │ │ ├── SkImageDecoder.h │ │ │ ├── SkImageEncoder.h │ │ │ ├── SkImageRef.h │ │ │ ├── SkImageRef_GlobalPool.h │ │ │ ├── SkImages.h │ │ │ ├── SkJpegUtility.h │ │ │ ├── SkMovie.h │ │ │ └── SkPageFlipper.h │ │ ├── pdf │ │ │ ├── SkPDFDevice.h │ │ │ └── SkPDFDocument.h │ │ ├── pipe │ │ │ └── SkGPipe.h │ │ ├── ports │ │ │ ├── SkHarfBuzzFont.h │ │ │ ├── SkTypeface_android.h │ │ │ ├── SkTypeface_mac.h │ │ │ └── SkTypeface_win.h │ │ ├── svg │ │ │ ├── SkSVGAttribute.h │ │ │ ├── SkSVGBase.h │ │ │ ├── SkSVGPaintState.h │ │ │ ├── SkSVGParser.h │ │ │ └── SkSVGTypes.h │ │ ├── text │ │ │ └── SkTextLayout.h │ │ ├── utils │ │ │ ├── SkBoundaryPatch.h │ │ │ ├── SkCamera.h │ │ │ ├── SkCondVar.h │ │ │ ├── SkCountdown.h │ │ │ ├── SkCubicInterval.h │ │ │ ├── SkCullPoints.h │ │ │ ├── SkDeferredCanvas.h │ │ │ ├── SkDumpCanvas.h │ │ │ ├── SkInterpolator.h │ │ │ ├── SkJSON.h │ │ │ ├── SkLayer.h │ │ │ ├── SkMatrix44.h │ │ │ ├── SkMeshUtils.h │ │ │ ├── SkNWayCanvas.h │ │ │ ├── SkNinePatch.h │ │ │ ├── SkNullCanvas.h │ │ │ ├── SkParse.h │ │ │ ├── SkParsePaint.h │ │ │ ├── SkParsePath.h │ │ │ ├── SkPictureUtils.h │ │ │ ├── SkProxyCanvas.h │ │ │ ├── SkRunnable.h │ │ │ ├── SkThreadPool.h │ │ │ ├── SkUnitMappers.h │ │ │ ├── SkWGL.h │ │ │ ├── ios │ │ │ │ └── SkStream_NSData.h │ │ │ ├── mac │ │ │ │ └── SkCGUtils.h │ │ │ └── win │ │ │ │ ├── SkAutoCoInitialize.h │ │ │ │ ├── SkHRESULT.h │ │ │ │ ├── SkIStream.h │ │ │ │ └── SkTScopedComPtr.h │ │ ├── views │ │ │ ├── SkApplication.h │ │ │ ├── SkBGViewArtist.h │ │ │ ├── SkEvent.h │ │ │ ├── SkEventSink.h │ │ │ ├── SkKey.h │ │ │ ├── SkOSMenu.h │ │ │ ├── SkOSWindow_Android.h │ │ │ ├── SkOSWindow_Mac.h │ │ │ ├── SkOSWindow_NaCl.h │ │ │ ├── SkOSWindow_SDL.h │ │ │ ├── SkOSWindow_Unix.h │ │ │ ├── SkOSWindow_Win.h │ │ │ ├── SkOSWindow_iOS.h │ │ │ ├── SkStackViewLayout.h │ │ │ ├── SkSystemEventTypes.h │ │ │ ├── SkTextBox.h │ │ │ ├── SkTouchGesture.h │ │ │ ├── SkView.h │ │ │ ├── SkViewInflate.h │ │ │ ├── SkWidget.h │ │ │ ├── SkWindow.h │ │ │ ├── android │ │ │ │ └── AndroidKeyToSkKey.h │ │ │ ├── animated │ │ │ │ ├── SkBorderView.h │ │ │ │ ├── SkImageView.h │ │ │ │ ├── SkProgressBarView.h │ │ │ │ ├── SkScrollBarView.h │ │ │ │ └── SkWidgetViews.h │ │ │ └── unix │ │ │ │ ├── XkeysToSkKeys.h │ │ │ │ └── keysym2ucs.h │ │ └── xml │ │ │ ├── SkBML_WXMLParser.h │ │ │ ├── SkBML_XMLParser.h │ │ │ ├── SkDOM.h │ │ │ ├── SkJS.h │ │ │ ├── SkXMLParser.h │ │ │ └── SkXMLWriter.h │ ├── projects │ │ ├── skia.opensdf │ │ ├── skia.suo │ │ ├── skia.vcxproj │ │ └── skia.vcxproj.filters │ ├── src │ │ ├── animator │ │ │ ├── SkAnimate.h │ │ │ ├── SkAnimate3DSchema.xsd │ │ │ ├── SkAnimate3DSchema.xsx │ │ │ ├── SkAnimateActive.cpp │ │ │ ├── SkAnimateActive.h │ │ │ ├── SkAnimateBase.cpp │ │ │ ├── SkAnimateBase.h │ │ │ ├── SkAnimateField.cpp │ │ │ ├── SkAnimateMaker.cpp │ │ │ ├── SkAnimateMaker.h │ │ │ ├── SkAnimateProperties.h │ │ │ ├── SkAnimateSchema.xsd │ │ │ ├── SkAnimateSchema.xsx │ │ │ ├── SkAnimateSet.cpp │ │ │ ├── SkAnimateSet.h │ │ │ ├── SkAnimator.cpp │ │ │ ├── SkAnimatorScript.cpp │ │ │ ├── SkAnimatorScript.h │ │ │ ├── SkAnimatorScript2.cpp │ │ │ ├── SkAnimatorScript2.h │ │ │ ├── SkBoundable.cpp │ │ │ ├── SkBoundable.h │ │ │ ├── SkBuildCondensedInfo.cpp │ │ │ ├── SkCondensedDebug.cpp │ │ │ ├── SkCondensedRelease.cpp │ │ │ ├── SkDisplayAdd.cpp │ │ │ ├── SkDisplayAdd.h │ │ │ ├── SkDisplayApply.cpp │ │ │ ├── SkDisplayApply.h │ │ │ ├── SkDisplayBounds.cpp │ │ │ ├── SkDisplayBounds.h │ │ │ ├── SkDisplayEvent.cpp │ │ │ ├── SkDisplayEvent.h │ │ │ ├── SkDisplayEvents.cpp │ │ │ ├── SkDisplayEvents.h │ │ │ ├── SkDisplayInclude.cpp │ │ │ ├── SkDisplayInclude.h │ │ │ ├── SkDisplayInput.cpp │ │ │ ├── SkDisplayInput.h │ │ │ ├── SkDisplayList.cpp │ │ │ ├── SkDisplayList.h │ │ │ ├── SkDisplayMath.cpp │ │ │ ├── SkDisplayMath.h │ │ │ ├── SkDisplayMovie.cpp │ │ │ ├── SkDisplayMovie.h │ │ │ ├── SkDisplayNumber.cpp │ │ │ ├── SkDisplayNumber.h │ │ │ ├── SkDisplayPost.cpp │ │ │ ├── SkDisplayPost.h │ │ │ ├── SkDisplayRandom.cpp │ │ │ ├── SkDisplayRandom.h │ │ │ ├── SkDisplayScreenplay.cpp │ │ │ ├── SkDisplayScreenplay.h │ │ │ ├── SkDisplayType.cpp │ │ │ ├── SkDisplayType.h │ │ │ ├── SkDisplayTypes.cpp │ │ │ ├── SkDisplayTypes.h │ │ │ ├── SkDisplayXMLParser.cpp │ │ │ ├── SkDisplayXMLParser.h │ │ │ ├── SkDisplayable.cpp │ │ │ ├── SkDisplayable.h │ │ │ ├── SkDraw3D.cpp │ │ │ ├── SkDraw3D.h │ │ │ ├── SkDrawBitmap.cpp │ │ │ ├── SkDrawBitmap.h │ │ │ ├── SkDrawBlur.cpp │ │ │ ├── SkDrawBlur.h │ │ │ ├── SkDrawClip.cpp │ │ │ ├── SkDrawClip.h │ │ │ ├── SkDrawColor.cpp │ │ │ ├── SkDrawColor.h │ │ │ ├── SkDrawDash.cpp │ │ │ ├── SkDrawDash.h │ │ │ ├── SkDrawDiscrete.cpp │ │ │ ├── SkDrawDiscrete.h │ │ │ ├── SkDrawEmboss.cpp │ │ │ ├── SkDrawEmboss.h │ │ │ ├── SkDrawExtraPathEffect.cpp │ │ │ ├── SkDrawFull.cpp │ │ │ ├── SkDrawFull.h │ │ │ ├── SkDrawGradient.cpp │ │ │ ├── SkDrawGradient.h │ │ │ ├── SkDrawGroup.cpp │ │ │ ├── SkDrawGroup.h │ │ │ ├── SkDrawLine.cpp │ │ │ ├── SkDrawLine.h │ │ │ ├── SkDrawMatrix.cpp │ │ │ ├── SkDrawMatrix.h │ │ │ ├── SkDrawOval.cpp │ │ │ ├── SkDrawOval.h │ │ │ ├── SkDrawPaint.cpp │ │ │ ├── SkDrawPaint.h │ │ │ ├── SkDrawPath.cpp │ │ │ ├── SkDrawPath.h │ │ │ ├── SkDrawPoint.cpp │ │ │ ├── SkDrawPoint.h │ │ │ ├── SkDrawRectangle.cpp │ │ │ ├── SkDrawRectangle.h │ │ │ ├── SkDrawSaveLayer.cpp │ │ │ ├── SkDrawSaveLayer.h │ │ │ ├── SkDrawShader.cpp │ │ │ ├── SkDrawShader.h │ │ │ ├── SkDrawText.cpp │ │ │ ├── SkDrawText.h │ │ │ ├── SkDrawTextBox.cpp │ │ │ ├── SkDrawTextBox.h │ │ │ ├── SkDrawTo.cpp │ │ │ ├── SkDrawTo.h │ │ │ ├── SkDrawTransparentShader.cpp │ │ │ ├── SkDrawTransparentShader.h │ │ │ ├── SkDrawable.cpp │ │ │ ├── SkDrawable.h │ │ │ ├── SkDump.cpp │ │ │ ├── SkDump.h │ │ │ ├── SkExtraPathEffects.xsd │ │ │ ├── SkExtras.h │ │ │ ├── SkGetCondensedInfo.cpp │ │ │ ├── SkHitClear.cpp │ │ │ ├── SkHitClear.h │ │ │ ├── SkHitTest.cpp │ │ │ ├── SkHitTest.h │ │ │ ├── SkIntArray.h │ │ │ ├── SkMatrixParts.cpp │ │ │ ├── SkMatrixParts.h │ │ │ ├── SkMemberInfo.cpp │ │ │ ├── SkMemberInfo.h │ │ │ ├── SkOpArray.cpp │ │ │ ├── SkOpArray.h │ │ │ ├── SkOperand.h │ │ │ ├── SkOperand2.h │ │ │ ├── SkOperandInterpolator.h │ │ │ ├── SkOperandIterpolator.cpp │ │ │ ├── SkPaintParts.cpp │ │ │ ├── SkPaintParts.h │ │ │ ├── SkParseSVGPath.cpp │ │ │ ├── SkPathParts.cpp │ │ │ ├── SkPathParts.h │ │ │ ├── SkPostParts.cpp │ │ │ ├── SkPostParts.h │ │ │ ├── SkScript.cpp │ │ │ ├── SkScript.h │ │ │ ├── SkScript2.h │ │ │ ├── SkScriptCallBack.h │ │ │ ├── SkScriptDecompile.cpp │ │ │ ├── SkScriptRuntime.cpp │ │ │ ├── SkScriptRuntime.h │ │ │ ├── SkScriptTokenizer.cpp │ │ │ ├── SkSnapshot.cpp │ │ │ ├── SkSnapshot.h │ │ │ ├── SkTDArray_Experimental.h │ │ │ ├── SkTextOnPath.cpp │ │ │ ├── SkTextOnPath.h │ │ │ ├── SkTextToPath.cpp │ │ │ ├── SkTextToPath.h │ │ │ ├── SkTime.cpp │ │ │ ├── SkTypedArray.cpp │ │ │ ├── SkTypedArray.h │ │ │ ├── SkXMLAnimatorWriter.cpp │ │ │ ├── SkXMLAnimatorWriter.h │ │ │ └── thingstodo.txt │ │ ├── core │ │ │ ├── ARGB32_Clamp_Bilinear_BitmapShader.h │ │ │ ├── Sk64.cpp │ │ │ ├── SkAAClip.cpp │ │ │ ├── SkAAClip.h │ │ │ ├── SkAdvancedTypefaceMetrics.cpp │ │ │ ├── SkAlphaRuns.cpp │ │ │ ├── SkAnnotation.cpp │ │ │ ├── SkAntiRun.h │ │ │ ├── SkAutoKern.h │ │ │ ├── SkBBoxHierarchy.cpp │ │ │ ├── SkBBoxHierarchy.h │ │ │ ├── SkBBoxHierarchyRecord.cpp │ │ │ ├── SkBBoxHierarchyRecord.h │ │ │ ├── SkBBoxRecord.cpp │ │ │ ├── SkBBoxRecord.h │ │ │ ├── SkBitmap.cpp │ │ │ ├── SkBitmapHeap.cpp │ │ │ ├── SkBitmapHeap.h │ │ │ ├── SkBitmapProcShader.cpp │ │ │ ├── SkBitmapProcShader.h │ │ │ ├── SkBitmapProcState.cpp │ │ │ ├── SkBitmapProcState.h │ │ │ ├── SkBitmapProcState_filter.h │ │ │ ├── SkBitmapProcState_matrix.h │ │ │ ├── SkBitmapProcState_matrixProcs.cpp │ │ │ ├── SkBitmapProcState_procs.h │ │ │ ├── SkBitmapProcState_sample.h │ │ │ ├── SkBitmapProcState_shaderproc.h │ │ │ ├── SkBitmapSampler.cpp │ │ │ ├── SkBitmapSampler.h │ │ │ ├── SkBitmapSamplerTemplate.h │ │ │ ├── SkBitmapShader16BilerpTemplate.h │ │ │ ├── SkBitmapShaderTemplate.h │ │ │ ├── SkBitmap_scroll.cpp │ │ │ ├── SkBlitBWMaskTemplate.h │ │ │ ├── SkBlitMask.h │ │ │ ├── SkBlitMask_D32.cpp │ │ │ ├── SkBlitRow_D16.cpp │ │ │ ├── SkBlitRow_D32.cpp │ │ │ ├── SkBlitRow_D4444.cpp │ │ │ ├── SkBlitter.cpp │ │ │ ├── SkBlitter.h │ │ │ ├── SkBlitter_4444.cpp │ │ │ ├── SkBlitter_A1.cpp │ │ │ ├── SkBlitter_A8.cpp │ │ │ ├── SkBlitter_ARGB32.cpp │ │ │ ├── SkBlitter_RGB16.cpp │ │ │ ├── SkBlitter_Sprite.cpp │ │ │ ├── SkBuffer.cpp │ │ │ ├── SkBuffer.h │ │ │ ├── SkCanvas.cpp │ │ │ ├── SkChunkAlloc.cpp │ │ │ ├── SkClipStack.cpp │ │ │ ├── SkColor.cpp │ │ │ ├── SkColorFilter.cpp │ │ │ ├── SkColorTable.cpp │ │ │ ├── SkComposeShader.cpp │ │ │ ├── SkConcaveToTriangles.cpp │ │ │ ├── SkConcaveToTriangles.h │ │ │ ├── SkConfig8888.cpp │ │ │ ├── SkConfig8888.h │ │ │ ├── SkCordic.cpp │ │ │ ├── SkCordic.h │ │ │ ├── SkCoreBlitters.h │ │ │ ├── SkCubicClipper.cpp │ │ │ ├── SkCubicClipper.h │ │ │ ├── SkData.cpp │ │ │ ├── SkDebug.cpp │ │ │ ├── SkDeque.cpp │ │ │ ├── SkDescriptor.h │ │ │ ├── SkDevice.cpp │ │ │ ├── SkDeviceImageFilterProxy.h │ │ │ ├── SkDeviceProfile.cpp │ │ │ ├── SkDeviceProfile.h │ │ │ ├── SkDither.cpp │ │ │ ├── SkDraw.cpp │ │ │ ├── SkDrawProcs.h │ │ │ ├── SkEdge.cpp │ │ │ ├── SkEdge.h │ │ │ ├── SkEdgeBuilder.cpp │ │ │ ├── SkEdgeBuilder.h │ │ │ ├── SkEdgeClipper.cpp │ │ │ ├── SkEdgeClipper.h │ │ │ ├── SkFDot6.h │ │ │ ├── SkFP.h │ │ │ ├── SkFilterProc.cpp │ │ │ ├── SkFilterProc.h │ │ │ ├── SkFilterShader.h │ │ │ ├── SkFlate.cpp │ │ │ ├── SkFlattenable.cpp │ │ │ ├── SkFlattenableBuffers.cpp │ │ │ ├── SkFloat.cpp │ │ │ ├── SkFloat.h │ │ │ ├── SkFloatBits.cpp │ │ │ ├── SkFontHost.cpp │ │ │ ├── SkGeometry.cpp │ │ │ ├── SkGlyph.h │ │ │ ├── SkGlyphCache.cpp │ │ │ ├── SkGlyphCache.h │ │ │ ├── SkGraphics.cpp │ │ │ ├── SkImageFilter.cpp │ │ │ ├── SkInstCnt.cpp │ │ │ ├── SkLineClipper.cpp │ │ │ ├── SkMMapStream.cpp │ │ │ ├── SkMallocPixelRef.cpp │ │ │ ├── SkMask.cpp │ │ │ ├── SkMaskFilter.cpp │ │ │ ├── SkMaskGamma.cpp │ │ │ ├── SkMaskGamma.h │ │ │ ├── SkMath.cpp │ │ │ ├── SkMathPriv.h │ │ │ ├── SkMatrix.cpp │ │ │ ├── SkMemory_stdlib.cpp │ │ │ ├── SkMetaData.cpp │ │ │ ├── SkOrderedReadBuffer.cpp │ │ │ ├── SkOrderedReadBuffer.h │ │ │ ├── SkOrderedWriteBuffer.cpp │ │ │ ├── SkOrderedWriteBuffer.h │ │ │ ├── SkPackBits.cpp │ │ │ ├── SkPaint.cpp │ │ │ ├── SkPaintDefaults.h │ │ │ ├── SkPath.cpp │ │ │ ├── SkPathEffect.cpp │ │ │ ├── SkPathHeap.cpp │ │ │ ├── SkPathHeap.h │ │ │ ├── SkPathMeasure.cpp │ │ │ ├── SkPathRef.h │ │ │ ├── SkPerspIter.h │ │ │ ├── SkPicture.cpp │ │ │ ├── SkPictureFlat.cpp │ │ │ ├── SkPictureFlat.h │ │ │ ├── SkPicturePlayback.cpp │ │ │ ├── SkPicturePlayback.h │ │ │ ├── SkPictureRecord.cpp │ │ │ ├── SkPictureRecord.h │ │ │ ├── SkPictureStateTree.cpp │ │ │ ├── SkPictureStateTree.h │ │ │ ├── SkPixelRef.cpp │ │ │ ├── SkPoint.cpp │ │ │ ├── SkProcSpriteBlitter.cpp │ │ │ ├── SkPtrRecorder.cpp │ │ │ ├── SkPtrRecorder.h │ │ │ ├── SkQuadClipper.cpp │ │ │ ├── SkQuadClipper.h │ │ │ ├── SkRRect.cpp │ │ │ ├── SkRTree.cpp │ │ │ ├── SkRTree.h │ │ │ ├── SkRasterClip.cpp │ │ │ ├── SkRasterClip.h │ │ │ ├── SkRasterizer.cpp │ │ │ ├── SkRect.cpp │ │ │ ├── SkRefCnt.cpp │ │ │ ├── SkRefDict.cpp │ │ │ ├── SkRefDict.h │ │ │ ├── SkRegion.cpp │ │ │ ├── SkRegionPriv.h │ │ │ ├── SkRegion_path.cpp │ │ │ ├── SkRegion_rects.cpp │ │ │ ├── SkScalar.cpp │ │ │ ├── SkScalerContext.cpp │ │ │ ├── SkScalerContext.h │ │ │ ├── SkScan.cpp │ │ │ ├── SkScan.h │ │ │ ├── SkScanPriv.h │ │ │ ├── SkScan_AntiPath.cpp │ │ │ ├── SkScan_Antihair.cpp │ │ │ ├── SkScan_Hairline.cpp │ │ │ ├── SkScan_Path.cpp │ │ │ ├── SkShader.cpp │ │ │ ├── SkSinTable.h │ │ │ ├── SkSpriteBlitter.h │ │ │ ├── SkSpriteBlitterTemplate.h │ │ │ ├── SkSpriteBlitter_ARGB32.cpp │ │ │ ├── SkSpriteBlitter_RGB16.cpp │ │ │ ├── SkStream.cpp │ │ │ ├── SkString.cpp │ │ │ ├── SkStroke.cpp │ │ │ ├── SkStroke.h │ │ │ ├── SkStrokeRec.cpp │ │ │ ├── SkStrokerPriv.cpp │ │ │ ├── SkStrokerPriv.h │ │ │ ├── SkTLList.h │ │ │ ├── SkTLS.cpp │ │ │ ├── SkTLS.h │ │ │ ├── SkTRefArray.h │ │ │ ├── SkTSearch.cpp │ │ │ ├── SkTSort.h │ │ │ ├── SkTemplatesPriv.h │ │ │ ├── SkTextFormatParams.h │ │ │ ├── SkTextToPathIter.h │ │ │ ├── SkTileGrid.cpp │ │ │ ├── SkTileGrid.h │ │ │ ├── SkTileGridPicture.cpp │ │ │ ├── SkTypeface.cpp │ │ │ ├── SkTypefaceCache.cpp │ │ │ ├── SkTypefaceCache.h │ │ │ ├── SkUnPreMultiply.cpp │ │ │ ├── SkUtils.cpp │ │ │ ├── SkUtilsArm.cpp │ │ │ ├── SkUtilsArm.h │ │ │ ├── SkWriter32.cpp │ │ │ └── SkXfermode.cpp │ │ ├── device │ │ │ └── xps │ │ │ │ └── SkXPSDevice.cpp │ │ ├── effects │ │ │ ├── Sk1DPathEffect.cpp │ │ │ ├── Sk2DPathEffect.cpp │ │ │ ├── SkArithmeticMode.cpp │ │ │ ├── SkAvoidXfermode.cpp │ │ │ ├── SkBitmapSource.cpp │ │ │ ├── SkBlendImageFilter.cpp │ │ │ ├── SkBlurDrawLooper.cpp │ │ │ ├── SkBlurImageFilter.cpp │ │ │ ├── SkBlurMask.cpp │ │ │ ├── SkBlurMask.h │ │ │ ├── SkBlurMaskFilter.cpp │ │ │ ├── SkColorFilterImageFilter.cpp │ │ │ ├── SkColorFilters.cpp │ │ │ ├── SkColorMatrix.cpp │ │ │ ├── SkColorMatrixFilter.cpp │ │ │ ├── SkCornerPathEffect.cpp │ │ │ ├── SkDashPathEffect.cpp │ │ │ ├── SkDiscretePathEffect.cpp │ │ │ ├── SkEmbossMask.cpp │ │ │ ├── SkEmbossMask.h │ │ │ ├── SkEmbossMaskFilter.cpp │ │ │ ├── SkEmbossMask_Table.h │ │ │ ├── SkKernel33MaskFilter.cpp │ │ │ ├── SkLayerDrawLooper.cpp │ │ │ ├── SkLayerRasterizer.cpp │ │ │ ├── SkLightingImageFilter.cpp │ │ │ ├── SkMagnifierImageFilter.cpp │ │ │ ├── SkMatrixConvolutionImageFilter.cpp │ │ │ ├── SkMergeImageFilter.cpp │ │ │ ├── SkMorphologyImageFilter.cpp │ │ │ ├── SkOffsetImageFilter.cpp │ │ │ ├── SkPaintFlagsDrawFilter.cpp │ │ │ ├── SkPixelXorXfermode.cpp │ │ │ ├── SkPorterDuff.cpp │ │ │ ├── SkRectShape.cpp │ │ │ ├── SkSingleInputImageFilter.cpp │ │ │ ├── SkStippleMaskFilter.cpp │ │ │ ├── SkTableColorFilter.cpp │ │ │ ├── SkTableMaskFilter.cpp │ │ │ ├── SkTestImageFilters.cpp │ │ │ ├── SkTransparentShader.cpp │ │ │ └── gradients │ │ │ │ ├── SkBitmapCache.cpp │ │ │ │ ├── SkBitmapCache.h │ │ │ │ ├── SkClampRange.cpp │ │ │ │ ├── SkClampRange.h │ │ │ │ ├── SkGradientShader.cpp │ │ │ │ ├── SkGradientShaderPriv.h │ │ │ │ ├── SkLinearGradient.cpp │ │ │ │ ├── SkLinearGradient.h │ │ │ │ ├── SkRadialGradient.cpp │ │ │ │ ├── SkRadialGradient.h │ │ │ │ ├── SkRadialGradient_Table.h │ │ │ │ ├── SkSweepGradient.cpp │ │ │ │ ├── SkSweepGradient.h │ │ │ │ ├── SkTwoPointConicalGradient.cpp │ │ │ │ ├── SkTwoPointConicalGradient.h │ │ │ │ ├── SkTwoPointRadialGradient.cpp │ │ │ │ └── SkTwoPointRadialGradient.h │ │ ├── gpu │ │ │ ├── FlingState.cpp │ │ │ ├── GrAAConvexPathRenderer.cpp │ │ │ ├── GrAAConvexPathRenderer.h │ │ │ ├── GrAAHairLinePathRenderer.cpp │ │ │ ├── GrAAHairLinePathRenderer.h │ │ │ ├── GrAARectRenderer.cpp │ │ │ ├── GrAddPathRenderers_default.cpp │ │ │ ├── GrAddPathRenderers_none.cpp │ │ │ ├── GrAllocPool.cpp │ │ │ ├── GrAllocPool.h │ │ │ ├── GrAllocator.h │ │ │ ├── GrAtlas.cpp │ │ │ ├── GrAtlas.h │ │ │ ├── GrBinHashKey.h │ │ │ ├── GrBufferAllocPool.cpp │ │ │ ├── GrBufferAllocPool.h │ │ │ ├── GrCacheID.cpp │ │ │ ├── GrClipData.cpp │ │ │ ├── GrClipMaskCache.cpp │ │ │ ├── GrClipMaskCache.h │ │ │ ├── GrClipMaskManager.cpp │ │ │ ├── GrClipMaskManager.h │ │ │ ├── GrContext.cpp │ │ │ ├── GrDefaultPathRenderer.cpp │ │ │ ├── GrDefaultPathRenderer.h │ │ │ ├── GrDrawState.cpp │ │ │ ├── GrDrawState.h │ │ │ ├── GrDrawTarget.cpp │ │ │ ├── GrDrawTarget.h │ │ │ ├── GrEffect.cpp │ │ │ ├── GrGeometryBuffer.cpp │ │ │ ├── GrGeometryBuffer.h │ │ │ ├── GrGpu.cpp │ │ │ ├── GrGpu.h │ │ │ ├── GrGpuFactory.cpp │ │ │ ├── GrGpuVertex.h │ │ │ ├── GrInOrderDrawBuffer.cpp │ │ │ ├── GrInOrderDrawBuffer.h │ │ │ ├── GrIndexBuffer.h │ │ │ ├── GrMemory.cpp │ │ │ ├── GrMemoryPool.cpp │ │ │ ├── GrMemoryPool.h │ │ │ ├── GrPath.cpp │ │ │ ├── GrPath.h │ │ │ ├── GrPathRenderer.cpp │ │ │ ├── GrPathRenderer.h │ │ │ ├── GrPathRendererChain.cpp │ │ │ ├── GrPathUtils.cpp │ │ │ ├── GrPathUtils.h │ │ │ ├── GrPlotMgr.h │ │ │ ├── GrRectanizer.cpp │ │ │ ├── GrRectanizer.h │ │ │ ├── GrRectanizer_fifo.cpp │ │ │ ├── GrRedBlackTree.h │ │ │ ├── GrReducedClip.cpp │ │ │ ├── GrReducedClip.h │ │ │ ├── GrRenderTarget.cpp │ │ │ ├── GrResource.cpp │ │ │ ├── GrResourceCache.cpp │ │ │ ├── GrResourceCache.h │ │ │ ├── GrSWMaskHelper.cpp │ │ │ ├── GrSWMaskHelper.h │ │ │ ├── GrSoftwarePathRenderer.cpp │ │ │ ├── GrSoftwarePathRenderer.h │ │ │ ├── GrStencil.cpp │ │ │ ├── GrStencil.h │ │ │ ├── GrStencilAndCoverPathRenderer.cpp │ │ │ ├── GrStencilAndCoverPathRenderer.h │ │ │ ├── GrStencilBuffer.cpp │ │ │ ├── GrStencilBuffer.h │ │ │ ├── GrSurface.cpp │ │ │ ├── GrTBSearch.h │ │ │ ├── GrTDArray.h │ │ │ ├── GrTHashCache.h │ │ │ ├── GrTemplates.h │ │ │ ├── GrTextContext.cpp │ │ │ ├── GrTextStrike.cpp │ │ │ ├── GrTextStrike.h │ │ │ ├── GrTextStrike_impl.h │ │ │ ├── GrTexture.cpp │ │ │ ├── GrTextureAccess.cpp │ │ │ ├── GrVertexBuffer.h │ │ │ ├── SkGpuDevice.cpp │ │ │ ├── SkGr.cpp │ │ │ ├── SkGrFontScaler.cpp │ │ │ ├── SkGrPixelRef.cpp │ │ │ ├── SkGrTexturePixelRef.cpp │ │ │ ├── effects │ │ │ │ ├── Gr1DKernelEffect.h │ │ │ │ ├── GrConfigConversionEffect.cpp │ │ │ │ ├── GrConfigConversionEffect.h │ │ │ │ ├── GrConvolutionEffect.cpp │ │ │ │ ├── GrConvolutionEffect.h │ │ │ │ ├── GrSingleTextureEffect.cpp │ │ │ │ ├── GrSingleTextureEffect.h │ │ │ │ ├── GrTextureDomainEffect.cpp │ │ │ │ ├── GrTextureDomainEffect.h │ │ │ │ ├── GrTextureStripAtlas.cpp │ │ │ │ └── GrTextureStripAtlas.h │ │ │ ├── gl │ │ │ │ ├── GrGLCaps.cpp │ │ │ │ ├── GrGLCaps.h │ │ │ │ ├── GrGLContextInfo.cpp │ │ │ │ ├── GrGLContextInfo.h │ │ │ │ ├── GrGLCreateNativeInterface_none.cpp │ │ │ │ ├── GrGLCreateNullInterface.cpp │ │ │ │ ├── GrGLDefaultInterface_native.cpp │ │ │ │ ├── GrGLDefaultInterface_none.cpp │ │ │ │ ├── GrGLDefines.h │ │ │ │ ├── GrGLEffect.cpp │ │ │ │ ├── GrGLEffect.h │ │ │ │ ├── GrGLEffectMatrix.cpp │ │ │ │ ├── GrGLEffectMatrix.h │ │ │ │ ├── GrGLIRect.h │ │ │ │ ├── GrGLIndexBuffer.cpp │ │ │ │ ├── GrGLIndexBuffer.h │ │ │ │ ├── GrGLInterface.cpp │ │ │ │ ├── GrGLPath.cpp │ │ │ │ ├── GrGLPath.h │ │ │ │ ├── GrGLProgram.cpp │ │ │ │ ├── GrGLProgram.h │ │ │ │ ├── GrGLRenderTarget.cpp │ │ │ │ ├── GrGLRenderTarget.h │ │ │ │ ├── GrGLSL.cpp │ │ │ │ ├── GrGLSL.h │ │ │ │ ├── GrGLShaderBuilder.cpp │ │ │ │ ├── GrGLShaderBuilder.h │ │ │ │ ├── GrGLShaderVar.h │ │ │ │ ├── GrGLStencilBuffer.cpp │ │ │ │ ├── GrGLStencilBuffer.h │ │ │ │ ├── GrGLTexture.cpp │ │ │ │ ├── GrGLTexture.h │ │ │ │ ├── GrGLUniformHandle.h │ │ │ │ ├── GrGLUniformManager.cpp │ │ │ │ ├── GrGLUniformManager.h │ │ │ │ ├── GrGLUtil.cpp │ │ │ │ ├── GrGLUtil.h │ │ │ │ ├── GrGLVertexBuffer.cpp │ │ │ │ ├── GrGLVertexBuffer.h │ │ │ │ ├── GrGpuGL.cpp │ │ │ │ ├── GrGpuGL.h │ │ │ │ ├── GrGpuGL_program.cpp │ │ │ │ ├── SkGLContext.cpp │ │ │ │ ├── SkNullGLContext.cpp │ │ │ │ ├── android │ │ │ │ │ ├── GrGLCreateNativeInterface_android.cpp │ │ │ │ │ └── SkNativeGLContext_android.cpp │ │ │ │ ├── angle │ │ │ │ │ ├── GrGLCreateANGLEInterface.cpp │ │ │ │ │ └── SkANGLEGLContext.cpp │ │ │ │ ├── debug │ │ │ │ │ ├── GrBufferObj.cpp │ │ │ │ │ ├── GrBufferObj.h │ │ │ │ │ ├── GrDebugGL.cpp │ │ │ │ │ ├── GrDebugGL.h │ │ │ │ │ ├── GrFBBindableObj.h │ │ │ │ │ ├── GrFakeRefObj.h │ │ │ │ │ ├── GrFrameBufferObj.cpp │ │ │ │ │ ├── GrFrameBufferObj.h │ │ │ │ │ ├── GrGLCreateDebugInterface.cpp │ │ │ │ │ ├── GrProgramObj.cpp │ │ │ │ │ ├── GrProgramObj.h │ │ │ │ │ ├── GrRenderBufferObj.h │ │ │ │ │ ├── GrShaderObj.cpp │ │ │ │ │ ├── GrShaderObj.h │ │ │ │ │ ├── GrTextureObj.cpp │ │ │ │ │ ├── GrTextureObj.h │ │ │ │ │ ├── GrTextureUnitObj.cpp │ │ │ │ │ ├── GrTextureUnitObj.h │ │ │ │ │ └── SkDebugGLContext.cpp │ │ │ │ ├── iOS │ │ │ │ │ ├── GrGLCreateNativeInterface_iOS.cpp │ │ │ │ │ └── SkNativeGLContext_iOS.mm │ │ │ │ ├── mac │ │ │ │ │ ├── GrGLCreateNativeInterface_mac.cpp │ │ │ │ │ └── SkNativeGLContext_mac.cpp │ │ │ │ ├── mesa │ │ │ │ │ ├── GrGLCreateMesaInterface.cpp │ │ │ │ │ └── SkMesaGLContext.cpp │ │ │ │ ├── nacl │ │ │ │ │ └── SkNativeGLContext_nacl.cpp │ │ │ │ ├── unix │ │ │ │ │ ├── GrGLCreateNativeInterface_unix.cpp │ │ │ │ │ └── SkNativeGLContext_unix.cpp │ │ │ │ └── win │ │ │ │ │ ├── GrGLCreateNativeInterface_win.cpp │ │ │ │ │ └── SkNativeGLContext_win.cpp │ │ │ └── gr_unittests.cpp │ │ ├── image │ │ │ ├── SkDataPixelRef.cpp │ │ │ ├── SkDataPixelRef.h │ │ │ ├── SkImage.cpp │ │ │ ├── SkImagePriv.cpp │ │ │ ├── SkImagePriv.h │ │ │ ├── SkImage_Base.h │ │ │ ├── SkImage_Codec.cpp │ │ │ ├── SkImage_Gpu.cpp │ │ │ ├── SkImage_Picture.cpp │ │ │ ├── SkImage_Raster.cpp │ │ │ ├── SkSurface.cpp │ │ │ ├── SkSurface_Base.h │ │ │ ├── SkSurface_Gpu.cpp │ │ │ ├── SkSurface_Picture.cpp │ │ │ └── SkSurface_Raster.cpp │ │ ├── images │ │ │ ├── SkBitmapFactory.cpp │ │ │ ├── SkFDStream.cpp │ │ │ ├── SkImageDecoder.cpp │ │ │ ├── SkImageDecoder_Factory.cpp │ │ │ ├── SkImageDecoder_libbmp.cpp │ │ │ ├── SkImageDecoder_libgif.cpp │ │ │ ├── SkImageDecoder_libico.cpp │ │ │ ├── SkImageDecoder_libjpeg.cpp │ │ │ ├── SkImageDecoder_libpng.cpp │ │ │ ├── SkImageDecoder_wbmp.cpp │ │ │ ├── SkImageEncoder.cpp │ │ │ ├── SkImageEncoder_Factory.cpp │ │ │ ├── SkImageRef.cpp │ │ │ ├── SkImageRefPool.cpp │ │ │ ├── SkImageRefPool.h │ │ │ ├── SkImageRef_GlobalPool.cpp │ │ │ ├── SkImages.cpp │ │ │ ├── SkJpegUtility.cpp │ │ │ ├── SkMovie.cpp │ │ │ ├── SkMovie_gif.cpp │ │ │ ├── SkPageFlipper.cpp │ │ │ ├── SkScaledBitmapSampler.cpp │ │ │ ├── SkScaledBitmapSampler.h │ │ │ ├── bmpdecoderhelper.cpp │ │ │ ├── bmpdecoderhelper.h │ │ │ └── transform_scanline.h │ │ ├── opts │ │ │ ├── SkBitmapProcState_arm_neon.cpp │ │ │ ├── SkBitmapProcState_filter_neon.h │ │ │ ├── SkBitmapProcState_matrixProcs_neon.cpp │ │ │ ├── SkBitmapProcState_matrix_clamp_neon.h │ │ │ ├── SkBitmapProcState_matrix_repeat_neon.h │ │ │ ├── SkBitmapProcState_opts_SSE2.cpp │ │ │ ├── SkBitmapProcState_opts_SSE2.h │ │ │ ├── SkBitmapProcState_opts_SSSE3.cpp │ │ │ ├── SkBitmapProcState_opts_SSSE3.h │ │ │ ├── SkBitmapProcState_opts_arm.cpp │ │ │ ├── SkBitmapProcState_opts_none.cpp │ │ │ ├── SkBlitRect_opts_SSE2.cpp │ │ │ ├── SkBlitRect_opts_SSE2.h │ │ │ ├── SkBlitRow_opts_SSE2.cpp │ │ │ ├── SkBlitRow_opts_SSE2.h │ │ │ ├── SkBlitRow_opts_arm.cpp │ │ │ ├── SkBlitRow_opts_arm.h │ │ │ ├── SkBlitRow_opts_arm_neon.cpp │ │ │ ├── SkBlitRow_opts_none.cpp │ │ │ ├── SkCachePreload_arm.h │ │ │ ├── SkUtils_opts_SSE2.cpp │ │ │ ├── SkUtils_opts_SSE2.h │ │ │ ├── SkUtils_opts_none.cpp │ │ │ ├── memset.arm.S │ │ │ ├── memset16_neon.S │ │ │ ├── memset32_neon.S │ │ │ ├── opts_check_SSE2.cpp │ │ │ └── opts_check_arm.cpp │ │ ├── pdf │ │ │ ├── SkPDFCatalog.cpp │ │ │ ├── SkPDFCatalog.h │ │ │ ├── SkPDFDevice.cpp │ │ │ ├── SkPDFDocument.cpp │ │ │ ├── SkPDFFont.cpp │ │ │ ├── SkPDFFont.h │ │ │ ├── SkPDFFontImpl.h │ │ │ ├── SkPDFFormXObject.cpp │ │ │ ├── SkPDFFormXObject.h │ │ │ ├── SkPDFGraphicState.cpp │ │ │ ├── SkPDFGraphicState.h │ │ │ ├── SkPDFImage.cpp │ │ │ ├── SkPDFImage.h │ │ │ ├── SkPDFPage.cpp │ │ │ ├── SkPDFPage.h │ │ │ ├── SkPDFShader.cpp │ │ │ ├── SkPDFShader.h │ │ │ ├── SkPDFStream.cpp │ │ │ ├── SkPDFStream.h │ │ │ ├── SkPDFTypes.cpp │ │ │ ├── SkPDFTypes.h │ │ │ ├── SkPDFUtils.cpp │ │ │ └── SkPDFUtils.h │ │ ├── pipe │ │ │ ├── SkGPipePriv.h │ │ │ ├── SkGPipeRead.cpp │ │ │ ├── SkGPipeWrite.cpp │ │ │ └── utils │ │ │ │ ├── SamplePipeControllers.cpp │ │ │ │ └── SamplePipeControllers.h │ │ ├── ports │ │ │ ├── FontHostConfiguration_android.cpp │ │ │ ├── FontHostConfiguration_android.h │ │ │ ├── SkDebug_android.cpp │ │ │ ├── SkDebug_brew.cpp │ │ │ ├── SkDebug_nacl.cpp │ │ │ ├── SkDebug_stdio.cpp │ │ │ ├── SkDebug_win.cpp │ │ │ ├── SkFontDescriptor.cpp │ │ │ ├── SkFontDescriptor.h │ │ │ ├── SkFontHost_FONTPATH.cpp │ │ │ ├── SkFontHost_FreeType.cpp │ │ │ ├── SkFontHost_FreeType_common.cpp │ │ │ ├── SkFontHost_FreeType_common.h │ │ │ ├── SkFontHost_android.cpp │ │ │ ├── SkFontHost_ascender.cpp │ │ │ ├── SkFontHost_fontconfig.cpp │ │ │ ├── SkFontHost_freetype_mac.cpp │ │ │ ├── SkFontHost_linux.cpp │ │ │ ├── SkFontHost_mac.cpp │ │ │ ├── SkFontHost_mac_atsui.cpp │ │ │ ├── SkFontHost_mac_coretext.cpp │ │ │ ├── SkFontHost_none.cpp │ │ │ ├── SkFontHost_sandbox_none.cpp │ │ │ ├── SkFontHost_simple.cpp │ │ │ ├── SkFontHost_tables.cpp │ │ │ ├── SkFontHost_win.cpp │ │ │ ├── SkFontHost_win_dw.cpp │ │ │ ├── SkGlobalInitialization_chromium.cpp │ │ │ ├── SkGlobalInitialization_default.cpp │ │ │ ├── SkHarfBuzzFont.cpp │ │ │ ├── SkImageDecoder_CG.cpp │ │ │ ├── SkImageDecoder_WIC.cpp │ │ │ ├── SkImageDecoder_empty.cpp │ │ │ ├── SkImageRef_ashmem.cpp │ │ │ ├── SkImageRef_ashmem.h │ │ │ ├── SkMemory_brew.cpp │ │ │ ├── SkMemory_malloc.cpp │ │ │ ├── SkMemory_mozalloc.cpp │ │ │ ├── SkOSFile_brew.cpp │ │ │ ├── SkOSFile_stdio.cpp │ │ │ ├── SkThread_none.cpp │ │ │ ├── SkThread_pthread.cpp │ │ │ ├── SkThread_win.cpp │ │ │ ├── SkTime_Unix.cpp │ │ │ ├── SkTime_win.cpp │ │ │ ├── SkXMLParser_empty.cpp │ │ │ ├── SkXMLParser_expat.cpp │ │ │ ├── SkXMLParser_tinyxml.cpp │ │ │ └── SkXMLPullParser_expat.cpp │ │ ├── sfnt │ │ │ ├── SkIBMFamilyClass.h │ │ │ ├── SkOTTableTypes.h │ │ │ ├── SkOTTable_OS_2.h │ │ │ ├── SkOTTable_OS_2_V0.h │ │ │ ├── SkOTTable_OS_2_V1.h │ │ │ ├── SkOTTable_OS_2_V2.h │ │ │ ├── SkOTTable_OS_2_V3.h │ │ │ ├── SkOTTable_OS_2_V4.h │ │ │ ├── SkOTTable_OS_2_VA.h │ │ │ ├── SkOTTable_glyf.h │ │ │ ├── SkOTTable_head.h │ │ │ ├── SkOTTable_hhea.h │ │ │ ├── SkOTTable_loca.h │ │ │ ├── SkOTTable_maxp.h │ │ │ ├── SkOTTable_maxp_CFF.h │ │ │ ├── SkOTTable_maxp_TT.h │ │ │ ├── SkOTTable_name.h │ │ │ ├── SkOTTable_post.h │ │ │ ├── SkOTUtils.cpp │ │ │ ├── SkOTUtils.h │ │ │ ├── SkPanose.h │ │ │ ├── SkPreprocessorSeq.h │ │ │ ├── SkSFNTHeader.h │ │ │ └── SkTypedEnum.h │ │ ├── svg │ │ │ ├── SkSVG.cpp │ │ │ ├── SkSVGCircle.cpp │ │ │ ├── SkSVGCircle.h │ │ │ ├── SkSVGClipPath.cpp │ │ │ ├── SkSVGClipPath.h │ │ │ ├── SkSVGDefs.cpp │ │ │ ├── SkSVGDefs.h │ │ │ ├── SkSVGElements.cpp │ │ │ ├── SkSVGElements.h │ │ │ ├── SkSVGEllipse.cpp │ │ │ ├── SkSVGEllipse.h │ │ │ ├── SkSVGFeColorMatrix.cpp │ │ │ ├── SkSVGFeColorMatrix.h │ │ │ ├── SkSVGFilter.cpp │ │ │ ├── SkSVGFilter.h │ │ │ ├── SkSVGG.cpp │ │ │ ├── SkSVGG.h │ │ │ ├── SkSVGGradient.cpp │ │ │ ├── SkSVGGradient.h │ │ │ ├── SkSVGGroup.cpp │ │ │ ├── SkSVGGroup.h │ │ │ ├── SkSVGImage.cpp │ │ │ ├── SkSVGImage.h │ │ │ ├── SkSVGLine.cpp │ │ │ ├── SkSVGLine.h │ │ │ ├── SkSVGLinearGradient.cpp │ │ │ ├── SkSVGLinearGradient.h │ │ │ ├── SkSVGMask.cpp │ │ │ ├── SkSVGMask.h │ │ │ ├── SkSVGMetadata.cpp │ │ │ ├── SkSVGMetadata.h │ │ │ ├── SkSVGPaintState.cpp │ │ │ ├── SkSVGParser.cpp │ │ │ ├── SkSVGPath.cpp │ │ │ ├── SkSVGPath.h │ │ │ ├── SkSVGPolygon.cpp │ │ │ ├── SkSVGPolygon.h │ │ │ ├── SkSVGPolyline.cpp │ │ │ ├── SkSVGPolyline.h │ │ │ ├── SkSVGRadialGradient.cpp │ │ │ ├── SkSVGRadialGradient.h │ │ │ ├── SkSVGRect.cpp │ │ │ ├── SkSVGRect.h │ │ │ ├── SkSVGSVG.cpp │ │ │ ├── SkSVGSVG.h │ │ │ ├── SkSVGStop.cpp │ │ │ ├── SkSVGStop.h │ │ │ ├── SkSVGSymbol.cpp │ │ │ ├── SkSVGSymbol.h │ │ │ ├── SkSVGText.cpp │ │ │ ├── SkSVGText.h │ │ │ ├── SkSVGUse.cpp │ │ │ └── SkSVGUse.h │ │ ├── text │ │ │ └── SkTextLayout.cpp │ │ ├── utils │ │ │ ├── SkBase64.cpp │ │ │ ├── SkBase64.h │ │ │ ├── SkBitSet.cpp │ │ │ ├── SkBitSet.h │ │ │ ├── SkBitmapChecksummer.cpp │ │ │ ├── SkBitmapChecksummer.h │ │ │ ├── SkBitmapTransformer.cpp │ │ │ ├── SkBitmapTransformer.h │ │ │ ├── SkBoundaryPatch.cpp │ │ │ ├── SkCamera.cpp │ │ │ ├── SkCityHash.cpp │ │ │ ├── SkCityHash.h │ │ │ ├── SkCondVar.cpp │ │ │ ├── SkCountdown.cpp │ │ │ ├── SkCubicInterval.cpp │ │ │ ├── SkCullPoints.cpp │ │ │ ├── SkDebugTrace.h │ │ │ ├── SkDeferredCanvas.cpp │ │ │ ├── SkDumpCanvas.cpp │ │ │ ├── SkFloatUtils.h │ │ │ ├── SkInterpolator.cpp │ │ │ ├── SkJSON.cpp │ │ │ ├── SkLayer.cpp │ │ │ ├── SkMatrix44.cpp │ │ │ ├── SkMeshUtils.cpp │ │ │ ├── SkNWayCanvas.cpp │ │ │ ├── SkNinePatch.cpp │ │ │ ├── SkNullCanvas.cpp │ │ │ ├── SkOSFile.cpp │ │ │ ├── SkParse.cpp │ │ │ ├── SkParseColor.cpp │ │ │ ├── SkParsePath.cpp │ │ │ ├── SkPictureUtils.cpp │ │ │ ├── SkProxyCanvas.cpp │ │ │ ├── SkThreadPool.cpp │ │ │ ├── SkThreadUtils.h │ │ │ ├── SkThreadUtils_pthread.cpp │ │ │ ├── SkThreadUtils_pthread.h │ │ │ ├── SkThreadUtils_pthread_linux.cpp │ │ │ ├── SkThreadUtils_pthread_mach.cpp │ │ │ ├── SkThreadUtils_pthread_other.cpp │ │ │ ├── SkThreadUtils_win.cpp │ │ │ ├── SkThreadUtils_win.h │ │ │ ├── SkUnitMappers.cpp │ │ │ ├── android │ │ │ │ ├── ashmem.c │ │ │ │ └── ashmem.h │ │ │ ├── cityhash │ │ │ │ ├── README │ │ │ │ └── config.h │ │ │ ├── ios │ │ │ │ ├── SkFontHost_iOS.mm │ │ │ │ ├── SkImageDecoder_iOS.mm │ │ │ │ ├── SkOSFile_iOS.mm │ │ │ │ └── SkStream_NSData.mm │ │ │ ├── mac │ │ │ │ ├── SkBitmap_Mac.cpp │ │ │ │ ├── SkCreateCGImageRef.cpp │ │ │ │ └── SkStream_mac.cpp │ │ │ └── win │ │ │ │ ├── SkAutoCoInitialize.cpp │ │ │ │ ├── SkDWriteFontFileStream.cpp │ │ │ │ ├── SkDWriteFontFileStream.h │ │ │ │ ├── SkDWriteGeometrySink.cpp │ │ │ │ ├── SkDWriteGeometrySink.h │ │ │ │ ├── SkHRESULT.cpp │ │ │ │ ├── SkIStream.cpp │ │ │ │ └── SkWGL_win.cpp │ │ ├── views │ │ │ ├── SkBGViewArtist.cpp │ │ │ ├── SkEvent.cpp │ │ │ ├── SkEventSink.cpp │ │ │ ├── SkOSMenu.cpp │ │ │ ├── SkParsePaint.cpp │ │ │ ├── SkProgressView.cpp │ │ │ ├── SkStackViewLayout.cpp │ │ │ ├── SkTagList.cpp │ │ │ ├── SkTagList.h │ │ │ ├── SkTextBox.cpp │ │ │ ├── SkTouchGesture.cpp │ │ │ ├── SkView.cpp │ │ │ ├── SkViewInflate.cpp │ │ │ ├── SkViewPriv.cpp │ │ │ ├── SkViewPriv.h │ │ │ ├── SkWidgets.cpp │ │ │ ├── SkWindow.cpp │ │ │ ├── animated │ │ │ │ ├── SkBorderView.cpp │ │ │ │ ├── SkImageView.cpp │ │ │ │ ├── SkProgressBarView.cpp │ │ │ │ ├── SkScrollBarView.cpp │ │ │ │ ├── SkStaticTextView.cpp │ │ │ │ └── SkWidgetViews.cpp │ │ │ ├── ios │ │ │ │ └── SkOSWindow_iOS.mm │ │ │ ├── mac │ │ │ │ ├── SampleApp-Info.plist │ │ │ │ ├── SampleApp.xib │ │ │ │ ├── SampleAppDelegate.h │ │ │ │ ├── SampleAppDelegate.mm │ │ │ │ ├── SkEventNotifier.h │ │ │ │ ├── SkEventNotifier.mm │ │ │ │ ├── SkNSView.h │ │ │ │ ├── SkNSView.mm │ │ │ │ ├── SkOSWindow_Mac.cpp │ │ │ │ ├── SkOSWindow_Mac.mm │ │ │ │ ├── SkOptionsTableView.h │ │ │ │ ├── SkOptionsTableView.mm │ │ │ │ ├── SkSampleNSView.h │ │ │ │ ├── SkSampleNSView.mm │ │ │ │ ├── SkTextFieldCell.h │ │ │ │ ├── SkTextFieldCell.m │ │ │ │ └── skia_mac.mm │ │ │ ├── sdl │ │ │ │ └── SkOSWindow_SDL.cpp │ │ │ ├── unix │ │ │ │ ├── SkOSWindow_Unix.cpp │ │ │ │ ├── keysym2ucs.c │ │ │ │ └── skia_unix.cpp │ │ │ ├── views_files.mk │ │ │ └── win │ │ │ │ ├── SkOSWindow_win.cpp │ │ │ │ └── skia_win.cpp │ │ └── xml │ │ │ ├── SkBML_Verbs.h │ │ │ ├── SkBML_XMLParser.cpp │ │ │ ├── SkDOM.cpp │ │ │ ├── SkJS.cpp │ │ │ ├── SkJSDisplayable.cpp │ │ │ ├── SkXMLParser.cpp │ │ │ ├── SkXMLPullParser.cpp │ │ │ ├── SkXMLWriter.cpp │ │ │ └── xml_files.mk │ └── third_party │ │ └── externals │ │ ├── cityhash │ │ ├── COPYING │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── NEWS │ │ ├── README │ │ ├── aclocal.m4 │ │ ├── config.guess │ │ ├── config.h.in │ │ ├── config.sub │ │ ├── configure │ │ ├── configure.ac │ │ ├── depcomp │ │ ├── install-sh │ │ ├── ltmain.sh │ │ ├── m4 │ │ │ ├── libtool.m4 │ │ │ ├── ltoptions.m4 │ │ │ ├── ltsugar.m4 │ │ │ ├── ltversion.m4 │ │ │ └── lt~obsolete.m4 │ │ ├── missing │ │ └── src │ │ │ ├── Makefile.am │ │ │ ├── Makefile.in │ │ │ ├── city-test.cc │ │ │ ├── city.cc │ │ │ ├── city.h │ │ │ └── citycrc.h │ │ ├── libjpeg │ │ ├── LICENSE │ │ ├── README │ │ ├── README.chromium │ │ ├── jcapimin.c │ │ ├── jcapistd.c │ │ ├── jccoefct.c │ │ ├── jccolor.c │ │ ├── jcdctmgr.c │ │ ├── jchuff.c │ │ ├── jchuff.h │ │ ├── jcinit.c │ │ ├── jcmainct.c │ │ ├── jcmarker.c │ │ ├── jcmaster.c │ │ ├── jcomapi.c │ │ ├── jconfig.h │ │ ├── jcparam.c │ │ ├── jcphuff.c │ │ ├── jcprepct.c │ │ ├── jcsample.c │ │ ├── jdapimin.c │ │ ├── jdapistd.c │ │ ├── jdatadst.c │ │ ├── jdatasrc.c │ │ ├── jdcoefct.c │ │ ├── jdcolor.c │ │ ├── jdct.h │ │ ├── jddctmgr.c │ │ ├── jdhuff.c │ │ ├── jdhuff.h │ │ ├── jdinput.c │ │ ├── jdmainct.c │ │ ├── jdmarker.c │ │ ├── jdmaster.c │ │ ├── jdmerge.c │ │ ├── jdphuff.c │ │ ├── jdpostct.c │ │ ├── jdsample.c │ │ ├── jerror.c │ │ ├── jerror.h │ │ ├── jfdctflt.c │ │ ├── jfdctfst.c │ │ ├── jfdctint.c │ │ ├── jidctflt.c │ │ ├── jidctfst.c │ │ ├── jidctint.c │ │ ├── jidctred.c │ │ ├── jinclude.h │ │ ├── jmemmgr.c │ │ ├── jmemnobs.c │ │ ├── jmemsys.h │ │ ├── jmorecfg.h │ │ ├── jpegint.h │ │ ├── jpeglib.h │ │ ├── jpeglibmangler.h │ │ ├── jquant1.c │ │ ├── jquant2.c │ │ ├── jutils.c │ │ ├── jversion.h │ │ └── libjpeg.gyp │ │ └── libpng │ │ ├── png.c │ │ ├── png.h │ │ ├── pngconf.h │ │ ├── pngdebug.h │ │ ├── pngerror.c │ │ ├── pngget.c │ │ ├── pnginfo.h │ │ ├── pnglibconf.h │ │ ├── pngmem.c │ │ ├── pngpread.c │ │ ├── pngpriv.h │ │ ├── pngread.c │ │ ├── pngrio.c │ │ ├── pngrtran.c │ │ ├── pngrutil.c │ │ ├── pngset.c │ │ ├── pngstruct.h │ │ ├── pngtest.c │ │ ├── pngtrans.c │ │ ├── pngwio.c │ │ ├── pngwrite.c │ │ ├── pngwtran.c │ │ └── pngwutil.c └── zlib │ ├── projects │ ├── vc100 │ │ ├── zlib.vcxproj │ │ └── zlib.vcxproj.filters │ └── vc80 │ │ └── zlib.vcproj │ └── src │ ├── adler32.c │ ├── compress.c │ ├── crc32.c │ ├── crc32.h │ ├── deflate.c │ ├── deflate.h │ ├── infback.c │ ├── inffast.c │ ├── inffast.h │ ├── inffixed.h │ ├── inflate.c │ ├── inflate.h │ ├── inftrees.c │ ├── inftrees.h │ ├── trees.c │ ├── trees.h │ ├── uncompr.c │ ├── zconf.h │ ├── zlib.h │ ├── zutil.c │ └── zutil.h ├── ui.suo ├── ui.vcxproj └── ui.vcxproj.filters /README.md: -------------------------------------------------------------------------------- 1 | KUI 2 | === 3 | KUI is a c++ ui library base on skia, gdi and gdi+. 4 | -------------------------------------------------------------------------------- /demo/Resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/demo/Resource.h -------------------------------------------------------------------------------- /demo/demo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/demo/demo.ico -------------------------------------------------------------------------------- /demo/demo.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/demo/demo.rc -------------------------------------------------------------------------------- /demo/small.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/demo/small.ico -------------------------------------------------------------------------------- /demo/src/AnimatorView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/demo/src/AnimatorView.cpp -------------------------------------------------------------------------------- /demo/src/AnimatorView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UIDefine.h" 4 | #include "DemoView.h" 5 | 6 | class Image; 7 | class KPoint; 8 | 9 | class AnimatorView : public DemoView 10 | { 11 | public: 12 | AnimatorView(); 13 | virtual ~AnimatorView(); 14 | 15 | // View 16 | virtual bool init() override; 17 | 18 | // DemoView 19 | virtual bool doDraw(Canvas& canvas) override; 20 | 21 | protected: 22 | virtual Image* createImage() = 0; 23 | 24 | protected: 25 | Image* _imageQQ; 26 | int _alpha; 27 | float _degrees; 28 | Image* _imageFlower; 29 | }; -------------------------------------------------------------------------------- /demo/src/DemoView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/demo/src/DemoView.cpp -------------------------------------------------------------------------------- /demo/src/DemoView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "View.h" 4 | 5 | class DemoView : public View 6 | { 7 | public: 8 | DemoView(); 9 | virtual ~DemoView(); 10 | 11 | // View 12 | virtual bool draw(Canvas& canvas) override; 13 | 14 | protected: 15 | virtual bool doDraw(Canvas& canvas) = 0; 16 | void showGraphicsType(Canvas& canvas); 17 | 18 | protected: 19 | DWORD _startTime; 20 | }; -------------------------------------------------------------------------------- /demo/src/GdiView.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "GdiView.h" 3 | #include "KSolidBrush.h" 4 | #include "KPen.h" 5 | #include "Canvas.h" 6 | #include "Size.h" 7 | #include "Image.h" 8 | 9 | GdiView::GdiView() 10 | { 11 | 12 | } 13 | 14 | GdiView::~GdiView() 15 | { 16 | 17 | } 18 | 19 | bool GdiView::draw(Canvas& canvas) 20 | { 21 | DemoView::draw(canvas); 22 | char* bits = (char*)canvas.lockBits(); 23 | Size size = canvas.getCanvasSize(); 24 | char* bit = nullptr; 25 | 26 | for (int j = 0; j < size._height; ++j) 27 | { 28 | for (int i = 0; i < size._width; ++i) 29 | { 30 | bit = &bits[(j * size._width + i) * 4]; 31 | bit[3] = 0xff; 32 | // bit[0] = 0x00; 33 | // bit[1] = 0x00; 34 | // bit[2] = 0x00; 35 | } 36 | } 37 | 38 | return true; 39 | } 40 | 41 | Image* GdiView::createBitmap(int width, int height) 42 | { 43 | return Image::createImage(width, height, ak::GdiGraphics); 44 | } -------------------------------------------------------------------------------- /demo/src/GdiView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "PrimitiveView.h" 4 | 5 | class GdiView : public PrimitiveView 6 | { 7 | public: 8 | GdiView(); 9 | virtual ~GdiView(); 10 | 11 | // view 12 | virtual bool draw(Canvas& canvas) override; 13 | 14 | virtual Image* createBitmap(int width, int height) override; 15 | }; -------------------------------------------------------------------------------- /demo/src/GdiplusAnimatorView.cpp: -------------------------------------------------------------------------------- 1 | #include "Stdafx.h" 2 | #include "GdiplusAnimatorView.h" 3 | #include "Image.h" 4 | #include "demo.h" 5 | #include "KPoint.h" 6 | 7 | const int IMAGE_WIDTH = 128; 8 | 9 | GdiplusAnimatorView::GdiplusAnimatorView() 10 | { 11 | init(); 12 | } 13 | 14 | GdiplusAnimatorView::~GdiplusAnimatorView() 15 | { 16 | 17 | } 18 | 19 | Image* GdiplusAnimatorView::createImage() 20 | { 21 | return Image::createImage(ak::GdiPlusGraphics); 22 | } -------------------------------------------------------------------------------- /demo/src/GdiplusAnimatorView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UIDefine.h" 4 | #include "AnimatorView.h" 5 | 6 | class Image; 7 | 8 | class GdiplusAnimatorView : public AnimatorView 9 | { 10 | public: 11 | GdiplusAnimatorView(); 12 | virtual ~GdiplusAnimatorView(); 13 | 14 | protected: 15 | // AnimatorView 16 | virtual Image* createImage(); 17 | 18 | private: 19 | }; -------------------------------------------------------------------------------- /demo/src/GdiplusView.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "GdiplusView.h" 3 | #include "Image.h" 4 | 5 | GdiplusView::GdiplusView() 6 | { 7 | 8 | } 9 | 10 | GdiplusView::~GdiplusView() 11 | { 12 | 13 | } 14 | 15 | Image* GdiplusView::createBitmap(int width, int height) 16 | { 17 | return Image::createImage(width, height, ak::GdiPlusGraphics); 18 | } -------------------------------------------------------------------------------- /demo/src/GdiplusView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "PrimitiveView.h" 4 | 5 | class GdiplusView : public PrimitiveView 6 | { 7 | public: 8 | GdiplusView(); 9 | virtual ~GdiplusView(); 10 | 11 | protected: 12 | virtual Image* createBitmap(int width, int height); 13 | }; -------------------------------------------------------------------------------- /demo/src/PrimitiveView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/demo/src/PrimitiveView.cpp -------------------------------------------------------------------------------- /demo/src/PrimitiveView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DemoView.h" 4 | 5 | class Image; 6 | 7 | class PrimitiveView : public DemoView 8 | { 9 | public: 10 | PrimitiveView(); 11 | virtual ~PrimitiveView(); 12 | 13 | void processKeyDown(WPARAM wparam, LPARAM lparam); 14 | 15 | protected: 16 | // DemoView 17 | virtual bool doDraw(Canvas& canvas) override; 18 | 19 | virtual Image* createBitmap(int width, int height) { return false; } 20 | 21 | private: 22 | void test(Canvas& canvas); 23 | void testLine(Canvas& canvas); 24 | void testRect(Canvas& canvas); 25 | void testClip(Canvas& canvas); 26 | void testBitmap(Canvas& canvas, Image* bitmap); 27 | void testAlphaBitmap(Canvas& canvas, Image* bitmap); 28 | 29 | protected: 30 | int _primitiveIndex; 31 | int _count; 32 | bool _startTest; 33 | DWORD _testTime; 34 | }; -------------------------------------------------------------------------------- /demo/src/SkiaAnimatorView.cpp: -------------------------------------------------------------------------------- 1 | #include "Stdafx.h" 2 | #include "SkiaAnimatorView.h" 3 | #include "Image.h" 4 | #include "demo.h" 5 | #include "KPoint.h" 6 | 7 | const int IMAGE_WIDTH = 128; 8 | 9 | SkiaAnimatorView::SkiaAnimatorView() 10 | { 11 | init(); 12 | } 13 | 14 | SkiaAnimatorView::~SkiaAnimatorView() 15 | { 16 | 17 | } 18 | 19 | Image* SkiaAnimatorView::createImage() 20 | { 21 | return Image::createImage(ak::SkiaGraphics); 22 | } -------------------------------------------------------------------------------- /demo/src/SkiaAnimatorView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UIDefine.h" 4 | #include "AnimatorView.h" 5 | 6 | class Image; 7 | 8 | class SkiaAnimatorView : public AnimatorView 9 | { 10 | public: 11 | SkiaAnimatorView(); 12 | virtual ~SkiaAnimatorView(); 13 | 14 | // AnimatorView 15 | virtual Image* createImage() override; 16 | 17 | private: 18 | }; -------------------------------------------------------------------------------- /demo/src/SkiaView.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "SkiaView.h" 3 | #include "Image.h" 4 | 5 | SkiaView::SkiaView() 6 | { 7 | 8 | } 9 | 10 | SkiaView::~SkiaView() 11 | { 12 | 13 | } 14 | 15 | Image* SkiaView::createBitmap(int width, int height) 16 | { 17 | return Image::createImage(width, height, ak::SkiaGraphics); 18 | } -------------------------------------------------------------------------------- /demo/src/SkiaView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "PrimitiveView.h" 4 | 5 | class SkiaView : public PrimitiveView 6 | { 7 | public: 8 | SkiaView(); 9 | virtual ~SkiaView(); 10 | 11 | protected: 12 | virtual Image* createBitmap(int width, int height) override; 13 | }; -------------------------------------------------------------------------------- /demo/src/demo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/demo/src/demo.cpp -------------------------------------------------------------------------------- /demo/src/demo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../resource.h" 4 | 5 | const int WINDOW_WIDTH = 1024; 6 | const int WINDOW_HEIGHT = 768; 7 | -------------------------------------------------------------------------------- /demo/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/demo/stdafx.cpp -------------------------------------------------------------------------------- /demo/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/demo/stdafx.h -------------------------------------------------------------------------------- /demo/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/demo/targetver.h -------------------------------------------------------------------------------- /res/flower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/res/flower.png -------------------------------------------------------------------------------- /res/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/res/qq.png -------------------------------------------------------------------------------- /ui/include/Brush.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UIDefine.h" 4 | 5 | class AK_API KBrush 6 | { 7 | public: 8 | KBrush() {} 9 | virtual ~KBrush() {} 10 | 11 | virtual ak::BrushType getBrushType() = 0; 12 | }; -------------------------------------------------------------------------------- /ui/include/Canvas.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class Color; 4 | class Size; 5 | class KRect; 6 | class Image; 7 | class KPen; 8 | class KBrush; 9 | class KString; 10 | class KFont; 11 | class KPoint; 12 | class CanvasDelegate; 13 | 14 | class AK_API Canvas 15 | { 16 | public: 17 | Canvas(); 18 | ~Canvas(); 19 | 20 | bool init(int width, int height, int canvasType); 21 | void* lockBits(); 22 | void unlockBits(); 23 | ak::GraphicsType getGraphicsType() const; 24 | 25 | void clear(const Color& color); 26 | 27 | Size getCanvasSize(); 28 | bool drawLine(KPen* pen, int x1, int y1, int x2, int y2); 29 | bool drawImage(Image* image, int x, int y, int nAlpha = 255); 30 | bool drawImage(Image* image, int x, int y, float degrees); 31 | bool drawRect(KPen* pen, KRect& rect); 32 | bool fillRect(KBrush* brush, KRect& rect); 33 | bool drawString(const KString& str, int len, const KFont& font, const KPoint& pt, KBrush* brush); 34 | bool setClip(const KRect& rect, ak::opMode mode); 35 | bool resetClip(); 36 | 37 | private: 38 | CanvasDelegate* _canvasDelegate; 39 | }; -------------------------------------------------------------------------------- /ui/include/Color.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UIDefine.h" 4 | 5 | class Color 6 | { 7 | public: 8 | Color(); 9 | Color(byte a, byte r, byte g, byte b); 10 | ~Color(); 11 | 12 | void setValue(int argb); 13 | int getValue() const; 14 | 15 | byte getA(); 16 | byte getR(); 17 | byte getG(); 18 | byte getB(); 19 | 20 | private: 21 | int _color; 22 | }; -------------------------------------------------------------------------------- /ui/include/Image.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class AK_API Image 4 | { 5 | public: 6 | virtual ~Image(); 7 | 8 | static Image* createImage(int graphicsType); 9 | static Image* createImage(int width, int height, int graphicsType); 10 | 11 | virtual bool fromFile(char* file); 12 | virtual int width(); 13 | virtual int height(); 14 | 15 | protected: 16 | Image(); 17 | }; -------------------------------------------------------------------------------- /ui/include/KFont.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | typedef enum 4 | { 5 | kUnitWorld = 0, 6 | KUnitDisplay, 7 | KUnitPixel, 8 | KUnitPoint, 9 | KUnitInch, 10 | KUnitDocument, 11 | KUnitMillimeter, 12 | } KFontUnit; 13 | 14 | typedef enum 15 | { 16 | KFontStyleRegular = 0, 17 | KFontStyleBold = 1, 18 | KFontStyleItalic = 2, 19 | KFontStyleBoldItalic = 3, 20 | kFontStyleUnderline = 4, 21 | kFontStyleStrikeout = 8, 22 | } KFontStyle; 23 | 24 | class KFontFamily; 25 | 26 | class KFont 27 | { 28 | public: 29 | KFont(KFontFamily* fontFamily, int fontSize, KFontStyle fontStyle, KFontUnit fontUnit = KUnitPixel); 30 | ~KFont(); 31 | 32 | KFontFamily* getFontFamily() const; 33 | KFontStyle getFontStyle() const; 34 | KFontUnit getFontUnit() const; 35 | int getFontSize() const; 36 | 37 | private: 38 | KFontFamily* _fontFamily; 39 | KFontStyle _fontStyle; 40 | KFontUnit _fontUnit; 41 | int _fontSize; 42 | 43 | private: 44 | KFont() {} 45 | }; -------------------------------------------------------------------------------- /ui/include/KFontFamily.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class KString; 4 | 5 | class KFontFamily 6 | { 7 | public: 8 | KFontFamily(wchar_t* fontFamily); 9 | ~KFontFamily(); 10 | 11 | const KString& getFamilyName() const; 12 | 13 | private: 14 | KString _familyName; 15 | 16 | private: 17 | KFontFamily() {} 18 | }; -------------------------------------------------------------------------------- /ui/include/KPen.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Color.h" 4 | 5 | class AK_API KPen 6 | { 7 | public: 8 | KPen(); 9 | KPen(Color color, int width = 1); 10 | ~KPen(); 11 | 12 | void setColor(Color color); 13 | Color getColor(); 14 | int getWidth(); 15 | 16 | private: 17 | Color _color; 18 | int _width; 19 | }; -------------------------------------------------------------------------------- /ui/include/KPoint.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class KPoint 4 | { 5 | public: 6 | KPoint(); 7 | KPoint(int x, int y); 8 | ~KPoint(); 9 | 10 | void set(int x, int y); 11 | 12 | public: 13 | int _x; 14 | int _y; 15 | }; -------------------------------------------------------------------------------- /ui/include/KRegion.cpp: -------------------------------------------------------------------------------- 1 | #include "KRegion.h" 2 | 3 | KRegion::KRegion() 4 | { 5 | } 6 | 7 | KRegion::~KRegion() 8 | { 9 | } -------------------------------------------------------------------------------- /ui/include/KRegion.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class KRegion 4 | { 5 | public: 6 | KRegion(); 7 | virtual ~KRegion(); 8 | }; -------------------------------------------------------------------------------- /ui/include/KSolidBrush.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Brush.h" 4 | #include "Color.h" 5 | 6 | class KSolidBrush : public KBrush 7 | { 8 | public: 9 | KSolidBrush(const Color& color); 10 | virtual ~KSolidBrush(); 11 | 12 | // KBrush 13 | virtual ak::BrushType getBrushType() override; 14 | 15 | // SolidBrush 16 | Color getColor() const; 17 | void setColor(const Color& color); 18 | 19 | private: 20 | Color _color; 21 | }; -------------------------------------------------------------------------------- /ui/include/KString.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class StringHelper; 4 | 5 | class AK_API KString 6 | { 7 | public: 8 | KString(); 9 | KString(wchar_t* string); 10 | ~KString(); 11 | 12 | const KString& operator += (const wchar_t* right); 13 | const KString& operator += (const int& right); 14 | const KString& operator += (const unsigned long& right); 15 | 16 | void clear(); 17 | bool empty(); 18 | const wchar_t* c_str() const; 19 | const char* getUtf8() const; 20 | const char* getAnsi() const; 21 | 22 | private: 23 | StringHelper* _stringHelper; 24 | std::wstring _string; 25 | }; -------------------------------------------------------------------------------- /ui/include/Matrix.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class MatrixDelegate; 4 | 5 | class AK_API Matrix 6 | { 7 | public: 8 | Matrix(); 9 | ~Matrix(); 10 | 11 | public: 12 | MatrixDelegate* _matrixDelegate; 13 | }; -------------------------------------------------------------------------------- /ui/include/Panel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "View.h" 4 | 5 | class Panel : public View 6 | { 7 | public: 8 | Panel(); 9 | virtual ~Panel(); 10 | }; -------------------------------------------------------------------------------- /ui/include/Pen.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Color.h" 4 | 5 | class AK_API Pen 6 | { 7 | public: 8 | Pen(Color color, int width = 1); 9 | ~Pen(); 10 | 11 | Color getColor(); 12 | int getWidth(); 13 | 14 | private: 15 | Color _color; 16 | int _width; 17 | }; -------------------------------------------------------------------------------- /ui/include/Rect.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class Rect 4 | { 5 | public: 6 | Rect() 7 | : _left(0) 8 | , _right(0) 9 | , _top(0) 10 | , _bottom(0) 11 | { 12 | 13 | } 14 | 15 | Rect(int x, int y, int width, int height) 16 | : _left(x) 17 | , _right(x + width) 18 | , _top(y) 19 | , _bottom(y + height) 20 | { 21 | 22 | } 23 | 24 | void Rect::set(int left, int top, int right, int bottom) 25 | { 26 | _left = left; 27 | _top = top; 28 | _right = right; 29 | _bottom = bottom; 30 | } 31 | 32 | ~Rect() 33 | { 34 | 35 | } 36 | 37 | int width() 38 | { 39 | return _right - _left; 40 | } 41 | 42 | int height() 43 | { 44 | return _bottom - _top; 45 | } 46 | 47 | public: 48 | int _left; 49 | int _top; 50 | int _right; 51 | int _bottom; 52 | }; -------------------------------------------------------------------------------- /ui/include/Size.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UIDefine.h" 4 | 5 | class AK_API Size 6 | { 7 | public: 8 | Size() 9 | : _width(0) 10 | , _height(0) 11 | { 12 | 13 | } 14 | 15 | Size(int width, int height) 16 | : _width(width) 17 | , _height(height) 18 | { 19 | 20 | } 21 | 22 | ~Size() 23 | { 24 | 25 | } 26 | 27 | public: 28 | int _width; 29 | int _height; 30 | }; -------------------------------------------------------------------------------- /ui/include/SolidBrush.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Brush.h" 4 | #include "Color.h" 5 | 6 | class SolidBrush : public KBrush 7 | { 8 | public: 9 | SolidBrush(const Color& color); 10 | virtual ~SolidBrush(); 11 | 12 | // GBrush 13 | virtual UI_ENUM::BrushType getBrushType() override; 14 | 15 | // SolidBrush 16 | Color getColor() const; 17 | void setColor(const Color& color); 18 | 19 | private: 20 | Color _color; 21 | }; -------------------------------------------------------------------------------- /ui/include/View.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UIDefine.h" 4 | #include "KRect.h" 5 | 6 | class ViewDelegate; 7 | class Canvas; 8 | 9 | class AK_API View 10 | { 11 | public: 12 | View(); 13 | virtual ~View(); 14 | 15 | virtual bool init(); 16 | virtual bool initCanvas(int canvasType = ak::SkiaGraphics); 17 | virtual bool draw(); 18 | virtual bool draw(Canvas& canvas); 19 | virtual bool addView(View* view); 20 | virtual bool isShow(); 21 | virtual void show(); 22 | virtual void hide(); 23 | 24 | void setRect(KRect rect); 25 | Canvas* getCanvas(); 26 | 27 | protected: 28 | virtual bool isUsedCanvas() {return false;} 29 | virtual void schedulePaint(KRect* rect = nullptr); 30 | bool getRect(KRect& rect); 31 | void setParent(View* parent); 32 | 33 | protected: 34 | ViewDelegate* _viewDelegate; 35 | }; 36 | -------------------------------------------------------------------------------- /ui/include/eventHandler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class EventHandler 4 | { 5 | public: 6 | EventHandler(); 7 | virtual ~EventHandler(); 8 | }; -------------------------------------------------------------------------------- /ui/include/widget.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/ui/include/widget.h -------------------------------------------------------------------------------- /ui/src/Brush.cpp: -------------------------------------------------------------------------------- 1 | #include "Brush.h" 2 | -------------------------------------------------------------------------------- /ui/src/Color.cpp: -------------------------------------------------------------------------------- 1 | #include "Color.h" 2 | 3 | Color::Color() 4 | : _color(0xFF000000) 5 | { 6 | 7 | } 8 | 9 | Color::Color(byte a, byte r, byte g, byte b) 10 | { 11 | _color = (a << 24) | (r << 16) | + (g << 8) + (b << 0); 12 | } 13 | 14 | Color::~Color() 15 | { 16 | 17 | } 18 | 19 | void Color::setValue(int argb) 20 | { 21 | _color = argb; 22 | } 23 | 24 | int Color::getValue() const 25 | { 26 | return _color; 27 | } 28 | 29 | byte Color::getA() 30 | { 31 | return _color >> 24; 32 | } 33 | 34 | byte Color::getR() 35 | { 36 | return (_color & 0x00FF0000) >> 16; 37 | } 38 | 39 | byte Color::getG() 40 | { 41 | return (_color & 0x0000FF00) >> 8; 42 | } 43 | 44 | byte Color::getB() 45 | { 46 | return _color & 0x000000FF; 47 | } -------------------------------------------------------------------------------- /ui/src/KFont.cpp: -------------------------------------------------------------------------------- 1 | #include "UIDefine.h" 2 | #include "KFont.h" 3 | #include "KFontFamily.h" 4 | 5 | KFont::KFont(KFontFamily* fontFamily, int fontSize, KFontStyle fontStyle, KFontUnit fontUnit) 6 | : _fontFamily(fontFamily) 7 | , _fontSize(fontSize) 8 | , _fontStyle(fontStyle) 9 | , _fontUnit(fontUnit) 10 | { 11 | 12 | } 13 | 14 | KFont::~KFont() 15 | { 16 | 17 | } 18 | 19 | KFontFamily* KFont::getFontFamily() const 20 | { 21 | return _fontFamily; 22 | } 23 | 24 | KFontStyle KFont::getFontStyle() const 25 | { 26 | return _fontStyle; 27 | } 28 | 29 | KFontUnit KFont::getFontUnit() const 30 | { 31 | return _fontUnit; 32 | } 33 | 34 | int KFont::getFontSize() const 35 | { 36 | return _fontSize; 37 | } -------------------------------------------------------------------------------- /ui/src/KFontFamily.cpp: -------------------------------------------------------------------------------- 1 | #include "UIDefine.h" 2 | #include "KFontFamily.h" 3 | 4 | KFontFamily::KFontFamily(wchar_t* fontFamily) 5 | : _familyName(fontFamily) 6 | { 7 | 8 | } 9 | 10 | KFontFamily::~KFontFamily() 11 | { 12 | 13 | } 14 | 15 | const KString& KFontFamily::getFamilyName() const 16 | { 17 | return _familyName; 18 | } -------------------------------------------------------------------------------- /ui/src/KPen.cpp: -------------------------------------------------------------------------------- 1 | #include "KPen.h" 2 | 3 | KPen::KPen() 4 | : _color(Color(0, 0, 0, 0)) 5 | { 6 | 7 | } 8 | 9 | KPen::KPen(Color color, int width) 10 | : _color(color) 11 | , _width(width) 12 | { 13 | 14 | } 15 | 16 | KPen::~KPen() 17 | { 18 | 19 | } 20 | 21 | void KPen::setColor(Color color) 22 | { 23 | _color = color; 24 | } 25 | 26 | Color KPen::getColor() 27 | { 28 | return _color; 29 | } 30 | 31 | int KPen::getWidth() 32 | { 33 | return _width; 34 | } 35 | 36 | 37 | -------------------------------------------------------------------------------- /ui/src/KPoint.cpp: -------------------------------------------------------------------------------- 1 | #include "KPoint.h" 2 | 3 | KPoint::KPoint() 4 | : _x(0) 5 | , _y(0) 6 | { 7 | 8 | } 9 | 10 | KPoint::KPoint(int x, int y) 11 | : _x(x) 12 | , _y(y) 13 | { 14 | 15 | } 16 | 17 | KPoint::~KPoint() 18 | { 19 | 20 | } 21 | 22 | void KPoint::set(int x, int y) 23 | { 24 | _x = x; 25 | _y = y; 26 | } -------------------------------------------------------------------------------- /ui/src/KRect.cpp: -------------------------------------------------------------------------------- 1 | #include "KRect.h" 2 | -------------------------------------------------------------------------------- /ui/src/KSolidBrush.cpp: -------------------------------------------------------------------------------- 1 | #include "UIDefine.h" 2 | #include "KSolidBrush.h" 3 | 4 | KSolidBrush::KSolidBrush(const Color& color) 5 | : _color(color) 6 | { 7 | 8 | } 9 | 10 | KSolidBrush::~KSolidBrush() 11 | { 12 | 13 | } 14 | 15 | ak::BrushType KSolidBrush::getBrushType() 16 | { 17 | return ak::SolidBrush; 18 | } 19 | 20 | Color KSolidBrush::getColor() const 21 | { 22 | return _color; 23 | } 24 | 25 | void KSolidBrush::setColor(const Color& color) 26 | { 27 | _color = color; 28 | } -------------------------------------------------------------------------------- /ui/src/Matrix.cpp: -------------------------------------------------------------------------------- 1 | #include "UIDefine.h" 2 | #include "Matrix.h" 3 | 4 | class MatrixDelegate 5 | { 6 | public: 7 | 8 | }; 9 | 10 | Matrix::Matrix() 11 | { 12 | 13 | } 14 | 15 | Matrix::~Matrix() 16 | { 17 | 18 | } -------------------------------------------------------------------------------- /ui/src/Panel.cpp: -------------------------------------------------------------------------------- 1 | #include "Panel.h" 2 | 3 | Panel::Panel() 4 | { 5 | 6 | } 7 | 8 | Panel::~Panel() 9 | { 10 | 11 | } -------------------------------------------------------------------------------- /ui/src/Pen.cpp: -------------------------------------------------------------------------------- 1 | #include "Pen.h" 2 | 3 | Pen::Pen(Color color, int width) 4 | : _color(color) 5 | , _width(width) 6 | { 7 | 8 | } 9 | 10 | Pen::~Pen() 11 | { 12 | 13 | } 14 | 15 | Color Pen::getColor() 16 | { 17 | return _color; 18 | } 19 | 20 | int Pen::getWidth() 21 | { 22 | return _width; 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /ui/src/Pen.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Color.h" 4 | 5 | class AK_API Pen 6 | { 7 | public: 8 | Pen(Color color, int width = 1); 9 | ~Pen(); 10 | 11 | Color getColor(); 12 | int getWidth(); 13 | 14 | private: 15 | Color _color; 16 | int _width; 17 | }; -------------------------------------------------------------------------------- /ui/src/Point.cpp: -------------------------------------------------------------------------------- 1 | #include "Point.h" -------------------------------------------------------------------------------- /ui/src/Point.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class Point 4 | { 5 | public: 6 | Point(); 7 | ~Point(); 8 | }; -------------------------------------------------------------------------------- /ui/src/Rect.cpp: -------------------------------------------------------------------------------- 1 | #include "Rect.h" 2 | -------------------------------------------------------------------------------- /ui/src/RootView.cpp: -------------------------------------------------------------------------------- 1 | #include "UIDefine.h" 2 | #include "RootView.h" 3 | #include "widget.h" 4 | 5 | RootView::RootView() 6 | { 7 | 8 | } 9 | 10 | RootView::~RootView() 11 | { 12 | 13 | } 14 | 15 | void RootView::init(Widget* widget, int width, int height) 16 | { 17 | INVALID_POINTER_RETURN(widget); 18 | setRect(KRect(0, 0, width, height)); 19 | _widget = widget; 20 | View::init(); 21 | } 22 | 23 | void RootView::OnDraw() 24 | { 25 | draw(); 26 | } 27 | 28 | void RootView::schedulePaint(KRect* rect) 29 | { 30 | INVALID_POINTER_RETURN(_widget); 31 | 32 | if (nullptr == rect) 33 | { 34 | KRect rcRootView; 35 | getRect(rcRootView); 36 | _widget->schedualPaint(rcRootView); 37 | } 38 | else 39 | { 40 | _widget->schedualPaint(*rect); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /ui/src/RootView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "View.h" 4 | 5 | class Widget; 6 | 7 | class RootView : public View 8 | { 9 | public: 10 | RootView(); 11 | virtual ~RootView(); 12 | 13 | void init(Widget* widget, int width, int height); 14 | 15 | public: 16 | void OnDraw(); 17 | 18 | protected: 19 | // view 20 | virtual bool isUsedCanvas() override {return true;} 21 | virtual void schedulePaint(KRect* rect = nullptr) override; 22 | 23 | private: 24 | Widget* _widget; 25 | }; 26 | -------------------------------------------------------------------------------- /ui/src/SolidBrush.cpp: -------------------------------------------------------------------------------- 1 | #include "UIDefine.h" 2 | #include "SolidBrush.h" 3 | 4 | SolidBrush::SolidBrush(const Color& color) 5 | : _color(color) 6 | { 7 | 8 | } 9 | 10 | SolidBrush::~SolidBrush() 11 | { 12 | 13 | } 14 | 15 | UI_ENUM::BrushType SolidBrush::getBrushType() 16 | { 17 | return UI_ENUM::SolidBrush; 18 | } 19 | 20 | Color SolidBrush::getColor() const 21 | { 22 | return _color; 23 | } 24 | 25 | void SolidBrush::setColor(const Color& color) 26 | { 27 | _color = color; 28 | } -------------------------------------------------------------------------------- /ui/src/StringHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class StringHelper 4 | { 5 | public: 6 | StringHelper(); 7 | ~StringHelper(); 8 | 9 | char* utf16ToUtf8(const wchar_t* utf16String); 10 | char* utf16ToAnsi(const wchar_t* utf16String); 11 | 12 | private: 13 | void resizeCharBuf(int len); 14 | void resizeWCharBuf(int len); 15 | 16 | private: 17 | int _charLen; 18 | char* _charBuf; 19 | 20 | int _wcharLen; 21 | wchar_t* _wcharBuf; 22 | }; -------------------------------------------------------------------------------- /ui/src/eventHandler.cpp: -------------------------------------------------------------------------------- 1 | #include "eventHandler.h" 2 | 3 | EventHandler::EventHandler() 4 | { 5 | 6 | } 7 | 8 | EventHandler::~EventHandler() 9 | { 10 | 11 | } -------------------------------------------------------------------------------- /ui/src/graphics/Gdi/GdiGraphics.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/ui/src/graphics/Gdi/GdiGraphics.cpp -------------------------------------------------------------------------------- /ui/src/graphics/Gdi/GdiGraphics.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics.h" 4 | 5 | class GdiGraphicsDelegate; 6 | 7 | class GdiGraphics : public Graphics 8 | { 9 | public: 10 | GdiGraphics(int width, int height); 11 | virtual ~GdiGraphics(); 12 | 13 | // Graphics 14 | virtual void* lockBits() override; 15 | virtual void clear(const Color& color) override; 16 | virtual bool drawLine(KPen* pen, int x1, int y1, int x2, int y2) override; 17 | virtual bool drawImage(Image* image, int x, int y, int nAlpha = 255) override; 18 | virtual bool drawRect(KPen* pen, KRect& rect) override; 19 | virtual bool fillRect(KBrush* brush, KRect& rect) override; 20 | virtual bool drawString(const KString& str, int len, const KFont& font, const KPoint& pt, KBrush* brush); 21 | virtual bool setClip(const KRect& rect, ak::opMode mode) override; 22 | virtual bool resetClip() override; 23 | 24 | private: 25 | GdiGraphicsDelegate* _gdiGraphicsDelegate; 26 | }; -------------------------------------------------------------------------------- /ui/src/graphics/Gdi/GdiHelper.cpp: -------------------------------------------------------------------------------- 1 | #include "UIDefine.h" 2 | #include "GdiHelper.h" 3 | 4 | #include 5 | #include 6 | 7 | namespace GdiHelper 8 | { 9 | int opModeToGdiOp(ak::opMode mode) 10 | { 11 | int opMode = RGN_COPY; 12 | 13 | switch(mode) 14 | { 15 | case ak::kModeXor: 16 | opMode = RGN_XOR; 17 | break; 18 | 19 | case ak::kModeUnion: 20 | opMode = RGN_OR; 21 | break; 22 | 23 | case ak::kModeReplace: 24 | opMode = RGN_COPY; 25 | break; 26 | 27 | case ak::kModeExclude: // not support 28 | break; 29 | 30 | case ak::kModeIntersect: 31 | opMode = RGN_AND; 32 | break; 33 | 34 | case ak::kModeComplement: 35 | opMode = RGN_DIFF; 36 | break; 37 | 38 | default: 39 | break; 40 | } 41 | 42 | return opMode; 43 | } 44 | } -------------------------------------------------------------------------------- /ui/src/graphics/Gdi/GdiHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UIDefine.h" 4 | 5 | namespace GdiHelper 6 | { 7 | int opModeToGdiOp(ak::opMode mode); 8 | } -------------------------------------------------------------------------------- /ui/src/graphics/Gdi/GdiImage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Image.h" 4 | 5 | class GdiImageDelegate; 6 | 7 | class GdiImage : public Image 8 | { 9 | public: 10 | GdiImage(); 11 | GdiImage(int width, int height); 12 | virtual ~GdiImage(); 13 | 14 | // Image 15 | virtual int width() override; 16 | virtual int height() override; 17 | 18 | void* getGdiBitmap(); 19 | 20 | private: 21 | GdiImageDelegate* _gdiImageDelegate; 22 | }; -------------------------------------------------------------------------------- /ui/src/graphics/GdiPlus/GdiPlusImage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Image.h" 4 | 5 | class GdiplusImageDelegate; 6 | 7 | namespace Gdiplus 8 | { 9 | class Bitmap; 10 | } 11 | 12 | class GdiplusImage : public Image 13 | { 14 | public: 15 | GdiplusImage(); 16 | GdiplusImage(int width, int height); 17 | virtual ~GdiplusImage(); 18 | 19 | // Image 20 | virtual bool fromFile(char* file) override; 21 | 22 | // GdiplusImage 23 | Gdiplus::Bitmap* getGdiplusBitmap(); 24 | 25 | private: 26 | GdiplusImageDelegate* _gdiplusImageDelegate; 27 | }; -------------------------------------------------------------------------------- /ui/src/graphics/GdiPlus/GdiplusHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "UIDefine.h" 6 | #include "Color.h" 7 | #include "KFont.h" 8 | #include "KPoint.h" 9 | #include "Brush.h" 10 | 11 | namespace GdiplusHelper 12 | { 13 | Gdiplus::Color colorToGdiplusColor(Color color); 14 | Gdiplus::Font* fontToGdiplusFont(const KFont& font); 15 | Gdiplus::PointF pointToGdiplusPointF(const KPoint& point); 16 | Gdiplus::Brush* brushToGdiplusBrush(KBrush* brush); 17 | Gdiplus::CombineMode opModeToGdiplusCombineMode(ak::opMode mode); 18 | } -------------------------------------------------------------------------------- /ui/src/graphics/GdiPlus/GdiplusRegion.cpp: -------------------------------------------------------------------------------- 1 | #include "UIDefine.h" 2 | #include "GdiplusRegion.h" 3 | #include 4 | #include 5 | 6 | GdiplusRegion::GdiplusRegion() 7 | : _region(nullptr) 8 | { 9 | _region = new Gdiplus::Region; 10 | } 11 | 12 | GdiplusRegion::~GdiplusRegion() 13 | { 14 | if (nullptr != _region) 15 | { 16 | delete _region; 17 | _region = nullptr; 18 | } 19 | } 20 | 21 | Gdiplus::Region* GdiplusRegion::getRegion() 22 | { 23 | return _region; 24 | } -------------------------------------------------------------------------------- /ui/src/graphics/GdiPlus/GdiplusRegion.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "KRegion.h" 4 | 5 | namespace Gdiplus 6 | { 7 | class Region; 8 | } 9 | 10 | class GdiplusRegion : public KRegion 11 | { 12 | public: 13 | GdiplusRegion(); 14 | virtual ~GdiplusRegion(); 15 | 16 | Gdiplus::Region* getRegion(); 17 | 18 | private: 19 | Gdiplus::Region* _region; 20 | }; -------------------------------------------------------------------------------- /ui/src/graphics/Graphics.cpp: -------------------------------------------------------------------------------- 1 | #include "UIDefine.h" 2 | #include "Graphics.h" 3 | #include "Size.h" 4 | 5 | Graphics::Graphics(int width, int height) 6 | : _width(width) 7 | , _height(height) 8 | { 9 | } 10 | 11 | Graphics::~Graphics() 12 | { 13 | 14 | } 15 | 16 | Size Graphics::getSize() 17 | { 18 | return Size(_width, _height); 19 | } -------------------------------------------------------------------------------- /ui/src/graphics/skia/SkiaGraphics.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Graphics.h" 4 | 5 | class SkiaGraphicsDelegate; 6 | 7 | class SkiaGraphics : public Graphics 8 | { 9 | public: 10 | SkiaGraphics(int width, int height); 11 | virtual ~SkiaGraphics(); 12 | 13 | // Graphics 14 | virtual void* lockBits() override; 15 | virtual void clear(const Color& color) override; 16 | virtual bool drawLine(KPen* pen, int x1, int y1, int x2, int y2) override; 17 | virtual bool drawImage(Image* image, int x, int y, int nAlpha = 255) override; 18 | virtual bool drawImage(Image* image, int x, int y, float degrees) override; 19 | virtual bool fillRect(KBrush* brush, KRect& rect) override; 20 | virtual bool drawString(const KString& str, int len, const KFont& font, const KPoint& pt, KBrush* brush) override; 21 | virtual bool setClip(const KRect& rect, ak::opMode mode) override; 22 | virtual bool resetClip() override; 23 | 24 | private: 25 | SkiaGraphicsDelegate* _skiaGraphicsDelegate; 26 | }; -------------------------------------------------------------------------------- /ui/src/graphics/skia/SkiaHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UIDefine.h" 4 | #include "SkColor.h" 5 | #include "Color.h" 6 | #include "SkRect.h" 7 | #include "KRect.h" 8 | #include "KFont.h" 9 | #include "SkTypeface.h" 10 | #include "SkRegion.h" 11 | 12 | namespace SkiaHelper 13 | { 14 | SkColor colorToSkiaColor(Color color); 15 | SkRect rectToSkiaRect(const KRect& rect); 16 | SkTypeface::Style fontStyleToSkiaFontStyle(KFontStyle fontStyle); 17 | SkRegion::Op opModeToSkiaOp(ak::opMode opMode); 18 | } -------------------------------------------------------------------------------- /ui/src/graphics/skia/SkiaImage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Image.h" 4 | 5 | class SkBitmap; 6 | class SkiaImageDelegate; 7 | 8 | class SkiaImage : public Image 9 | { 10 | public: 11 | SkiaImage(); 12 | SkiaImage(int width, int height); 13 | virtual ~SkiaImage(); 14 | 15 | SkBitmap* getSkiaBitmap(); 16 | // Image 17 | virtual bool fromFile(char* file) override; 18 | 19 | private: 20 | SkiaImageDelegate* _skiaImageDelegate; 21 | }; -------------------------------------------------------------------------------- /ui/src/graphics/skia/SkiaRegion.cpp: -------------------------------------------------------------------------------- 1 | #include "UIDefine.h" 2 | #include "SkiaRegion.h" 3 | #include "SkRegion.h" 4 | 5 | SkiaRegion::SkiaRegion() 6 | : _region(nullptr) 7 | { 8 | _region = new SkRegion; 9 | } 10 | 11 | SkiaRegion::~SkiaRegion() 12 | { 13 | if (nullptr != _region) 14 | { 15 | delete _region; 16 | _region = nullptr; 17 | } 18 | } 19 | 20 | SkRegion* SkiaRegion::getRegion() 21 | { 22 | return _region; 23 | } -------------------------------------------------------------------------------- /ui/src/graphics/skia/SkiaRegion.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "KRegion.h" 4 | 5 | class SkRegion; 6 | 7 | class SkiaRegion : public KRegion 8 | { 9 | public: 10 | SkiaRegion(); 11 | virtual ~SkiaRegion(); 12 | 13 | SkRegion* getRegion(); 14 | 15 | private: 16 | SkRegion* _region; 17 | }; -------------------------------------------------------------------------------- /ui/src/graphics/skia/gskiabitmap.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "gskiabitmap.h" 3 | 4 | GSkiaBitmap::GSkiaBitmap(int width, int height, GImage::Format format) 5 | { 6 | switch(format) 7 | { 8 | case GImage::ARGB32_Bitmap: 9 | bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height); 10 | bitmap.allocPixels(); 11 | break; 12 | 13 | default: 14 | break; 15 | } 16 | 17 | _width = width; 18 | _height = height; 19 | _format = format; 20 | _pData = (unsigned char*)bitmap.getPixels(); 21 | } 22 | 23 | GSkiaBitmap::~GSkiaBitmap(void) 24 | { 25 | } 26 | 27 | void GSkiaBitmap::lock() const 28 | { 29 | bitmap.lockPixels(); 30 | } 31 | 32 | void GSkiaBitmap::unlock() const 33 | { 34 | bitmap.unlockPixels(); 35 | } -------------------------------------------------------------------------------- /ui/src/graphics/skia/gskiabitmap.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "gbitmap.h" 4 | 5 | #pragma warning(disable:4244) 6 | #pragma warning(disable:4481) 7 | #pragma warning(disable:4100) 8 | #pragma warning(disable:4127) 9 | #include "SkBitmap.h" 10 | #pragma warning(default:4127) 11 | #pragma warning(default:4100) 12 | #pragma warning(default:4481) 13 | #pragma warning(default:4244) 14 | 15 | class GSkiaBitmap : public GBitmap 16 | { 17 | public: 18 | GSkiaBitmap(int width, int height, GImage::Format format = GImage::ARGB32_Bitmap); 19 | virtual ~GSkiaBitmap(void); 20 | 21 | virtual void lock() const; 22 | virtual void unlock() const; 23 | private: 24 | SkBitmap bitmap; 25 | 26 | friend class GSkiaBitmapLoader; 27 | friend class GSkiaGraphic; 28 | }; 29 | 30 | typedef boost::shared_ptr GSkiaBitmapPtr; 31 | typedef boost::weak_ptr GSkiaBitmapWPtr; 32 | -------------------------------------------------------------------------------- /ui/src/graphics/skia/gskiabitmaploader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "gbitmaploader.h" 3 | 4 | class GSkiaBitmapLoader : public GBitmapLoader 5 | { 6 | public: 7 | enum Format 8 | { 9 | Unknown_Format, 10 | BMP_Format, 11 | GIF_Format, 12 | ICO_Format, 13 | JPEG_Format, 14 | PNG_Format, 15 | WEBP_Format, 16 | TGA_Format 17 | }; 18 | 19 | public: 20 | GSkiaBitmapLoader(); 21 | ~GSkiaBitmapLoader(); 22 | 23 | GBitmapPtr loadBitmap(const GString & filename, const GString & format); 24 | GBitmapPtr loadBitmap(const GByte * pData, int len, const GString & format); 25 | virtual GBitmapPtr createBitmap(int width, int height, GImage::Format format); 26 | 27 | private: 28 | Format getFileFormat(const GString & filename, const GString & format); 29 | }; -------------------------------------------------------------------------------- /ui/src/graphics/skia/gskiagraphic.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/ui/src/graphics/skia/gskiagraphic.cpp -------------------------------------------------------------------------------- /ui/src/graphics/skia/gskiahelper.h: -------------------------------------------------------------------------------- 1 | #include "grect.h" 2 | #include "gcolor.h" 3 | 4 | #pragma warning(disable:4244) 5 | #pragma warning(disable:4481) 6 | #pragma warning(disable:4100) 7 | #pragma warning(disable:4127) 8 | #include "SkRect.h" 9 | #include "SkColor.h" 10 | #include "SkTypeface.h" 11 | #pragma warning(default:4127) 12 | #pragma warning(default:4100) 13 | #pragma warning(default:4481) 14 | #pragma warning(default:4244) 15 | 16 | namespace GSkiaHelper 17 | { 18 | SkRect GRectToSkRect(const GRect & r); 19 | GRect SkRectToGRect(const SkRect & r); 20 | SkIRect GRectToSkIRect(const GRect & r); 21 | SkColor GColorToSkColor(const GColor & c); 22 | SkTypeface::Style GFontStyleToSkStyle(const int & style); 23 | } -------------------------------------------------------------------------------- /ui/src/widget.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/ui/src/widget.cpp -------------------------------------------------------------------------------- /ui/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/ui/stdafx.cpp -------------------------------------------------------------------------------- /ui/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/ui/stdafx.h -------------------------------------------------------------------------------- /ui/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/ui/targetver.h -------------------------------------------------------------------------------- /ui/third_party/skia/include/animator/SkAnimatorView.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkAnimatorView_DEFINED 11 | #define SkAnimatorView_DEFINED 12 | 13 | #include "SkView.h" 14 | #include "SkAnimator.h" 15 | 16 | class SkAnimatorView : public SkView { 17 | public: 18 | SkAnimatorView(); 19 | virtual ~SkAnimatorView(); 20 | 21 | SkAnimator* getAnimator() const { return fAnimator; } 22 | 23 | bool decodeFile(const char path[]); 24 | bool decodeMemory(const void* buffer, size_t size); 25 | bool decodeStream(SkStream* stream); 26 | 27 | protected: 28 | // overrides 29 | virtual bool onEvent(const SkEvent&); 30 | virtual void onDraw(SkCanvas*); 31 | virtual void onInflate(const SkDOM&, const SkDOM::Node*); 32 | 33 | private: 34 | SkAnimator* fAnimator; 35 | 36 | typedef SkView INHERITED; 37 | }; 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/config/sk_stdint.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | #ifndef sk_stdint_DEFINED 9 | #define sk_stdint_DEFINED 10 | 11 | typedef signed char int8_t; 12 | typedef unsigned char uint8_t; 13 | typedef short int16_t; 14 | typedef unsigned short uint16_t; 15 | typedef int int32_t; 16 | typedef unsigned uint32_t; 17 | typedef long long int64_t; 18 | typedef unsigned long long uint64_t; 19 | 20 | typedef int64_t intmax_t; 21 | typedef uint64_t uintmax_t; 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/core/SkMMapStream.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2008 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkMMapStream_DEFINED 11 | #define SkMMapStream_DEFINED 12 | 13 | #include "SkStream.h" 14 | 15 | class SkMMAPStream : public SkMemoryStream { 16 | public: 17 | SkMMAPStream(const char filename[]); 18 | virtual ~SkMMAPStream(); 19 | 20 | virtual void setMemory(const void* data, size_t length, bool); 21 | private: 22 | void* fAddr; 23 | size_t fSize; 24 | 25 | void closeMMap(); 26 | 27 | typedef SkMemoryStream INHERITED; 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/core/SkTileGridPicture.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkTileGridPicture_DEFINED 9 | #define SkTileGridPicture_DEFINED 10 | 11 | #include "SkPicture.h" 12 | 13 | /** 14 | * Subclass of SkPicture that override the behavior of the 15 | * kOptimizeForClippedPlayback_RecordingFlag by creating an SkTileGrid 16 | * structure rather than an R-Tree. The tile grid has lower recording 17 | * and playback costs, but is less effective at eliminating extraneous 18 | * primitives for arbitrary query rectangles. It is most effective for 19 | * tiled playback when the tile structure is known at record time. 20 | */ 21 | class SkTileGridPicture : public SkPicture { 22 | public: 23 | SkTileGridPicture(int tileWidth, int tileHeight, int width, int height); 24 | virtual SkBBoxHierarchy* createBBoxHierarchy() const SK_OVERRIDE; 25 | private: 26 | int fTileWidth, fTileHeight, fXTileCount, fYTileCount; 27 | }; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/core/SkUnitMapper.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkUnitMapper_DEFINED 11 | #define SkUnitMapper_DEFINED 12 | 13 | #include "SkRefCnt.h" 14 | #include "SkScalar.h" 15 | 16 | #include "SkFlattenable.h" 17 | 18 | class SkUnitMapper : public SkFlattenable { 19 | public: 20 | SK_DECLARE_INST_COUNT(SkUnitMapper) 21 | 22 | SkUnitMapper() {} 23 | 24 | /** Given a value in [0..0xFFFF], return a value in the same range. 25 | */ 26 | virtual uint16_t mapUnit16(uint16_t x) = 0; 27 | 28 | protected: 29 | SkUnitMapper(SkFlattenableReadBuffer& rb) : SkFlattenable(rb) {} 30 | 31 | private: 32 | typedef SkFlattenable INHERITED; 33 | }; 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/effects/SkArithmeticMode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkArithmeticMode_DEFINED 9 | #define SkArithmeticMode_DEFINED 10 | 11 | #include "SkXfermode.h" 12 | 13 | class SK_API SkArithmeticMode : public SkXfermode { 14 | public: 15 | /** 16 | * result = clamp[k1 * src * dst + k2 * src + k3 * dst + k4] 17 | * 18 | * src and dst are treated as being [0.0 .. 1.0]. The polynomial is 19 | * evaluated on their unpremultiplied components. 20 | * 21 | * k1=k2=k3=0, k4=1.0 results in returning opaque white 22 | * k1=k3=k4=0, k2=1.0 results in returning the src 23 | * k1=k2=k4=0, k3=1.0 results in returning the dst 24 | */ 25 | static SkXfermode* Create(SkScalar k1, SkScalar k2, 26 | SkScalar k3, SkScalar k4); 27 | }; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/effects/SkBitmapSource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 The Android Open Source Project 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkBitmapSource_DEFINED 9 | #define SkBitmapSource_DEFINED 10 | 11 | #include "SkImageFilter.h" 12 | #include "SkBitmap.h" 13 | 14 | class SK_API SkBitmapSource : public SkImageFilter { 15 | public: 16 | explicit SkBitmapSource(const SkBitmap& bitmap); 17 | 18 | SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapSource) 19 | 20 | protected: 21 | explicit SkBitmapSource(SkFlattenableReadBuffer& buffer); 22 | virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 23 | virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, 24 | SkBitmap* result, SkIPoint* offset) SK_OVERRIDE; 25 | 26 | private: 27 | SkBitmap fBitmap; 28 | typedef SkImageFilter INHERITED; 29 | }; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/effects/SkDrawExtraPathEffect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 The Android Open Source Project 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SK_DRAW_EXTRA_PATH_EFFECT_H 9 | #define SK_DRAW_EXTRA_PATH_EFFECT_H 10 | 11 | class SkAnimator; 12 | 13 | void InitializeSkExtraPathEffects(SkAnimator* animator); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/effects/SkPaintFlagsDrawFilter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 The Android Open Source Project 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkPaintFlagsDrawFilter_DEFINED 9 | #define SkPaintFlagsDrawFilter_DEFINED 10 | 11 | #include "SkDrawFilter.h" 12 | 13 | class SK_API SkPaintFlagsDrawFilter : public SkDrawFilter { 14 | public: 15 | SkPaintFlagsDrawFilter(uint32_t clearFlags, uint32_t setFlags); 16 | 17 | virtual bool filter(SkPaint*, Type) SK_OVERRIDE; 18 | 19 | private: 20 | uint16_t fClearFlags; // user specified 21 | uint16_t fSetFlags; // user specified 22 | }; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/gpu/GrCacheID.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/ui/third_party/skia/include/gpu/GrCacheID.h -------------------------------------------------------------------------------- /ui/third_party/skia/include/gpu/GrKey.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2010 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #ifndef GrKey_DEFINED 12 | #define GrKey_DEFINED 13 | 14 | #include "GrRefCnt.h" 15 | 16 | class GrKey : public GrRefCnt { 17 | public: 18 | SK_DECLARE_INST_COUNT(GrKey) 19 | 20 | typedef intptr_t Hash; 21 | 22 | explicit GrKey(Hash hash) : fHash(hash) {} 23 | 24 | intptr_t getHash() const { return fHash; } 25 | 26 | bool operator<(const GrKey& rh) const { 27 | return fHash < rh.fHash || (fHash == rh.fHash && this->lt(rh)); 28 | } 29 | bool operator==(const GrKey& rh) const { 30 | return fHash == rh.fHash && this->eq(rh); 31 | } 32 | 33 | protected: 34 | virtual bool lt(const GrKey& rh) const = 0; 35 | virtual bool eq(const GrKey& rh) const = 0; 36 | 37 | private: 38 | const Hash fHash; 39 | 40 | typedef GrRefCnt INHERITED; 41 | }; 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/gpu/GrNoncopyable.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2010 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #ifndef GrNoncopyable_DEFINED 12 | #define GrNoncopyable_DEFINED 13 | 14 | #include "GrTypes.h" 15 | 16 | /** 17 | * Base for classes that want to disallow copying themselves. It makes its 18 | * copy-constructor and assignment operators private (and unimplemented). 19 | */ 20 | class GR_API GrNoncopyable { 21 | public: 22 | GrNoncopyable() {} 23 | 24 | private: 25 | // illegal 26 | GrNoncopyable(const GrNoncopyable&); 27 | GrNoncopyable& operator=(const GrNoncopyable&); 28 | }; 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/gpu/GrPoint.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2010 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #ifndef GrPoint_DEFINED 12 | #define GrPoint_DEFINED 13 | 14 | #include "GrTypes.h" 15 | #include "SkScalar.h" 16 | #include "SkPoint.h" 17 | 18 | #define GrPoint SkPoint 19 | #define GrVec SkVector 20 | 21 | struct GrIPoint16 { 22 | int16_t fX, fY; 23 | 24 | void set(intptr_t x, intptr_t y) { 25 | fX = GrToS16(x); 26 | fY = GrToS16(y); 27 | } 28 | }; 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/gpu/GrRect.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2010 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #ifndef GrRect_DEFINED 12 | #define GrRect_DEFINED 13 | 14 | #include "GrPoint.h" 15 | #include "SkRect.h" 16 | 17 | typedef SkIRect GrIRect; 18 | typedef SkRect GrRect; 19 | 20 | struct GrIRect16 { 21 | int16_t fLeft, fTop, fRight, fBottom; 22 | 23 | int width() const { return fRight - fLeft; } 24 | int height() const { return fBottom - fTop; } 25 | int area() const { return this->width() * this->height(); } 26 | bool isEmpty() const { return fLeft >= fRight || fTop >= fBottom; } 27 | 28 | void set(const GrIRect& r) { 29 | fLeft = SkToS16(r.fLeft); 30 | fTop = SkToS16(r.fTop); 31 | fRight = SkToS16(r.fRight); 32 | fBottom = SkToS16(r.fBottom); 33 | } 34 | }; 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/gpu/GrRefCnt.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2010 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #ifndef GrRefCnt_DEFINED 12 | #define GrRefCnt_DEFINED 13 | 14 | #include "GrTypes.h" 15 | #include "SkRefCnt.h" 16 | 17 | typedef SkRefCnt GrRefCnt; 18 | typedef SkAutoRef GrAutoRef; 19 | typedef SkAutoUnref GrAutoUnref; 20 | 21 | #define GrSafeRef SkSafeRef 22 | #define GrSafeUnref SkSafeUnref 23 | #define GrSafeAssign(a, b) SkRefCnt_SafeAssign(a, b) 24 | 25 | template 26 | static inline void GrSafeSetNull(T*& obj) { 27 | if (NULL != obj) { 28 | obj->unref(); 29 | obj = NULL; 30 | } 31 | } 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/gpu/SkGrTexturePixelRef.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2010 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #ifndef SkGrTexturePixelRef_DEFINED 12 | #define SkGrTexturePixelRef_DEFINED 13 | 14 | #include "SkGrPixelRef.h" 15 | 16 | typedef SkGrPixelRef SkGrTexturePixelRef; 17 | typedef SkGrPixelRef SkGrRenderTargetPixelRef; 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/gpu/gl/SkDebugGLContext.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | #ifndef SkDebugGLContext_DEFINED 9 | #define SkDebugGLContext_DEFINED 10 | 11 | #include "SkGLContext.h" 12 | 13 | class SkDebugGLContext : public SkGLContext { 14 | 15 | public: 16 | SkDebugGLContext() {}; 17 | 18 | virtual void makeCurrent() const SK_OVERRIDE {}; 19 | 20 | protected: 21 | virtual const GrGLInterface* createGLContext() SK_OVERRIDE; 22 | 23 | virtual void destroyGLContext() SK_OVERRIDE {}; 24 | }; 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/gpu/gl/SkNullGLContext.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | #ifndef SkNullGLContext_DEFINED 9 | #define SkNullGLContext_DEFINED 10 | 11 | #include "SkGLContext.h" 12 | 13 | class SkNullGLContext : public SkGLContext { 14 | 15 | public: 16 | SkNullGLContext() {}; 17 | 18 | virtual void makeCurrent() const SK_OVERRIDE {}; 19 | 20 | protected: 21 | virtual const GrGLInterface* createGLContext() SK_OVERRIDE; 22 | 23 | virtual void destroyGLContext() SK_OVERRIDE {}; 24 | }; 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/images/SkImages.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | class SkImages { 9 | public: 10 | /** 11 | * Initializes flattenables in the images project. 12 | */ 13 | static void InitializeFlattenables(); 14 | }; 15 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/ports/SkTypeface_mac.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #ifndef SkTypeface_mac_DEFINED 12 | #define SkTypeface_mac_DEFINED 13 | 14 | #include "SkTypeface.h" 15 | #ifdef SK_BUILD_FOR_MAC 16 | #import 17 | #endif 18 | 19 | #ifdef SK_BUILD_FOR_IOS 20 | #include 21 | #endif 22 | /** 23 | * Like the other Typeface create methods, this returns a new reference to the 24 | * corresponding typeface for the specified CTFontRef. The caller must call 25 | * unref() when it is finished. 26 | */ 27 | SK_API extern SkTypeface* SkCreateTypefaceFromCTFont(CTFontRef); 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/ports/SkTypeface_win.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #ifndef SkTypeface_win_DEFINED 12 | #define SkTypeface_win_DEFINED 13 | 14 | #include "SkTypeface.h" 15 | 16 | /** 17 | * Like the other Typeface create methods, this returns a new reference to the 18 | * corresponding typeface for the specified logfont. The caller is responsible 19 | * for calling unref() when it is finished. 20 | */ 21 | SK_API SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONT&); 22 | 23 | /** 24 | * Copy the LOGFONT associated with this typeface into the lf parameter. Note 25 | * that the lfHeight will need to be set afterwards, since the typeface does 26 | * not track this (the paint does). 27 | * typeface may be NULL, in which case we return the logfont for the default font. 28 | */ 29 | SK_API void SkLOGFONTFromTypeface(const SkTypeface* typeface, LOGFONT* lf); 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/svg/SkSVGBase.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGBase_DEFINED 11 | #define SkSVGBase_DEFINED 12 | 13 | #include "SkSVGAttribute.h" 14 | 15 | class SkSVGParser; 16 | 17 | class SkSVGBase { 18 | public: 19 | virtual ~SkSVGBase(); 20 | virtual void addAttribute(SkSVGParser& parser, int attrIndex, 21 | const char* attrValue, size_t attrLength); 22 | virtual int getAttributes(const SkSVGAttribute** attrPtr) = 0; 23 | }; 24 | 25 | #endif // SkSVGBase_DEFINEDes(const SkSVGAttribute** attrPtr) = 0; 26 | 27 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/svg/SkSVGTypes.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGTypes_DEFINED 11 | #define SkSVGTypes_DEFINED 12 | 13 | enum SkSVGTypes { 14 | SkSVGType_Circle, 15 | SkSVGType_ClipPath, 16 | SkSVGType_Defs, 17 | SkSVGType_Ellipse, 18 | SkSVGType_FeColorMatrix, 19 | SkSVGType_Filter, 20 | SkSVGType_G, 21 | SkSVGType_Image, 22 | SkSVGType_Line, 23 | SkSVGType_LinearGradient, 24 | SkSVGType_Mask, 25 | SkSVGType_Metadata, 26 | SkSVGType_Path, 27 | SkSVGType_Polygon, 28 | SkSVGType_Polyline, 29 | SkSVGType_RadialGradient, 30 | SkSVGType_Rect, 31 | SkSVGType_SVG, 32 | SkSVGType_Stop, 33 | SkSVGType_Symbol, 34 | SkSVGType_Text, 35 | SkSVGType_Tspan, 36 | SkSVGType_Unknown, 37 | SkSVGType_Use 38 | }; 39 | 40 | #endif // SkSVGTypes_DEFINED 41 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/utils/SkCountdown.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkCountdown_DEFINED 9 | #define SkCountdown_DEFINED 10 | 11 | #include "SkCondVar.h" 12 | #include "SkRunnable.h" 13 | #include "SkTypes.h" 14 | 15 | class SkCountdown : public SkRunnable { 16 | public: 17 | explicit SkCountdown(int32_t count); 18 | 19 | /** 20 | * Resets the countdown to the count provided. 21 | */ 22 | void reset(int32_t count); 23 | 24 | virtual void run() SK_OVERRIDE; 25 | 26 | /** 27 | * Blocks until run() has been called count times. 28 | */ 29 | void wait(); 30 | 31 | private: 32 | SkCondVar fReady; 33 | int32_t fCount; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/utils/SkCubicInterval.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | #ifndef SkCubicInterval_DEFINED 9 | #define SkCubicInterval_DEFINED 10 | 11 | #include "SkPoint.h" 12 | 13 | SkScalar SkEvalCubicInterval(SkScalar x1, SkScalar y1, 14 | SkScalar x2, SkScalar y2, 15 | SkScalar unitX); 16 | 17 | static inline SkScalar SkEvalCubicInterval(const SkPoint pts[2], SkScalar x) { 18 | return SkEvalCubicInterval(pts[0].fX, pts[0].fY, 19 | pts[1].fX, pts[1].fY, x); 20 | } 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/utils/SkNinePatch.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkNinePatch_DEFINED 11 | #define SkNinePatch_DEFINED 12 | 13 | #include "SkRect.h" 14 | #include "SkRegion.h" 15 | 16 | class SkBitmap; 17 | class SkCanvas; 18 | class SkPaint; 19 | 20 | class SkNinePatch { 21 | public: 22 | static void DrawNine(SkCanvas* canvas, const SkRect& dst, 23 | const SkBitmap& bitmap, const SkIRect& margins, 24 | const SkPaint* paint = NULL); 25 | 26 | static void DrawMesh(SkCanvas* canvas, const SkRect& dst, 27 | const SkBitmap& bitmap, 28 | const int32_t xDivs[], int numXDivs, 29 | const int32_t yDivs[], int numYDivs, 30 | const SkPaint* paint = NULL); 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/utils/SkNullCanvas.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkNullCanvas_DEFINED 9 | #define SkNullCanvas_DEFINED 10 | 11 | #include "SkBitmap.h" 12 | 13 | class SkCanvas; 14 | 15 | /** 16 | * Creates a canvas that draws nothing. This is useful for performance testing. 17 | */ 18 | SK_API SkCanvas* SkCreateNullCanvas(); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/utils/SkParsePaint.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkParsePaint_DEFINED 11 | #define SkParsePaint_DEFINED 12 | 13 | #include "SkPaint.h" 14 | #include "SkDOM.h" 15 | 16 | /** "color" color 17 | "opacity" scalar [0..1] 18 | "stroke-width" scalar (0...inf) 19 | "text-size" scalar (0..inf) 20 | "is-stroke" bool 21 | "is-antialias" bool 22 | "is-lineartext" bool 23 | */ 24 | void SkPaint_Inflate(SkPaint*, const SkDOM&, const SkDOM::Node*); 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/utils/SkParsePath.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkParsePath_DEFINED 11 | #define SkParsePath_DEFINED 12 | 13 | #include "SkPath.h" 14 | 15 | class SkString; 16 | 17 | class SkParsePath { 18 | public: 19 | static bool FromSVGString(const char str[], SkPath*); 20 | static void ToSVGString(const SkPath&, SkString*); 21 | }; 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/utils/SkPictureUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkPictureUtils_DEFINED 9 | #define SkPictureUtils_DEFINED 10 | 11 | #include "SkPicture.h" 12 | 13 | class SkData; 14 | struct SkRect; 15 | 16 | class SK_API SkPictureUtils { 17 | public: 18 | /** 19 | * Given a rectangular visible "window" into the picture, return an array 20 | * of SkPixelRefs that might intersect that area. To keep the call fast, 21 | * the returned list is not guaranteed to be exact, so it may miss some, 22 | * and it may return false positives. 23 | * 24 | * The pixelrefs returned in the SkData are already owned by the picture, 25 | * so the returned pointers are only valid while the picture is in scope 26 | * and remains unchanged. 27 | */ 28 | static SkData* GatherPixelRefs(SkPicture* pict, const SkRect& area); 29 | }; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/utils/SkRunnable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkRunnable_DEFINED 9 | #define SkRunnable_DEFINED 10 | 11 | class SkRunnable { 12 | public: 13 | virtual ~SkRunnable() {}; 14 | virtual void run() = 0; 15 | }; 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/utils/win/SkAutoCoInitialize.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkAutoCo_DEFINED 11 | #define SkAutoCo_DEFINED 12 | 13 | #define WIN32_LEAN_AND_MEAN 14 | #include 15 | #include "SkTemplates.h" 16 | 17 | /** 18 | * An instance of this class initializes COM on creation 19 | * and closes the COM library on destruction. 20 | */ 21 | class SkAutoCoInitialize : SkNoncopyable { 22 | private: 23 | HRESULT fHR; 24 | public: 25 | SkAutoCoInitialize(); 26 | ~SkAutoCoInitialize(); 27 | bool succeeded(); 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/views/SkApplication.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkApplication_DEFINED 11 | #define SkApplication_DEFINED 12 | 13 | class SkOSWindow; 14 | 15 | extern SkOSWindow* create_sk_window(void* hwnd, int argc, char** argv); 16 | extern void application_init(); 17 | extern void application_term(); 18 | 19 | #endif // SkApplication_DEFINED 20 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/views/SkBGViewArtist.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkBGViewArtist_DEFINED 11 | #define SkBGViewArtist_DEFINED 12 | 13 | #include "SkView.h" 14 | #include "SkPaint.h" 15 | 16 | class SkBGViewArtist : public SkView::Artist { 17 | public: 18 | SkBGViewArtist(SkColor c = SK_ColorWHITE); 19 | virtual ~SkBGViewArtist(); 20 | 21 | const SkPaint& paint() const { return fPaint; } 22 | SkPaint& paint() { return fPaint; } 23 | 24 | protected: 25 | // overrides 26 | virtual void onDraw(SkView*, SkCanvas*); 27 | virtual void onInflate(const SkDOM&, const SkDOM::Node*); 28 | 29 | private: 30 | SkPaint fPaint; 31 | }; 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/views/SkSystemEventTypes.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSystemEventTypes_DEFINED 11 | #define SkSystemEventTypes_DEFINED 12 | 13 | /* 14 | The goal of these strings is two-fold: 15 | 1) make funny strings (containing at least one char < 32) to avoid colliding with "user" strings 16 | 2) keep them <= 4 bytes, so we can avoid an allocation in SkEvent::setType() 17 | */ 18 | #define SK_EventType_Delay "\xd" "lay" 19 | #define SK_EventType_Inval "nv" "\xa" "l" 20 | #define SK_EventType_Key "key" "\x1" 21 | #define SK_EventType_OnEnd "on" "\xe" "n" 22 | #define SK_EventType_Unichar "\xc" "har" 23 | #define SK_EventType_KeyUp "key" "\xf" 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/views/android/AndroidKeyToSkKey.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Skia 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef _ANDROID_TO_SKIA_KEYCODES_H 11 | #define _ANDROID_TO_SKIA_KEYCODES_H 12 | 13 | #include "android/keycodes.h" 14 | #include "SkKey.h" 15 | 16 | // Convert an Android keycode to an SkKey. This is an incomplete list, only 17 | // including keys used by the sample app. 18 | SkKey AndroidKeycodeToSkKey(int keycode) { 19 | switch (keycode) { 20 | case AKEYCODE_DPAD_LEFT: 21 | return kLeft_SkKey; 22 | case AKEYCODE_DPAD_RIGHT: 23 | return kRight_SkKey; 24 | case AKEYCODE_DPAD_UP: 25 | return kUp_SkKey; 26 | case AKEYCODE_DPAD_DOWN: 27 | return kDown_SkKey; 28 | case AKEYCODE_BACK: 29 | return kBack_SkKey; 30 | default: 31 | return kNONE_SkKey; 32 | } 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/views/unix/XkeysToSkKeys.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | #include "X11/Xlib.h" 9 | #include "X11/keysym.h" 10 | 11 | #include "SkKey.h" 12 | 13 | #ifndef XKEYS_TOSKKEYS_H 14 | #define XKEYS_TOSKKEYS_H 15 | 16 | SkKey XKeyToSkKey(KeySym keysym) { 17 | switch (keysym) { 18 | case XK_BackSpace: 19 | return kBack_SkKey; 20 | case XK_Return: 21 | return kOK_SkKey; 22 | case XK_Home: 23 | return kHome_SkKey; 24 | case XK_End: 25 | return kEnd_SkKey; 26 | case XK_Right: 27 | return kRight_SkKey; 28 | case XK_Left: 29 | return kLeft_SkKey; 30 | case XK_Down: 31 | return kDown_SkKey; 32 | case XK_Up: 33 | return kUp_SkKey; 34 | default: 35 | return kNONE_SkKey; 36 | } 37 | } 38 | #endif 39 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/views/unix/keysym2ucs.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | /* 9 | * This module converts keysym values into the corresponding ISO 10646-1 10 | * (UCS, Unicode) values. 11 | */ 12 | 13 | #include 14 | 15 | long keysym2ucs(KeySym keysym); 16 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/xml/SkBML_XMLParser.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkBML_XMLParser_DEFINED 11 | #define SkBML_XMLParser_DEFINED 12 | 13 | class SkStream; 14 | class SkWStream; 15 | class SkXMLParser; 16 | class SkXMLWriter; 17 | 18 | class BML_XMLParser { 19 | public: 20 | /** Read the byte XML stream and write the decompressed XML. 21 | */ 22 | static void Read(SkStream& s, SkXMLWriter& writer); 23 | /** Read the byte XML stream and write the decompressed XML into a writable stream. 24 | */ 25 | static void Read(SkStream& s, SkWStream& output); 26 | /** Read the byte XML stream and write the decompressed XML into an XML parser. 27 | */ 28 | static void Read(SkStream& s, SkXMLParser& output); 29 | }; 30 | 31 | #endif // SkBML_XMLParser_DEFINED 32 | 33 | -------------------------------------------------------------------------------- /ui/third_party/skia/include/xml/SkJS.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkTypes.h" 11 | #include "SkWindow.h" 12 | 13 | extern "C" { 14 | typedef long JSWord; 15 | typedef JSWord jsword; 16 | typedef jsword jsval; 17 | typedef struct JSRuntime JSRuntime; 18 | typedef struct JSContext JSContext; 19 | typedef struct JSObject JSObject; 20 | } 21 | 22 | class SkString; 23 | 24 | class SkJS : public SkOSWindow { 25 | public: 26 | SkJS(void* hwnd); 27 | ~SkJS(); 28 | SkBool EvaluateScript(const char* script, jsval* rVal); 29 | SkBool ValueToString(jsval value, SkString* string); 30 | #ifdef SK_DEBUG 31 | static void Test(void* hwnd); 32 | #endif 33 | protected: 34 | void InitializeDisplayables(const SkBitmap& , JSContext *, JSObject *, JSObject *); 35 | void DisposeDisplayables(); 36 | JSRuntime *fRuntime; 37 | JSContext *fContext; 38 | JSObject *fGlobal; 39 | }; 40 | 41 | -------------------------------------------------------------------------------- /ui/third_party/skia/projects/skia.opensdf: -------------------------------------------------------------------------------- 1 | akheyunAKHEYUN-PC -------------------------------------------------------------------------------- /ui/third_party/skia/projects/skia.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/ui/third_party/skia/projects/skia.suo -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkAnimate.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkAnimate_DEFINED 11 | #define SkAnimate_DEFINED 12 | 13 | #include "SkAnimateBase.h" 14 | #include "SkDisplayType.h" 15 | #include "SkIntArray.h" 16 | #include "SkUtils.h" 17 | 18 | class SkAnimate : public SkAnimateBase { 19 | DECLARE_MEMBER_INFO(Animate); 20 | SkAnimate(); 21 | virtual ~SkAnimate(); 22 | virtual int components(); 23 | #ifdef SK_DUMP_ENABLED 24 | virtual void dump(SkAnimateMaker* ); 25 | #endif 26 | virtual void onEndElement(SkAnimateMaker& maker); 27 | protected: 28 | bool resolveCommon(SkAnimateMaker& ); 29 | int fComponents; 30 | private: 31 | typedef SkAnimateBase INHERITED; 32 | }; 33 | 34 | #endif // SkAnimateField_DEFINED 35 | 36 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkAnimate3DSchema.xsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkAnimateProperties.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkAnimateProperties_DEFINED 11 | #define SkAnimateProperties_DEFINED 12 | 13 | enum SkAnimateBase_Properties { 14 | SK_PROPERTY(dynamic), 15 | SK_PROPERTY(mirror), 16 | SK_PROPERTY(reset), 17 | SK_PROPERTY(step), 18 | SK_PROPERTY(values) 19 | }; 20 | 21 | #endif // SkAnimateProperties_DEFINED 22 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkAnimateSchema.xsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkAnimateSet.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkAnimateSet_DEFINED 11 | #define SkAnimateSet_DEFINED 12 | 13 | #include "SkAnimate.h" 14 | 15 | class SkSet : public SkAnimate { 16 | DECLARE_MEMBER_INFO(Set); 17 | SkSet(); 18 | #ifdef SK_DUMP_ENABLED 19 | virtual void dump(SkAnimateMaker* ); 20 | #endif 21 | virtual void onEndElement(SkAnimateMaker& ); 22 | virtual void refresh(SkAnimateMaker& ); 23 | private: 24 | typedef SkAnimate INHERITED; 25 | }; 26 | 27 | #endif // SkAnimateSet_DEFINED 28 | 29 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDisplayBounds.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDisplayBounds_DEFINED 11 | #define SkDisplayBounds_DEFINED 12 | 13 | #include "SkDrawRectangle.h" 14 | 15 | class SkDisplayBounds : public SkDrawRect { 16 | DECLARE_DISPLAY_MEMBER_INFO(Bounds); 17 | SkDisplayBounds(); 18 | virtual bool draw(SkAnimateMaker& ); 19 | private: 20 | SkBool inval; 21 | typedef SkDrawRect INHERITED; 22 | }; 23 | 24 | #endif // SkDisplayBounds_DEFINED 25 | 26 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDisplayInclude.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDisplayInclude_DEFINED 11 | #define SkDisplayInclude_DEFINED 12 | 13 | #include "SkDisplayable.h" 14 | #include "SkMemberInfo.h" 15 | 16 | class SkInclude : public SkDisplayable { 17 | DECLARE_MEMBER_INFO(Include); 18 | virtual void onEndElement(SkAnimateMaker & ); 19 | virtual bool enable(SkAnimateMaker & ); 20 | virtual bool hasEnable() const; 21 | protected: 22 | SkString src; 23 | }; 24 | 25 | #endif // SkDisplayInclude_DEFINED 26 | 27 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDisplayInput.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDisplayInput_DEFINED 11 | #define SkDisplayInput_DEFINED 12 | 13 | #include "SkDisplayable.h" 14 | #include "SkMemberInfo.h" 15 | 16 | class SkInput : public SkDisplayable { 17 | DECLARE_MEMBER_INFO(Input); 18 | SkInput(); 19 | virtual SkDisplayable* contains(const SkString& ); 20 | virtual bool getProperty(int index, SkScriptValue* value) const; 21 | virtual bool enable(SkAnimateMaker & ); 22 | virtual bool hasEnable() const; 23 | protected: 24 | SkString name; 25 | int32_t fInt; 26 | SkScalar fFloat; 27 | SkString string; 28 | private: 29 | friend class SkDisplayEvent; 30 | friend class SkPost; 31 | }; 32 | 33 | #endif // SkDisplayInput_DEFINED 34 | 35 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDisplayMath.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDisplayMath_DEFINED 11 | #define SkDisplayMath_DEFINED 12 | 13 | #include "SkDisplayable.h" 14 | #include "SkMemberInfo.h" 15 | #include "SkRandom.h" 16 | 17 | class SkDisplayMath : public SkDisplayable { 18 | DECLARE_DISPLAY_MEMBER_INFO(Math); 19 | virtual void executeFunction(SkDisplayable* , int index, 20 | SkTDArray& parameters, SkDisplayTypes type, 21 | SkScriptValue* ); 22 | virtual const SkFunctionParamType* getFunctionsParameters(); 23 | virtual bool getProperty(int index, SkScriptValue* value) const; 24 | private: 25 | mutable SkRandom fRandom; 26 | static const SkScalar gConstants[]; 27 | static const SkFunctionParamType fFunctionParameters[]; 28 | 29 | }; 30 | 31 | #endif // SkDisplayMath_DEFINED 32 | 33 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDisplayNumber.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDisplayNumber_DEFINED 11 | #define SkDisplayNumber_DEFINED 12 | 13 | #include "SkDisplayable.h" 14 | #include "SkMemberInfo.h" 15 | 16 | class SkDisplayNumber : public SkDisplayable { 17 | DECLARE_DISPLAY_MEMBER_INFO(Number); 18 | virtual bool getProperty(int index, SkScriptValue* value) const; 19 | private: 20 | }; 21 | 22 | #endif // SkDisplayNumber_DEFINED 23 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDisplayRandom.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDisplayRandom_DEFINED 11 | #define SkDisplayRandom_DEFINED 12 | 13 | #include "SkDisplayable.h" 14 | #include "SkMemberInfo.h" 15 | #include "SkRandom.h" 16 | 17 | #ifdef min 18 | #undef min 19 | #endif 20 | 21 | #ifdef max 22 | #undef max 23 | #endif 24 | 25 | class SkDisplayRandom : public SkDisplayable { 26 | DECLARE_DISPLAY_MEMBER_INFO(Random); 27 | SkDisplayRandom(); 28 | #ifdef SK_DUMP_ENABLED 29 | virtual void dump(SkAnimateMaker* ); 30 | #endif 31 | virtual bool getProperty(int index, SkScriptValue* value) const; 32 | virtual bool setProperty(int index, SkScriptValue& ); 33 | private: 34 | SkScalar blend; 35 | SkScalar min; 36 | SkScalar max; 37 | mutable SkRandom fRandom; 38 | }; 39 | 40 | #endif // SkDisplayRandom_DEFINED 41 | 42 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDisplayScreenplay.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkDisplayScreenplay.h" 11 | 12 | #if SK_USE_CONDENSED_INFO == 0 13 | 14 | const SkMemberInfo SkDisplayScreenplay::fInfo[] = { 15 | SK_MEMBER(time, MSec) 16 | }; 17 | 18 | #endif 19 | 20 | DEFINE_GET_MEMBER(SkDisplayScreenplay); 21 | 22 | 23 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDisplayScreenplay.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDisplayScreenplay_DEFINED 11 | #define SkDisplayScreenplay_DEFINED 12 | 13 | #include "SkDisplayable.h" 14 | #include "SkMemberInfo.h" 15 | 16 | class SkDisplayScreenplay : public SkDisplayable { 17 | DECLARE_DISPLAY_MEMBER_INFO(Screenplay); 18 | SkMSec time; 19 | }; 20 | 21 | #endif // SkDisplayScreenplay_DEFINED 22 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawBlur.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkDrawBlur.h" 11 | 12 | #if SK_USE_CONDENSED_INFO == 0 13 | 14 | const SkMemberInfo SkDrawBlur::fInfo[] = { 15 | SK_MEMBER(blurStyle, MaskFilterBlurStyle), 16 | SK_MEMBER(radius, Float) 17 | }; 18 | 19 | #endif 20 | 21 | DEFINE_GET_MEMBER(SkDrawBlur); 22 | 23 | SkDrawBlur::SkDrawBlur() : radius(-1), 24 | blurStyle(SkBlurMaskFilter::kNormal_BlurStyle) { 25 | } 26 | 27 | SkMaskFilter* SkDrawBlur::getMaskFilter() { 28 | if (radius < 0) 29 | return NULL; 30 | return SkBlurMaskFilter::Create(radius, (SkBlurMaskFilter::BlurStyle) blurStyle); 31 | } 32 | 33 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawBlur.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawBlur_DEFINED 11 | #define SkDrawBlur_DEFINED 12 | 13 | #include "SkPaintParts.h" 14 | #include "SkBlurMaskFilter.h" 15 | 16 | class SkDrawBlur : public SkDrawMaskFilter { 17 | DECLARE_DRAW_MEMBER_INFO(Blur); 18 | SkDrawBlur(); 19 | virtual SkMaskFilter* getMaskFilter(); 20 | protected: 21 | SkScalar radius; 22 | int /*SkBlurMaskFilter::BlurStyle*/ blurStyle; 23 | }; 24 | 25 | #endif // SkDrawBlur_DEFINED 26 | 27 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawClip.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkDrawClip.h" 11 | #include "SkAnimateMaker.h" 12 | #include "SkCanvas.h" 13 | #include "SkDrawRectangle.h" 14 | #include "SkDrawPath.h" 15 | 16 | 17 | #if SK_USE_CONDENSED_INFO == 0 18 | 19 | const SkMemberInfo SkDrawClip::fInfo[] = { 20 | SK_MEMBER(path, Path), 21 | SK_MEMBER(rect, Rect) 22 | }; 23 | 24 | #endif 25 | 26 | DEFINE_GET_MEMBER(SkDrawClip); 27 | 28 | SkDrawClip::SkDrawClip() : rect(NULL), path(NULL) { 29 | } 30 | 31 | bool SkDrawClip::draw(SkAnimateMaker& maker ) { 32 | if (rect != NULL) 33 | maker.fCanvas->clipRect(rect->fRect); 34 | else { 35 | SkASSERT(path != NULL); 36 | maker.fCanvas->clipPath(path->fPath); 37 | } 38 | return false; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawClip.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawClip_DEFINED 11 | #define SkDrawClip_DEFINED 12 | 13 | #include "SkDrawable.h" 14 | #include "SkMemberInfo.h" 15 | #include "SkRegion.h" 16 | 17 | class SkDrawPath; 18 | class SkDrawRect; 19 | 20 | class SkDrawClip : public SkDrawable { 21 | DECLARE_DRAW_MEMBER_INFO(Clip); 22 | SkDrawClip(); 23 | virtual bool draw(SkAnimateMaker& ); 24 | private: 25 | SkDrawRect* rect; 26 | SkDrawPath* path; 27 | }; 28 | 29 | #endif // SkDrawClip_DEFINED 30 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawDash.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkDrawDash.h" 11 | #include "SkDashPathEffect.h" 12 | 13 | #if SK_USE_CONDENSED_INFO == 0 14 | 15 | const SkMemberInfo SkDash::fInfo[] = { 16 | SK_MEMBER_ARRAY(intervals, Float), 17 | SK_MEMBER(phase, Float) 18 | }; 19 | 20 | #endif 21 | 22 | DEFINE_GET_MEMBER(SkDash); 23 | 24 | SkDash::SkDash() : phase(0) { 25 | } 26 | 27 | SkDash::~SkDash() { 28 | } 29 | 30 | SkPathEffect* SkDash::getPathEffect() { 31 | int count = intervals.count(); 32 | if (count == 0) 33 | return NULL; 34 | return new SkDashPathEffect(intervals.begin(), count, phase); 35 | } 36 | 37 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawDash.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawDash_DEFINED 11 | #define SkDrawDash_DEFINED 12 | 13 | #include "SkPaintParts.h" 14 | #include "SkIntArray.h" 15 | 16 | class SkDash : public SkDrawPathEffect { 17 | DECLARE_MEMBER_INFO(Dash); 18 | SkDash(); 19 | virtual ~SkDash(); 20 | virtual SkPathEffect* getPathEffect(); 21 | private: 22 | SkTDScalarArray intervals; 23 | SkScalar phase; 24 | }; 25 | 26 | #endif // SkDrawDash_DEFINED 27 | 28 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawDiscrete.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkDrawDiscrete.h" 11 | #include "SkAnimateMaker.h" 12 | #include "SkPaint.h" 13 | #include "SkDiscretePathEffect.h" 14 | 15 | #if SK_USE_CONDENSED_INFO == 0 16 | 17 | const SkMemberInfo SkDiscrete::fInfo[] = { 18 | SK_MEMBER(deviation, Float), 19 | SK_MEMBER(segLength, Float) 20 | }; 21 | 22 | #endif 23 | 24 | DEFINE_GET_MEMBER(SkDiscrete); 25 | 26 | SkDiscrete::SkDiscrete() : deviation(0), segLength(0) { 27 | } 28 | 29 | SkPathEffect* SkDiscrete::getPathEffect() { 30 | if (deviation <= 0 || segLength <= 0) 31 | return NULL; 32 | else 33 | return new SkDiscretePathEffect(segLength, deviation); 34 | } 35 | 36 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawDiscrete.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawDiscrete_DEFINED 11 | #define SkDrawDiscrete_DEFINED 12 | 13 | #include "SkPaintParts.h" 14 | 15 | class SkDiscrete : public SkDrawPathEffect { 16 | DECLARE_MEMBER_INFO(Discrete); 17 | SkDiscrete(); 18 | virtual SkPathEffect* getPathEffect(); 19 | private: 20 | SkScalar deviation; 21 | SkScalar segLength; 22 | }; 23 | 24 | #endif //SkDrawDiscrete_DEFINED 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawEmboss.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkDrawEmboss.h" 11 | 12 | #if SK_USE_CONDENSED_INFO == 0 13 | 14 | const SkMemberInfo SkDrawEmboss::fInfo[] = { 15 | SK_MEMBER(ambient, Float), 16 | SK_MEMBER_ARRAY(direction, Float), 17 | SK_MEMBER(radius, Float), 18 | SK_MEMBER(specular, Float) 19 | }; 20 | 21 | #endif 22 | 23 | DEFINE_GET_MEMBER(SkDrawEmboss); 24 | 25 | SkDrawEmboss::SkDrawEmboss() : radius(-1) { 26 | direction.setCount(3); 27 | } 28 | 29 | SkMaskFilter* SkDrawEmboss::getMaskFilter() { 30 | if (radius < 0 || direction.count() !=3) 31 | return NULL; 32 | return SkBlurMaskFilter::CreateEmboss(direction.begin(), ambient, specular, radius); 33 | } 34 | 35 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawEmboss.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawEmboss_DEFINED 11 | #define SkDrawEmboss_DEFINED 12 | 13 | #include "SkDrawBlur.h" 14 | 15 | class SkDrawEmboss : public SkDrawMaskFilter { 16 | DECLARE_DRAW_MEMBER_INFO(Emboss); 17 | SkDrawEmboss(); 18 | virtual SkMaskFilter* getMaskFilter(); 19 | protected: 20 | SkTDScalarArray direction; 21 | SkScalar radius, ambient, specular; 22 | }; 23 | 24 | #endif // SkDrawEmboss_DEFINED 25 | 26 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawFull.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkDrawFull.h" 11 | #include "SkAnimateMaker.h" 12 | #include "SkCanvas.h" 13 | 14 | bool SkFull::draw(SkAnimateMaker& maker) { 15 | SkBoundableAuto boundable(this, maker); 16 | maker.fCanvas->drawPaint(*maker.fPaint); 17 | return false; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawFull.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawFull_DEFINED 11 | #define SkDrawFull_DEFINED 12 | 13 | #include "SkBoundable.h" 14 | 15 | class SkFull : public SkBoundable { 16 | DECLARE_EMPTY_MEMBER_INFO(Full); 17 | virtual bool draw(SkAnimateMaker& ); 18 | private: 19 | typedef SkBoundable INHERITED; 20 | }; 21 | 22 | #endif // SkDrawFull_DEFINED 23 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawLine.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkDrawLine.h" 11 | #include "SkAnimateMaker.h" 12 | #include "SkCanvas.h" 13 | #include "SkPaint.h" 14 | 15 | #if SK_USE_CONDENSED_INFO == 0 16 | 17 | const SkMemberInfo SkLine::fInfo[] = { 18 | SK_MEMBER(x1, Float), 19 | SK_MEMBER(x2, Float), 20 | SK_MEMBER(y1, Float), 21 | SK_MEMBER(y2, Float) 22 | }; 23 | 24 | #endif 25 | 26 | DEFINE_GET_MEMBER(SkLine); 27 | 28 | SkLine::SkLine() : x1(0), x2(0), y1(0), y2(0) { 29 | } 30 | 31 | bool SkLine::draw(SkAnimateMaker& maker) { 32 | SkBoundableAuto boundable(this, maker); 33 | maker.fCanvas->drawLine(x1, y1, x2, y2, *maker.fPaint); 34 | return false; 35 | } 36 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawLine.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawLine_DEFINED 11 | #define SkDrawLine_DEFINED 12 | 13 | #include "SkBoundable.h" 14 | #include "SkMemberInfo.h" 15 | 16 | class SkLine : public SkBoundable { 17 | DECLARE_MEMBER_INFO(Line); 18 | SkLine(); 19 | virtual bool draw(SkAnimateMaker& ); 20 | private: 21 | SkScalar x1; 22 | SkScalar x2; 23 | SkScalar y1; 24 | SkScalar y2; 25 | typedef SkBoundable INHERITED; 26 | }; 27 | 28 | #endif // SkDrawLine_DEFINED 29 | 30 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawOval.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkDrawOval.h" 11 | #include "SkAnimateMaker.h" 12 | #include "SkCanvas.h" 13 | 14 | #if SK_USE_CONDENSED_INFO == 0 15 | 16 | const SkMemberInfo SkOval::fInfo[] = { 17 | SK_MEMBER_INHERITED, 18 | }; 19 | 20 | #endif 21 | 22 | DEFINE_GET_MEMBER(SkOval); 23 | 24 | bool SkOval::draw(SkAnimateMaker& maker) { 25 | SkBoundableAuto boundable(this, maker); 26 | maker.fCanvas->drawOval(fRect, *maker.fPaint); 27 | return false; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawOval.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawOval_DEFINED 11 | #define SkDrawOval_DEFINED 12 | 13 | #include "SkDrawRectangle.h" 14 | 15 | class SkOval : public SkDrawRect { 16 | DECLARE_MEMBER_INFO(Oval); 17 | virtual bool draw(SkAnimateMaker& ); 18 | private: 19 | typedef SkDrawRect INHERITED; 20 | }; 21 | 22 | #endif // SkDrawOval_DEFINED 23 | 24 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawPoint.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawPoint_DEFINED 11 | #define SkDrawPoint_DEFINED 12 | 13 | #include "SkBoundable.h" 14 | #include "SkMemberInfo.h" 15 | #include "SkPoint.h" 16 | 17 | struct Sk_Point { 18 | DECLARE_NO_VIRTUALS_MEMBER_INFO(_Point); 19 | Sk_Point(); 20 | private: 21 | SkPoint fPoint; 22 | }; 23 | 24 | class SkDrawPoint : public SkDisplayable { 25 | DECLARE_MEMBER_INFO(DrawPoint); 26 | SkDrawPoint(); 27 | virtual void getBounds(SkRect* ); 28 | private: 29 | SkPoint fPoint; 30 | typedef SkDisplayable INHERITED; 31 | }; 32 | 33 | #endif // SkDrawPoint_DEFINED 34 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawSaveLayer.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawSaveLayer_DEFINED 11 | #define SkDrawSaveLayer_DEFINED 12 | 13 | #include "SkDrawGroup.h" 14 | #include "SkMemberInfo.h" 15 | 16 | class SkDrawPaint; 17 | class SkDrawRect; 18 | 19 | class SkSaveLayer : public SkGroup { 20 | DECLARE_MEMBER_INFO(SaveLayer); 21 | SkSaveLayer(); 22 | virtual ~SkSaveLayer(); 23 | virtual bool draw(SkAnimateMaker& ); 24 | #ifdef SK_DUMP_ENABLED 25 | virtual void dump(SkAnimateMaker* ); 26 | #endif 27 | virtual void onEndElement(SkAnimateMaker& ); 28 | protected: 29 | SkDrawPaint* paint; 30 | SkDrawRect* bounds; 31 | private: 32 | typedef SkGroup INHERITED; 33 | 34 | }; 35 | 36 | #endif //SkDrawSaveLayer_DEFINED 37 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawShader.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawShader_DEFINED 11 | #define SkDrawShader_DEFINED 12 | 13 | #include "SkPaintParts.h" 14 | #include "SkShader.h" 15 | 16 | class SkBaseBitmap; 17 | 18 | class SkDrawBitmapShader : public SkDrawShader { 19 | DECLARE_DRAW_MEMBER_INFO(BitmapShader); 20 | SkDrawBitmapShader(); 21 | virtual bool add(); 22 | virtual SkShader* getShader(); 23 | protected: 24 | SkBool filterBitmap; 25 | SkBaseBitmap* image; 26 | private: 27 | typedef SkDrawShader INHERITED; 28 | }; 29 | 30 | #endif // SkDrawShader_DEFINED 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawText.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawText_DEFINED 11 | #define SkDrawText_DEFINED 12 | 13 | #include "SkBoundable.h" 14 | #include "SkMemberInfo.h" 15 | 16 | class SkText : public SkBoundable { 17 | DECLARE_MEMBER_INFO(Text); 18 | SkText(); 19 | virtual ~SkText(); 20 | virtual bool draw(SkAnimateMaker& ); 21 | #ifdef SK_DUMP_ENABLED 22 | virtual void dump(SkAnimateMaker* ); 23 | #endif 24 | virtual bool getProperty(int index, SkScriptValue* value) const ; 25 | const char* getText() { return text.c_str(); } 26 | size_t getSize() { return text.size(); } 27 | protected: 28 | SkString text; 29 | SkScalar x; 30 | SkScalar y; 31 | private: 32 | friend class SkTextToPath; 33 | typedef SkBoundable INHERITED; 34 | }; 35 | 36 | #endif // SkDrawText_DEFINED 37 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawTextBox.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawTextBox_DEFINED 11 | #define SkDrawTextBox_DEFINED 12 | 13 | #include "SkDrawRectangle.h" 14 | #include "SkTextBox.h" 15 | 16 | class SkDrawTextBox : public SkDrawRect { 17 | DECLARE_DRAW_MEMBER_INFO(TextBox); 18 | SkDrawTextBox(); 19 | 20 | // overrides 21 | virtual bool draw(SkAnimateMaker& ); 22 | #ifdef SK_DUMP_ENABLED 23 | virtual void dump(SkAnimateMaker* ); 24 | #endif 25 | virtual bool getProperty(int index, SkScriptValue* value) const; 26 | virtual bool setProperty(int index, SkScriptValue& ); 27 | 28 | private: 29 | SkString fText; 30 | SkScalar fSpacingMul; 31 | SkScalar fSpacingAdd; 32 | int /*SkTextBox::Mode*/ mode; 33 | int /*SkTextBox::SpacingAlign*/ spacingAlign; 34 | 35 | typedef SkDrawRect INHERITED; 36 | }; 37 | 38 | #endif // SkDrawTextBox_DEFINED 39 | 40 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawTo.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawTo_DEFINED 11 | #define SkDrawTo_DEFINED 12 | 13 | #include "SkDrawGroup.h" 14 | #include "SkMemberInfo.h" 15 | 16 | class SkDrawBitmap; 17 | 18 | class SkDrawTo : public SkGroup { 19 | DECLARE_MEMBER_INFO(DrawTo); 20 | SkDrawTo(); 21 | // virtual ~SkDrawTo(); 22 | virtual bool draw(SkAnimateMaker& ); 23 | #ifdef SK_DUMP_ENABLED 24 | virtual void dump(SkAnimateMaker* ); 25 | #endif 26 | protected: 27 | SkBool drawOnce; 28 | SkDrawBitmap* use; 29 | private: 30 | typedef SkGroup INHERITED; 31 | SkBool fDrawnOnce; 32 | }; 33 | 34 | #endif // SkDrawTo_DEFINED 35 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawTransparentShader.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkDrawTransparentShader.h" 11 | #include "SkTransparentShader.h" 12 | 13 | SkShader* SkDrawTransparentShader::getShader() { 14 | return new SkTransparentShader(); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawTransparentShader.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawTransparentShader_DEFINED 11 | #define SkDrawTransparentShader_DEFINED 12 | 13 | #include "SkPaintParts.h" 14 | 15 | class SkDrawTransparentShader : public SkDrawShader { 16 | DECLARE_EMPTY_MEMBER_INFO(TransparentShader); 17 | virtual SkShader* getShader(); 18 | }; 19 | 20 | #endif // SkDrawTransparentShader_DEFINED 21 | 22 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawable.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkDrawable.h" 11 | 12 | bool SkDrawable::doEvent(SkDisplayEvent::Kind , SkEventState* ) { 13 | return false; 14 | } 15 | 16 | bool SkDrawable::isDrawable() const { 17 | return true; 18 | } 19 | 20 | void SkDrawable::initialize() { 21 | } 22 | 23 | void SkDrawable::setSteps(int steps) { 24 | } 25 | 26 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkDrawable.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkDrawable_DEFINED 11 | #define SkDrawable_DEFINED 12 | 13 | #include "SkDisplayable.h" 14 | #include "SkDisplayEvent.h" 15 | #include "SkMath.h" 16 | 17 | struct SkEventState; 18 | 19 | class SkDrawable : public SkDisplayable { 20 | public: 21 | virtual bool doEvent(SkDisplayEvent::Kind , SkEventState* state ); 22 | virtual bool draw(SkAnimateMaker& ) = 0; 23 | virtual void initialize(); 24 | virtual bool isDrawable() const; 25 | virtual void setSteps(int steps); 26 | }; 27 | 28 | #endif // SkDrawable_DEFINED 29 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkExtras.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkExtras_DEFINED 11 | #define SkExtras_DEFINED 12 | 13 | #include "SkScript.h" 14 | 15 | class SkExtras { 16 | public: 17 | SkExtras(); 18 | virtual ~SkExtras() {} 19 | 20 | virtual SkDisplayable* createInstance(SkDisplayTypes type) = 0; 21 | virtual bool definesType(SkDisplayTypes type) = 0; 22 | #if SK_USE_CONDENSED_INFO == 0 23 | virtual const SkMemberInfo* getMembers(SkDisplayTypes type, int* infoCountPtr) = 0; 24 | #endif 25 | #ifdef SK_DEBUG 26 | virtual const char* getName(SkDisplayTypes type) = 0; 27 | #endif 28 | virtual SkDisplayTypes getType(const char match[], size_t len ) = 0; 29 | 30 | SkScriptEngine::_propertyCallBack fExtraCallBack; 31 | void* fExtraStorage; 32 | }; 33 | 34 | #endif // SkExtras_DEFINED 35 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkHitClear.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkHitClear.h" 11 | 12 | #if SK_USE_CONDENSED_INFO == 0 13 | 14 | const SkMemberInfo SkHitClear::fInfo[] = { 15 | SK_MEMBER_ARRAY(targets, Displayable) 16 | }; 17 | 18 | #endif 19 | 20 | DEFINE_GET_MEMBER(SkHitClear); 21 | 22 | bool SkHitClear::enable(SkAnimateMaker& maker) { 23 | for (int tIndex = 0; tIndex < targets.count(); tIndex++) { 24 | SkDisplayable* target = targets[tIndex]; 25 | target->clearBounder(); 26 | } 27 | return true; 28 | } 29 | 30 | bool SkHitClear::hasEnable() const { 31 | return true; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkHitClear.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkHitClear_DEFINED 11 | #define SkHitClear_DEFINED 12 | 13 | #include "SkDisplayable.h" 14 | #include "SkMemberInfo.h" 15 | #include "SkTypedArray.h" 16 | 17 | class SkHitClear : public SkDisplayable { 18 | DECLARE_MEMBER_INFO(HitClear); 19 | virtual bool enable(SkAnimateMaker& ); 20 | virtual bool hasEnable() const; 21 | private: 22 | SkTDDisplayableArray targets; 23 | }; 24 | 25 | #endif // SkHitClear_DEFINED 26 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkHitTest.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkHitTest_DEFINED 11 | #define SkHitTest_DEFINED 12 | 13 | #include "SkDrawable.h" 14 | #include "SkTypedArray.h" 15 | 16 | class SkHitTest : public SkDrawable { 17 | DECLARE_MEMBER_INFO(HitTest); 18 | SkHitTest(); 19 | virtual bool draw(SkAnimateMaker& ); 20 | virtual bool enable(SkAnimateMaker& ); 21 | virtual bool hasEnable() const; 22 | virtual const SkMemberInfo* preferredChild(SkDisplayTypes type); 23 | private: 24 | SkTDDisplayableArray bullets; 25 | SkTDIntArray hits; 26 | SkTDDisplayableArray targets; 27 | SkBool value; 28 | }; 29 | 30 | #endif // SkHitTest_DEFINED 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkOpArray.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | #include "SkOpArray.h" 9 | 10 | SkOpArray::SkOpArray() : fType(SkOperand2::kNoType) { 11 | } 12 | 13 | SkOpArray::SkOpArray(SkOperand2::OpType type) : fType(type) { 14 | } 15 | 16 | bool SkOpArray::getIndex(int index, SkOperand2* operand) { 17 | if (index >= count()) { 18 | SkASSERT(0); 19 | return false; 20 | } 21 | *operand = begin()[index]; 22 | return true; 23 | } 24 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkOpArray.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | #ifndef SkOpArray_DEFINED 9 | #define SkOpArray_DEFINED 10 | 11 | #include "SkOperand2.h" 12 | #include "SkTDArray_Experimental.h" 13 | 14 | typedef SkLongArray(SkOperand2) SkTDOperand2Array; 15 | 16 | class SkOpArray : public SkTDOperand2Array { 17 | public: 18 | SkOpArray(); 19 | SkOpArray(SkOperand2::OpType type); 20 | bool getIndex(int index, SkOperand2* operand); 21 | SkOperand2::OpType getType() { return fType; } 22 | void setType(SkOperand2::OpType type) { 23 | fType = type; 24 | } 25 | protected: 26 | SkOperand2::OpType fType; 27 | }; 28 | 29 | #endif // SkOpArray_DEFINED 30 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkPostParts.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkPostParts_DEFINED 11 | #define SkPostParts_DEFINED 12 | 13 | #include "SkDisplayInput.h" 14 | 15 | class SkPost; 16 | 17 | class SkDataInput: public SkInput { 18 | DECLARE_MEMBER_INFO(DataInput); 19 | SkDataInput(); 20 | bool add(); 21 | virtual void dirty(); 22 | virtual SkDisplayable* getParent() const; 23 | virtual void onEndElement(SkAnimateMaker& ); 24 | virtual bool setParent(SkDisplayable* ); 25 | protected: 26 | SkPost* fParent; 27 | typedef SkInput INHERITED; 28 | friend class SkPost; 29 | }; 30 | 31 | #endif // SkPostParts_DEFINED 32 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkSnapshot.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSnapShot_DEFINED 11 | #define SkSnapShot_DEFINED 12 | 13 | #include "SkDrawable.h" 14 | #include "SkImageDecoder.h" 15 | #include "SkMemberInfo.h" 16 | #include "SkString.h" 17 | 18 | class SkSnapshot: public SkDrawable { 19 | DECLARE_MEMBER_INFO(Snapshot); 20 | SkSnapshot(); 21 | virtual bool draw(SkAnimateMaker& ); 22 | private: 23 | SkString filename; 24 | SkScalar quality; 25 | SkBool sequence; 26 | int /*SkImageEncoder::Type*/ type; 27 | int fSeqVal; 28 | }; 29 | 30 | #endif // SkSnapShot_DEFINED 31 | 32 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkTextOnPath.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkTextOnPath.h" 11 | #include "SkAnimateMaker.h" 12 | #include "SkCanvas.h" 13 | #include "SkDrawPath.h" 14 | #include "SkDrawText.h" 15 | #include "SkPaint.h" 16 | 17 | #if SK_USE_CONDENSED_INFO == 0 18 | 19 | const SkMemberInfo SkTextOnPath::fInfo[] = { 20 | SK_MEMBER(offset, Float), 21 | SK_MEMBER(path, Path), 22 | SK_MEMBER(text, Text) 23 | }; 24 | 25 | #endif 26 | 27 | DEFINE_GET_MEMBER(SkTextOnPath); 28 | 29 | SkTextOnPath::SkTextOnPath() : offset(0), path(NULL), text(NULL) { 30 | } 31 | 32 | bool SkTextOnPath::draw(SkAnimateMaker& maker) { 33 | SkASSERT(text); 34 | SkASSERT(path); 35 | SkBoundableAuto boundable(this, maker); 36 | maker.fCanvas->drawTextOnPathHV(text->getText(), text->getSize(), 37 | path->getPath(), offset, 0, *maker.fPaint); 38 | return false; 39 | } 40 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkTextOnPath.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkTextOnPath_DEFINED 11 | #define SkTextOnPath_DEFINED 12 | 13 | #include "SkBoundable.h" 14 | #include "SkMemberInfo.h" 15 | 16 | class SkDrawPath; 17 | class SkText; 18 | 19 | class SkTextOnPath : public SkBoundable { 20 | DECLARE_MEMBER_INFO(TextOnPath); 21 | SkTextOnPath(); 22 | virtual bool draw(SkAnimateMaker& ); 23 | private: 24 | SkScalar offset; 25 | SkDrawPath* path; 26 | SkText* text; 27 | typedef SkBoundable INHERITED; 28 | }; 29 | 30 | #endif // SkTextOnPath_DEFINED 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkTextToPath.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkTextToPath_DEFINED 11 | #define SkTextToPath_DEFINED 12 | 13 | #include "SkDrawPath.h" 14 | #include "SkMemberInfo.h" 15 | 16 | class SkDrawPaint; 17 | class SkDrawPath; 18 | class SkText; 19 | 20 | class SkTextToPath : public SkDrawable { 21 | DECLARE_MEMBER_INFO(TextToPath); 22 | SkTextToPath(); 23 | virtual bool draw(SkAnimateMaker& ); 24 | virtual void onEndElement(SkAnimateMaker& ); 25 | private: 26 | SkDrawPaint* paint; 27 | SkDrawPath* path; 28 | SkText* text; 29 | }; 30 | 31 | #endif // SkTextToPath_DEFINED 32 | 33 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkTypedArray.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkTypedArray_DEFINED 11 | #define SkTypedArray_DEFINED 12 | 13 | #include "SkScript.h" 14 | #include "SkTDArray_Experimental.h" 15 | 16 | class SkTypedArray : public SkTDOperandArray { 17 | public: 18 | SkTypedArray(); 19 | SkTypedArray(SkDisplayTypes type); 20 | bool getIndex(int index, SkOperand* operand); 21 | SkDisplayTypes getType() { return fType; } 22 | SkScriptEngine::SkOpType getOpType() { return SkScriptEngine::ToOpType(fType); } 23 | void setType(SkDisplayTypes type) { 24 | // SkASSERT(count() == 0); 25 | fType = type; 26 | } 27 | protected: 28 | SkDisplayTypes fType; 29 | }; 30 | 31 | #endif // SkTypedArray_DEFINED 32 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/SkXMLAnimatorWriter.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkXMLAnimatorWriter_DEFINED 11 | #define SkXMLAnimatorWriter_DEFINED 12 | 13 | #include "SkXMLWriter.h" 14 | 15 | class SkAnimator; 16 | class SkDisplayXMLParser; 17 | 18 | class SkXMLAnimatorWriter : public SkXMLWriter { 19 | public: 20 | SkXMLAnimatorWriter(SkAnimator*); 21 | virtual ~SkXMLAnimatorWriter(); 22 | virtual void writeHeader(); 23 | SkDEBUGCODE(static void UnitTest(class SkCanvas* canvas);) 24 | protected: 25 | virtual void onAddAttributeLen(const char name[], const char value[], size_t length); 26 | virtual void onEndElement(); 27 | virtual void onStartElementLen(const char elem[], size_t length); 28 | private: 29 | SkAnimator* fAnimator; 30 | SkDisplayXMLParser* fParser; 31 | }; 32 | 33 | #endif // SkXMLAnimatorWriter_DEFINED 34 | 35 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/animator/thingstodo.txt: -------------------------------------------------------------------------------- 1 | things to do: 2 | figure out where endless or very deep recursion is possible 3 | at these points, generate an error if actual physical stack gets too large 4 | candidates are scripts 5 | eval(eval(eval... user callouts 6 | ((((( operator precedence or similar making stack deep 7 | groups within groups 8 | very large apply create or apply immediate steps 9 | 10 | write tests for math functions 11 | looks like random takes a parameter when it should take zero parameters 12 | 13 | add Math, Number files to perforce for docs 14 | alphabetize attributes in docs 15 | 16 | manually modified tools/screenplayDocs/xmlToJPEG.cpp 17 | 18 | fix docs where lines are stitched together (insert space) 19 | 20 | naked outside of asserts on name 21 | handle errors for all element not contained by correct parents -------------------------------------------------------------------------------- /ui/third_party/skia/src/core/SkBBoxHierarchy.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #include "SkBBoxHierarchy.h" 10 | 11 | SK_DEFINE_INST_COUNT(SkBBoxHierarchy) 12 | 13 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/core/SkCordic.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkCordic_DEFINED 11 | #define SkCordic_DEFINED 12 | 13 | #include "SkTypes.h" 14 | #include "SkFixed.h" 15 | 16 | SkFixed SkCordicACos(SkFixed a); 17 | SkFixed SkCordicASin(SkFixed a); 18 | SkFixed SkCordicATan2(SkFixed y, SkFixed x); 19 | SkFixed SkCordicExp(SkFixed a); 20 | SkFixed SkCordicLog(SkFixed a); 21 | SkFixed SkCordicSinCos(SkFixed radians, SkFixed* cosp); 22 | SkFixed SkCordicTan(SkFixed a); 23 | 24 | #ifdef SK_DEBUG 25 | void SkCordic_UnitTest(); 26 | #endif 27 | 28 | #endif // SkCordic 29 | 30 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/core/SkCubicClipper.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2009 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkCubicClipper_DEFINED 11 | #define SkCubicClipper_DEFINED 12 | 13 | #include "SkPoint.h" 14 | #include "SkRect.h" 15 | 16 | /** This class is initialized with a clip rectangle, and then can be fed cubics, 17 | which must already be monotonic in Y. 18 | 19 | In the future, it might return a series of segments, allowing it to clip 20 | also in X, to ensure that all segments fit in a finite coordinate system. 21 | */ 22 | class SkCubicClipper { 23 | public: 24 | SkCubicClipper(); 25 | 26 | void setClip(const SkIRect& clip); 27 | 28 | bool clipCubic(const SkPoint src[4], SkPoint dst[4]); 29 | 30 | private: 31 | SkRect fClip; 32 | }; 33 | 34 | #endif // SkCubicClipper_DEFINED 35 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/core/SkDebug.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkTypes.h" 11 | 12 | #ifdef SK_DEBUG 13 | 14 | int8_t SkToS8(long x) 15 | { 16 | SkASSERT((int8_t)x == x); 17 | return (int8_t)x; 18 | } 19 | 20 | uint8_t SkToU8(size_t x) 21 | { 22 | SkASSERT((uint8_t)x == x); 23 | return (uint8_t)x; 24 | } 25 | 26 | int16_t SkToS16(long x) 27 | { 28 | SkASSERT((int16_t)x == x); 29 | return (int16_t)x; 30 | } 31 | 32 | uint16_t SkToU16(size_t x) 33 | { 34 | SkASSERT((uint16_t)x == x); 35 | return (uint16_t)x; 36 | } 37 | 38 | int32_t SkToS32(long x) 39 | { 40 | SkASSERT((int32_t)x == x); 41 | return (int32_t)x; 42 | } 43 | 44 | uint32_t SkToU32(size_t x) 45 | { 46 | SkASSERT((uint32_t)x == x); 47 | return (uint32_t)x; 48 | } 49 | 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/core/SkFontHost.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2009 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkFontHost.h" 11 | 12 | static SkFontHost::LCDOrientation gLCDOrientation = SkFontHost::kHorizontal_LCDOrientation; 13 | static SkFontHost::LCDOrder gLCDOrder = SkFontHost::kRGB_LCDOrder; 14 | 15 | // static 16 | SkFontHost::LCDOrientation SkFontHost::GetSubpixelOrientation() 17 | { 18 | return gLCDOrientation; 19 | } 20 | 21 | // static 22 | void SkFontHost::SetSubpixelOrientation(LCDOrientation orientation) 23 | { 24 | gLCDOrientation = orientation; 25 | } 26 | 27 | // static 28 | SkFontHost::LCDOrder SkFontHost::GetSubpixelOrder() 29 | { 30 | return gLCDOrder; 31 | } 32 | 33 | // static 34 | void SkFontHost::SetSubpixelOrder(LCDOrder order) 35 | { 36 | gLCDOrder = order; 37 | } 38 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/core/SkInstCnt.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkInstCnt.h" 9 | 10 | #ifdef SK_ENABLE_INST_COUNT 11 | bool gPrintInstCount = false; 12 | #endif 13 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/core/SkPaintDefaults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkPaintDefaults_DEFINED 9 | #define SkPaintDefaults_DEFINED 10 | 11 | #include "SkPaint.h" 12 | 13 | /** 14 | * Any of these can be specified by the build system (or SkUserConfig.h) 15 | * to change the default values for a SkPaint. This file should not be 16 | * edited directly. 17 | */ 18 | 19 | #ifndef SkPaintDefaults_Flags 20 | #define SkPaintDefaults_Flags 0 21 | #endif 22 | 23 | #ifndef SkPaintDefaults_TextSize 24 | #define SkPaintDefaults_TextSize SkIntToScalar(12) 25 | #endif 26 | 27 | #ifndef SkPaintDefaults_Hinting 28 | #define SkPaintDefaults_Hinting SkPaint::kNormal_Hinting 29 | #endif 30 | 31 | #ifndef SkPaintDefaults_MiterLimit 32 | #define SkPaintDefaults_MiterLimit SkIntToScalar(4) 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/core/SkRefCnt.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | 9 | #include "SkRefCnt.h" 10 | #include "SkWeakRefCnt.h" 11 | 12 | SK_DEFINE_INST_COUNT(SkRefCnt) 13 | SK_DEFINE_INST_COUNT(SkWeakRefCnt) 14 | 15 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/core/SkTileGridPicture.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkTileGridPicture.h" 9 | 10 | #include "SkPictureStateTree.h" 11 | #include "SkTileGrid.h" 12 | 13 | 14 | SkTileGridPicture::SkTileGridPicture(int tileWidth, int tileHeight, int width, int height) { 15 | fTileWidth = tileWidth; 16 | fTileHeight = tileHeight; 17 | fXTileCount = (width + tileWidth - 1) / tileWidth; 18 | fYTileCount = (height + tileHeight - 1) / tileHeight; 19 | } 20 | 21 | SkBBoxHierarchy* SkTileGridPicture::createBBoxHierarchy() const { 22 | return SkNEW_ARGS(SkTileGrid, (fTileWidth, fTileHeight, fXTileCount, fYTileCount, 23 | SkTileGridNextDatum)); 24 | } 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/effects/SkBitmapSource.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 The Android Open Source Project 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkBitmapSource.h" 9 | 10 | SkBitmapSource::SkBitmapSource(const SkBitmap& bitmap) 11 | : INHERITED(0), 12 | fBitmap(bitmap) { 13 | } 14 | 15 | SkBitmapSource::SkBitmapSource(SkFlattenableReadBuffer& buffer) 16 | : INHERITED(buffer) { 17 | fBitmap.unflatten(buffer); 18 | } 19 | 20 | void SkBitmapSource::flatten(SkFlattenableWriteBuffer& buffer) const { 21 | this->INHERITED::flatten(buffer); 22 | fBitmap.flatten(buffer); 23 | } 24 | 25 | bool SkBitmapSource::onFilterImage(Proxy*, const SkBitmap&, const SkMatrix&, 26 | SkBitmap* result, SkIPoint* offset) { 27 | *result = fBitmap; 28 | return true; 29 | } 30 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/effects/SkEmbossMask.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkEmbossMask_DEFINED 11 | #define SkEmbossMask_DEFINED 12 | 13 | #include "SkEmbossMaskFilter.h" 14 | 15 | class SkEmbossMask { 16 | public: 17 | static void Emboss(SkMask* mask, const SkEmbossMaskFilter::Light&); 18 | }; 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/effects/SkPaintFlagsDrawFilter.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkPaintFlagsDrawFilter.h" 9 | #include "SkPaint.h" 10 | 11 | SkPaintFlagsDrawFilter::SkPaintFlagsDrawFilter(uint32_t clearFlags, 12 | uint32_t setFlags) { 13 | fClearFlags = SkToU16(clearFlags & SkPaint::kAllFlags); 14 | fSetFlags = SkToU16(setFlags & SkPaint::kAllFlags); 15 | } 16 | 17 | bool SkPaintFlagsDrawFilter::filter(SkPaint* paint, Type) { 18 | paint->setFlags((paint->getFlags() & ~fClearFlags) | fSetFlags); 19 | return true; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/effects/SkPixelXorXfermode.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkPixelXorXfermode.h" 11 | #include "SkColorPriv.h" 12 | #include "SkFlattenableBuffers.h" 13 | 14 | // we always return an opaque color, 'cause I don't know what to do with 15 | // the alpha-component and still return a valid premultiplied color. 16 | SkPMColor SkPixelXorXfermode::xferColor(SkPMColor src, SkPMColor dst) { 17 | SkPMColor res = src ^ dst ^ fOpColor; 18 | res |= (SK_A32_MASK << SK_A32_SHIFT); // force it to be opaque 19 | return res; 20 | } 21 | 22 | void SkPixelXorXfermode::flatten(SkFlattenableWriteBuffer& wb) const { 23 | this->INHERITED::flatten(wb); 24 | wb.writeColor(fOpColor); 25 | } 26 | 27 | SkPixelXorXfermode::SkPixelXorXfermode(SkFlattenableReadBuffer& rb) 28 | : INHERITED(rb) { 29 | fOpColor = rb.readColor(); 30 | } 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/GrAAConvexPathRenderer.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #include "GrPathRenderer.h" 10 | 11 | 12 | class GrAAConvexPathRenderer : public GrPathRenderer { 13 | public: 14 | GrAAConvexPathRenderer(); 15 | 16 | virtual bool canDrawPath(const SkPath& path, 17 | const SkStrokeRec& stroke, 18 | const GrDrawTarget* target, 19 | bool antiAlias) const SK_OVERRIDE; 20 | 21 | protected: 22 | virtual bool onDrawPath(const SkPath& path, 23 | const SkStrokeRec& stroke, 24 | GrDrawTarget* target, 25 | bool antiAlias) SK_OVERRIDE; 26 | }; 27 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/GrAddPathRenderers_default.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "GrStencilAndCoverPathRenderer.h" 11 | #include "GrAAHairLinePathRenderer.h" 12 | #include "GrAAConvexPathRenderer.h" 13 | 14 | void GrPathRenderer::AddPathRenderers(GrContext* ctx, GrPathRendererChain* chain) { 15 | if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(ctx)) { 16 | chain->addPathRenderer(pr)->unref(); 17 | } 18 | if (GrPathRenderer* pr = GrAAHairLinePathRenderer::Create(ctx)) { 19 | chain->addPathRenderer(pr)->unref(); 20 | } 21 | chain->addPathRenderer(SkNEW(GrAAConvexPathRenderer))->unref(); 22 | } 23 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/GrAddPathRenderers_none.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "GrPathRenderer.h" 11 | 12 | 13 | void GrPathRenderer::AddPathRenderers(GrContext*, 14 | GrPathRendererChain::UsageFlags, 15 | GrPathRendererChain*) {} 16 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/GrClipMaskCache.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #include "GrClipMaskCache.h" 10 | 11 | GrClipMaskCache::GrClipMaskCache() 12 | : fContext(NULL) 13 | , fStack(sizeof(GrClipStackFrame)) { 14 | // We need an initial frame to capture the clip state prior to 15 | // any pushes 16 | SkNEW_PLACEMENT(fStack.push_back(), GrClipStackFrame); 17 | } 18 | 19 | void GrClipMaskCache::push() { 20 | SkNEW_PLACEMENT(fStack.push_back(), GrClipStackFrame); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/GrGeometryBuffer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "GrGeometryBuffer.h" 9 | 10 | SK_DEFINE_INST_COUNT(GrGeometryBuffer) 11 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/GrIndexBuffer.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2010 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #ifndef GrIndexBuffer_DEFINED 12 | #define GrIndexBuffer_DEFINED 13 | 14 | #include "GrGeometryBuffer.h" 15 | 16 | class GrIndexBuffer : public GrGeometryBuffer { 17 | public: 18 | /** 19 | * Retrieves the maximum number of quads that could be rendered 20 | * from the index buffer (using kTriangles_GrPrimitiveType). 21 | * @return the maximum number of quads using full size of index buffer. 22 | */ 23 | int maxQuads() const { 24 | return this->sizeInBytes() / (sizeof(uint16_t) * 6); 25 | } 26 | protected: 27 | GrIndexBuffer(GrGpu* gpu, size_t sizeInBytes, bool dynamic) 28 | : INHERITED(gpu, sizeInBytes, dynamic) {} 29 | private: 30 | typedef GrGeometryBuffer INHERITED; 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/GrMemory.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2010 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #include 12 | #include "GrTypes.h" 13 | 14 | void* GrMalloc(size_t bytes) { 15 | void* ptr = ::malloc(bytes); 16 | if (NULL == ptr) { 17 | ::exit(-1); 18 | } 19 | return ptr; 20 | } 21 | 22 | void GrFree(void* ptr) { 23 | if (ptr) { 24 | ::free(ptr); 25 | } 26 | } 27 | 28 | 29 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/GrPath.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "GrPath.h" 9 | 10 | SK_DEFINE_INST_COUNT(GrPath) 11 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/GrPath.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #ifndef GrPath_DEFINED 10 | #define GrPath_DEFINED 11 | 12 | #include "GrResource.h" 13 | #include "GrRect.h" 14 | 15 | class GrPath : public GrResource { 16 | public: 17 | SK_DECLARE_INST_COUNT(GrPath); 18 | 19 | GrPath(GrGpu* gpu) : INHERITED(gpu) {} 20 | 21 | const GrRect& getBounds() const { return fBounds; } 22 | 23 | protected: 24 | GrRect fBounds; 25 | 26 | private: 27 | typedef GrResource INHERITED; 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/GrPathRenderer.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #include "GrPathRenderer.h" 10 | 11 | SK_DEFINE_INST_COUNT(GrPathRenderer) 12 | 13 | GrPathRenderer::GrPathRenderer() { 14 | } 15 | 16 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/GrSurface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "GrSurface.h" 9 | 10 | SK_DEFINE_INST_COUNT(GrSurface) 11 | 12 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/GrVertexBuffer.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2010 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #ifndef GrVertexBuffer_DEFINED 12 | #define GrVertexBuffer_DEFINED 13 | 14 | #include "GrGeometryBuffer.h" 15 | 16 | class GrVertexBuffer : public GrGeometryBuffer { 17 | protected: 18 | GrVertexBuffer(GrGpu* gpu, size_t sizeInBytes, bool dynamic) 19 | : INHERITED(gpu, sizeInBytes, dynamic) {} 20 | private: 21 | typedef GrGeometryBuffer INHERITED; 22 | }; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/SkGrTexturePixelRef.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2010 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #include "SkGrTexturePixelRef.h" 12 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/GrGLCreateNativeInterface_none.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "gl/GrGLInterface.h" 9 | 10 | const GrGLInterface* GrGLCreateNativeInterface() { 11 | return NULL; 12 | } 13 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/GrGLDefaultInterface_native.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "gl/GrGLInterface.h" 9 | 10 | const GrGLInterface* GrGLDefaultInterface() { 11 | return GrGLCreateNativeInterface(); 12 | } 13 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/GrGLDefaultInterface_none.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "gl/GrGLInterface.h" 9 | 10 | const GrGLInterface* GrGLDefaultInterface() { 11 | return NULL; 12 | } 13 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/GrGLUniformHandle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef GrUniformHandle_DEFINED 9 | #define GrUniformHandle_DEFINED 10 | 11 | namespace { 12 | inline int handle_to_index(GrGLUniformManager::UniformHandle h) { return ~h; } 13 | inline GrGLUniformManager::UniformHandle index_to_handle(int i) { return ~i; } 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/SkNullGLContext.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #include "gl/SkNullGLContext.h" 10 | 11 | const GrGLInterface* SkNullGLContext::createGLContext() { 12 | return GrGLCreateNullInterface(); 13 | }; 14 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/debug/GrBufferObj.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #include "GrBufferObj.h" 10 | 11 | void GrBufferObj::allocate(GrGLint size, const GrGLchar *dataPtr) { 12 | GrAlwaysAssert(size >= 0); 13 | 14 | // delete pre-existing data 15 | delete[] fDataPtr; 16 | 17 | fSize = size; 18 | fDataPtr = new GrGLchar[size]; 19 | if (dataPtr) { 20 | memcpy(fDataPtr, dataPtr, fSize); 21 | } 22 | // TODO: w/ no dataPtr the data is unitialized - this could be tracked 23 | } 24 | 25 | void GrBufferObj::deleteAction() { 26 | 27 | // buffers are automatically unmapped when deleted 28 | this->resetMapped(); 29 | 30 | this->INHERITED::deleteAction(); 31 | } 32 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/debug/GrProgramObj.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #include "GrProgramObj.h" 10 | #include "GrShaderObj.h" 11 | 12 | void GrProgramObj::AttachShader(GrShaderObj *shader) { 13 | shader->ref(); 14 | fShaders.push_back(shader); 15 | } 16 | 17 | void GrProgramObj::deleteAction() { 18 | 19 | // shaders are automatically detached from a deleted program. They will only be 20 | // deleted if they were marked for deletion by a prior call to glDeleteShader 21 | for (int i = 0; i < fShaders.count(); ++i) { 22 | fShaders[i]->unref(); 23 | } 24 | fShaders.reset(); 25 | 26 | this->INHERITED::deleteAction(); 27 | } 28 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/debug/GrShaderObj.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #include "GrShaderObj.h" 10 | 11 | void GrShaderObj::deleteAction() { 12 | 13 | this->INHERITED::deleteAction(); 14 | } 15 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/debug/GrShaderObj.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #ifndef GrShaderObj_DEFINED 10 | #define GrShaderObj_DEFINED 11 | 12 | #include "GrFakeRefObj.h" 13 | #include "../GrGLDefines.h" 14 | 15 | //////////////////////////////////////////////////////////////////////////////// 16 | class GrShaderObj : public GrFakeRefObj { 17 | GR_DEFINE_CREATOR(GrShaderObj); 18 | 19 | public: 20 | GrShaderObj() 21 | : GrFakeRefObj() 22 | , fType(GR_GL_VERTEX_SHADER) {} 23 | 24 | void setType(GrGLenum type) { fType = type; } 25 | GrGLenum getType() { return fType; } 26 | 27 | virtual void deleteAction() SK_OVERRIDE; 28 | 29 | protected: 30 | private: 31 | GrGLenum fType; // either GR_GL_VERTEX_SHADER or GR_GL_FRAGMENT_SHADER 32 | 33 | typedef GrFakeRefObj INHERITED; 34 | }; 35 | 36 | #endif // GrShaderObj_DEFINED 37 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/debug/GrTextureObj.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #include "GrTextureObj.h" 10 | 11 | void GrTextureObj::deleteAction() { 12 | 13 | this->INHERITED::deleteAction(); 14 | } 15 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/debug/GrTextureUnitObj.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #include "GrTextureUnitObj.h" 10 | #include "GrTextureObj.h" 11 | 12 | void GrTextureUnitObj::setTexture(GrTextureObj *texture) { 13 | 14 | if (fTexture) { 15 | GrAlwaysAssert(fTexture->getBound(this)); 16 | fTexture->resetBound(this); 17 | 18 | GrAlwaysAssert(!fTexture->getDeleted()); 19 | fTexture->unref(); 20 | } 21 | 22 | fTexture = texture; 23 | 24 | if (fTexture) { 25 | GrAlwaysAssert(!fTexture->getDeleted()); 26 | fTexture->ref(); 27 | 28 | GrAlwaysAssert(!fTexture->getBound(this)); 29 | fTexture->setBound(this); 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/debug/SkDebugGLContext.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #include "gl/SkDebugGLContext.h" 10 | 11 | const GrGLInterface* SkDebugGLContext::createGLContext() { 12 | return GrGLCreateDebugInterface(); 13 | }; 14 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/gpu/gl/nacl/SkNativeGLContext_nacl.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | #include "gl/SkNativeGLContext.h" 9 | 10 | SkNativeGLContext::AutoContextRestore::AutoContextRestore() { 11 | } 12 | 13 | SkNativeGLContext::AutoContextRestore::~AutoContextRestore() { 14 | } 15 | 16 | SkNativeGLContext::SkNativeGLContext() 17 | : fContext(NULL) 18 | , fDisplay(NULL) 19 | { 20 | } 21 | 22 | SkNativeGLContext::~SkNativeGLContext() { 23 | this->destroyGLContext(); 24 | } 25 | 26 | void SkNativeGLContext::destroyGLContext() { 27 | } 28 | 29 | const GrGLInterface* SkNativeGLContext::createGLContext() { 30 | return NULL; 31 | } 32 | 33 | void SkNativeGLContext::makeCurrent() const { 34 | } 35 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/image/SkDataPixelRef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkDataPixelRef_DEFINED 9 | #define SkDataPixelRef_DEFINED 10 | 11 | #include "SkPixelRef.h" 12 | 13 | class SkData; 14 | 15 | class SkDataPixelRef : public SkPixelRef { 16 | public: 17 | SkDataPixelRef(SkData* data); 18 | virtual ~SkDataPixelRef(); 19 | 20 | SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDataPixelRef) 21 | 22 | protected: 23 | virtual void* onLockPixels(SkColorTable**) SK_OVERRIDE; 24 | virtual void onUnlockPixels() SK_OVERRIDE; 25 | 26 | SkDataPixelRef(SkFlattenableReadBuffer& buffer); 27 | virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 28 | 29 | private: 30 | SkData* fData; 31 | 32 | typedef SkPixelRef INHERITED; 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/image/SkImage.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkImage_Base.h" 9 | #include "SkImagePriv.h" 10 | #include "SkBitmap.h" 11 | #include "SkCanvas.h" 12 | 13 | SK_DEFINE_INST_COUNT(SkImage) 14 | 15 | static SkImage_Base* asIB(SkImage* image) { 16 | return static_cast(image); 17 | } 18 | 19 | uint32_t SkImage::NextUniqueID() { 20 | static int32_t gUniqueID; 21 | 22 | // never return 0; 23 | uint32_t id; 24 | do { 25 | id = sk_atomic_inc(&gUniqueID) + 1; 26 | } while (0 == id); 27 | return id; 28 | } 29 | 30 | void SkImage::draw(SkCanvas* canvas, SkScalar x, SkScalar y, 31 | const SkPaint* paint) { 32 | asIB(this)->onDraw(canvas, x, y, paint); 33 | } 34 | 35 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/image/SkImage_Base.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkImage_Base_DEFINED 9 | #define SkImage_Base_DEFINED 10 | 11 | #include "SkImage.h" 12 | 13 | class SkImage_Base : public SkImage { 14 | public: 15 | SkImage_Base(int width, int height) : INHERITED(width, height) {} 16 | 17 | virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) = 0; 18 | 19 | private: 20 | typedef SkImage INHERITED; 21 | }; 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/images/SkImages.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkFlattenable.h" 9 | #include "SkImageRef_GlobalPool.h" 10 | #include "SkImages.h" 11 | 12 | void SkImages::InitializeFlattenables() { 13 | SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkImageRef_GlobalPool) 14 | } 15 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 The Android Open Source Project 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkBitmapProcState.h" 9 | 10 | void S32_opaque_D32_filter_DX_SSSE3(const SkBitmapProcState& s, 11 | const uint32_t* xy, 12 | int count, uint32_t* colors); 13 | void S32_alpha_D32_filter_DX_SSSE3(const SkBitmapProcState& s, 14 | const uint32_t* xy, 15 | int count, uint32_t* colors); 16 | void S32_opaque_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, 17 | const uint32_t* xy, 18 | int count, uint32_t* colors); 19 | void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, 20 | const uint32_t* xy, 21 | int count, uint32_t* colors); 22 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | #include "SkBitmapProcState.h" 9 | 10 | /* A platform may optionally overwrite any of these with accelerated 11 | versions. On input, these will already have valid function pointers, 12 | so a platform need only overwrite the ones it chooses, based on the 13 | current state (e.g. fBitmap, fInvMatrix, etc.) 14 | 15 | fShaderProc32 16 | fShaderProc16 17 | fMatrixProc 18 | fSampleProc32 19 | fSampleProc32 20 | */ 21 | 22 | // empty implementation just uses default supplied function pointers 23 | void SkBitmapProcState::platformProcs() {} 24 | 25 | 26 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/opts/SkBlitRect_opts_SSE2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkBlitRect_opts_SSE2_DEFINED 9 | #define SkBlitRect_opts_SSE2_DEFINED 10 | 11 | /* 12 | These functions' implementations copy sections of both 13 | SkBlitRow_opts_SSE2 and SkUtils_opts_SSE2. 14 | */ 15 | 16 | #include "SkColor.h" 17 | 18 | void ColorRect32_SSE2(SkPMColor* SK_RESTRICT dst, 19 | int width, int height, 20 | size_t rowBytes, uint32_t color); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/opts/SkUtils_opts_SSE2.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2009 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkTypes.h" 11 | 12 | void sk_memset16_SSE2(uint16_t *dst, uint16_t value, int count); 13 | void sk_memset32_SSE2(uint32_t *dst, uint32_t value, int count); 14 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/opts/SkUtils_opts_none.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2009 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkBlitRow.h" 11 | #include "SkUtils.h" 12 | 13 | SkMemset16Proc SkMemset16GetPlatformProc() { 14 | return NULL; 15 | } 16 | 17 | SkMemset32Proc SkMemset32GetPlatformProc() { 18 | return NULL; 19 | } 20 | 21 | SkBlitRow::ColorRectProc PlatformColorRectProcFactory() { 22 | return NULL; 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/ports/SkDebug_android.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkTypes.h" 11 | 12 | static const size_t kBufferSize = 256; 13 | 14 | #define LOG_TAG "skia" 15 | #include 16 | 17 | static bool gSkDebugToStdOut = false; 18 | 19 | extern "C" void AndroidSkDebugToStdOut(bool debugToStdOut) { 20 | gSkDebugToStdOut = debugToStdOut; 21 | } 22 | 23 | void SkDebugf(const char format[], ...) { 24 | va_list args; 25 | va_start(args, format); 26 | __android_log_vprint(ANDROID_LOG_DEBUG, LOG_TAG, format, args); 27 | 28 | // Print debug output to stdout as well. This is useful for command 29 | // line applications (e.g. skia_launcher) 30 | if (gSkDebugToStdOut) { 31 | vprintf(format, args); 32 | } 33 | 34 | va_end(args); 35 | } 36 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/ports/SkDebug_brew.cpp: -------------------------------------------------------------------------------- 1 | /* libs/corecg/SkDebug_brew.cpp 2 | * 3 | * Copyright 2009, The Android Open Source Project 4 | * Copyright 2009, Company 100, Inc. 5 | * 6 | * Use of this source code is governed by a BSD-style license that can be 7 | * found in the LICENSE file. 8 | */ 9 | 10 | #include "SkTypes.h" 11 | 12 | #ifdef SK_BUILD_FOR_BREW 13 | 14 | static const size_t kBufferSize = 256; 15 | 16 | #include 17 | #include 18 | 19 | void SkDebugf(const char format[], ...) { 20 | char buffer[kBufferSize + 1]; 21 | va_list args; 22 | va_start(args, format); 23 | VSNPRINTF(buffer, kBufferSize, format, args); 24 | va_end(args); 25 | DBGPRINTF(buffer); 26 | } 27 | 28 | #endif SK_BUILD_FOR_BREW 29 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/ports/SkDebug_nacl.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2012 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #include "SkTypes.h" 12 | 13 | static const size_t kBufferSize = 2048; 14 | 15 | #include 16 | #include 17 | 18 | #include "ppapi/cpp/instance.h" 19 | #include "ppapi/cpp/var.h" 20 | 21 | extern pp::Instance* gPluginInstance; 22 | 23 | namespace { 24 | static const char* kLogPrefix = "SkDebugf:"; 25 | } 26 | 27 | void SkDebugf(const char format[], ...) { 28 | if (gPluginInstance) { 29 | char buffer[kBufferSize + 1]; 30 | va_list args; 31 | va_start(args, format); 32 | sprintf(buffer, kLogPrefix); 33 | vsnprintf(buffer + strlen(kLogPrefix), kBufferSize, format, args); 34 | va_end(args); 35 | pp::Var msg = pp::Var(buffer); 36 | gPluginInstance->PostMessage(msg); 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/ports/SkDebug_stdio.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkTypes.h" 11 | 12 | static const size_t kBufferSize = 2048; 13 | 14 | #include 15 | #include 16 | 17 | void SkDebugf(const char format[], ...) { 18 | char buffer[kBufferSize + 1]; 19 | va_list args; 20 | va_start(args, format); 21 | vsnprintf(buffer, kBufferSize, format, args); 22 | va_end(args); 23 | fprintf(stderr, "%s", buffer); 24 | } 25 | 26 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/ports/SkDebug_win.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2010 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | 11 | #include "SkTypes.h" 12 | 13 | static const size_t kBufferSize = 2048; 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | void SkDebugf(const char format[], ...) { 20 | char buffer[kBufferSize + 1]; 21 | va_list args; 22 | va_start(args, format); 23 | vsnprintf(buffer, kBufferSize, format, args); 24 | va_end(args); 25 | 26 | OutputDebugStringA(buffer); 27 | printf(buffer); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/ports/SkFontHost_sandbox_none.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkFontHost.h" 9 | #include "SkTypeface.h" 10 | 11 | //static 12 | void SkFontHost::EnsureTypefaceAccessible(const SkTypeface& typeface) { 13 | //No sandbox, nothing to do. 14 | } 15 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/ports/SkMemory_mozalloc.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Google Inc. 3 | * Copyright 2012 Mozilla Foundation 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #include "SkTypes.h" 10 | 11 | #include "mozilla/mozalloc.h" 12 | #include "mozilla/mozalloc_abort.h" 13 | #include "mozilla/mozalloc_oom.h" 14 | 15 | void sk_throw() { 16 | SkDEBUGFAIL("sk_throw"); 17 | mozalloc_abort("Abort from sk_throw"); 18 | } 19 | 20 | void sk_out_of_memory(void) { 21 | SkDEBUGFAIL("sk_out_of_memory"); 22 | mozalloc_handle_oom(0); 23 | } 24 | 25 | void* sk_malloc_throw(size_t size) { 26 | return sk_malloc_flags(size, SK_MALLOC_THROW); 27 | } 28 | 29 | void* sk_realloc_throw(void* addr, size_t size) { 30 | return moz_xrealloc(addr, size); 31 | } 32 | 33 | void sk_free(void* p) { 34 | moz_free(p); 35 | } 36 | 37 | void* sk_malloc_flags(size_t size, unsigned flags) { 38 | return (flags & SK_MALLOC_THROW) ? moz_xmalloc(size) : moz_malloc(size); 39 | } 40 | 41 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/ports/SkXMLParser_empty.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 The Android Open Source Project 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkXMLParser.h" 9 | 10 | bool SkXMLParser::parse(SkStream& docStream) 11 | { 12 | return false; 13 | } 14 | 15 | bool SkXMLParser::parse(const char doc[], size_t len) 16 | { 17 | return false; 18 | } 19 | 20 | void SkXMLParser::GetNativeErrorString(int error, SkString* str) 21 | { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/sfnt/SkOTTable_loca.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkOTTable_loca_DEFINED 9 | #define SkOTTable_loca_DEFINED 10 | 11 | #include "SkEndian.h" 12 | #include "SkOTTableTypes.h" 13 | 14 | #pragma pack(push, 1) 15 | 16 | struct SkOTTableIndexToLocation { 17 | static const SK_OT_CHAR TAG0 = 'l'; 18 | static const SK_OT_CHAR TAG1 = 'o'; 19 | static const SK_OT_CHAR TAG2 = 'c'; 20 | static const SK_OT_CHAR TAG3 = 'a'; 21 | static const SK_OT_ULONG TAG = SkOTTableTAG::value; 22 | 23 | union Offsets { 24 | SK_OT_USHORT shortOffset[1]; 25 | SK_OT_ULONG longOffset[1]; 26 | } offsets; 27 | }; 28 | 29 | #pragma pack(pop) 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/sfnt/SkOTTable_maxp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkOTTable_maxp_DEFINED 9 | #define SkOTTable_maxp_DEFINED 10 | 11 | #include "SkOTTableTypes.h" 12 | #include "SkOTTable_maxp_CFF.h" 13 | #include "SkOTTable_maxp_TT.h" 14 | 15 | #pragma pack(push, 1) 16 | 17 | struct SkOTTableMaximumProfile { 18 | static const SK_OT_CHAR TAG0 = 'm'; 19 | static const SK_OT_CHAR TAG1 = 'a'; 20 | static const SK_OT_CHAR TAG2 = 'x'; 21 | static const SK_OT_CHAR TAG3 = 'p'; 22 | static const SK_OT_ULONG TAG = SkOTTableTAG::value; 23 | 24 | union Version { 25 | SK_OT_Fixed version; 26 | 27 | struct CFF : SkOTTableMaximumProfile_CFF { } cff; 28 | struct TT : SkOTTableMaximumProfile_TT { } tt; 29 | } version; 30 | }; 31 | 32 | #pragma pack(pop) 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/sfnt/SkOTTable_maxp_CFF.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkOTTable_maxp_CFF_DEFINED 9 | #define SkOTTable_maxp_CFF_DEFINED 10 | 11 | #include "SkEndian.h" 12 | #include "SkOTTableTypes.h" 13 | 14 | #pragma pack(push, 1) 15 | 16 | struct SkOTTableMaximumProfile_CFF { 17 | SK_OT_Fixed version; 18 | static const SK_OT_Fixed VERSION = SkTEndian_SwapBE32(0x00005000); 19 | 20 | SK_OT_USHORT numGlyphs; 21 | }; 22 | 23 | #pragma pack(pop) 24 | 25 | 26 | #include 27 | SK_COMPILE_ASSERT(offsetof(SkOTTableMaximumProfile_CFF, numGlyphs) == 4, SkOTTableHead_glyphDataFormat_not_at_2); 28 | SK_COMPILE_ASSERT(sizeof(SkOTTableMaximumProfile_CFF) == 6, sizeof_SkOTTableHead_not_4); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVG.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVG.h" 11 | #include 'SkSVGParser.h" 12 | 13 | SkSVG::SkSVG() { 14 | } 15 | 16 | SkSVG::~SkSVG() { 17 | } 18 | 19 | bool SkSVG::decodeStream(SkStream* stream); 20 | { 21 | size_t size = stream->read(nil, 0); 22 | SkAutoMalloc storage(size); 23 | char* data = (char*)storage.get(); 24 | size_t actual = stream->read(data, size); 25 | SkASSERT(size == actual); 26 | SkSVGParser parser(*fMaker); 27 | return parser.parse(data, actual, &fErrorCode, &fErrorLineNumber); 28 | } 29 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGCircle.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGCircle_DEFINED 11 | #define SkSVGCircle_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGCircle : public SkSVGElement { 16 | DECLARE_SVG_INFO(Circle); 17 | private: 18 | SkString f_cx; 19 | SkString f_cy; 20 | SkString f_r; 21 | typedef SkSVGElement INHERITED; 22 | }; 23 | 24 | #endif // SkSVGCircle_DEFINED 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGClipPath.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGClipPath_DEFINED 11 | #define SkSVGClipPath_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGClipPath : public SkSVGElement { 16 | DECLARE_SVG_INFO(ClipPath); 17 | virtual bool isDef(); 18 | virtual bool isNotDef(); 19 | private: 20 | typedef SkSVGElement INHERITED; 21 | }; 22 | 23 | #endif // SkSVGClipPath_DEFINED 24 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGDefs.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVGDefs.h" 11 | 12 | DEFINE_SVG_NO_INFO(Defs) 13 | 14 | bool SkSVGDefs::isDef() { 15 | return true; 16 | } 17 | 18 | bool SkSVGDefs::isNotDef() { 19 | return false; 20 | } 21 | 22 | void SkSVGDefs::translate(SkSVGParser& parser, bool defState) { 23 | INHERITED::translate(parser, defState); 24 | } 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGDefs.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGDefs_DEFINED 11 | #define SkSVGDefs_DEFINED 12 | 13 | #include "SkSVGGroup.h" 14 | 15 | class SkSVGDefs : public SkSVGGroup { 16 | DECLARE_SVG_INFO(Defs); 17 | virtual bool isDef(); 18 | virtual bool isNotDef(); 19 | private: 20 | typedef SkSVGGroup INHERITED; 21 | }; 22 | 23 | #endif // SkSVGDefs_DEFINED 24 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGEllipse.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGEllipse_DEFINED 11 | #define SkSVGEllipse_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGEllipse : public SkSVGElement { 16 | DECLARE_SVG_INFO(Ellipse); 17 | private: 18 | SkString f_cx; 19 | SkString f_cy; 20 | SkString f_rx; 21 | SkString f_ry; 22 | typedef SkSVGElement INHERITED; 23 | }; 24 | 25 | #endif // SkSVGEllipse_DEFINED 26 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGFeColorMatrix.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVGFeColorMatrix.h" 11 | #include "SkSVGParser.h" 12 | 13 | const SkSVGAttribute SkSVGFeColorMatrix::gAttributes[] = { 14 | SVG_LITERAL_ATTRIBUTE(color-interpolation-filters, f_color_interpolation_filters), 15 | SVG_ATTRIBUTE(result), 16 | SVG_ATTRIBUTE(type), 17 | SVG_ATTRIBUTE(values) 18 | }; 19 | 20 | DEFINE_SVG_INFO(FeColorMatrix) 21 | 22 | void SkSVGFeColorMatrix::translate(SkSVGParser& parser, bool defState) { 23 | INHERITED::translate(parser, defState); 24 | } 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGFeColorMatrix.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGFeColorMatrix_DEFINED 11 | #define SkSVGFeColorMatrix_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGFeColorMatrix : public SkSVGElement { 16 | DECLARE_SVG_INFO(FeColorMatrix); 17 | protected: 18 | SkString f_color_interpolation_filters; 19 | SkString f_result; 20 | SkString f_type; 21 | SkString f_values; 22 | private: 23 | typedef SkSVGElement INHERITED; 24 | }; 25 | 26 | #endif // SkSVGFeColorMatrix_DEFINED 27 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGFilter.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVGFilter.h" 11 | #include "SkSVGParser.h" 12 | 13 | const SkSVGAttribute SkSVGFilter::gAttributes[] = { 14 | SVG_ATTRIBUTE(filterUnits), 15 | SVG_ATTRIBUTE(height), 16 | SVG_ATTRIBUTE(width), 17 | SVG_ATTRIBUTE(x), 18 | SVG_ATTRIBUTE(y) 19 | }; 20 | 21 | DEFINE_SVG_INFO(Filter) 22 | 23 | void SkSVGFilter::translate(SkSVGParser& parser, bool defState) { 24 | // INHERITED::translate(parser, defState); 25 | } 26 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGFilter.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGFilter_DEFINED 11 | #define SkSVGFilter_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGFilter : public SkSVGElement { 16 | DECLARE_SVG_INFO(Filter); 17 | protected: 18 | SkString f_filterUnits; 19 | SkString f_height; 20 | SkString f_width; 21 | SkString f_x; 22 | SkString f_y; 23 | private: 24 | typedef SkSVGElement INHERITED; 25 | }; 26 | 27 | #endif // SkSVGFilter_DEFINEDRITED; 28 | 29 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGG.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVGG.h" 11 | 12 | DEFINE_SVG_NO_INFO(G) 13 | 14 | void SkSVGG::translate(SkSVGParser& parser, bool defState) { 15 | INHERITED::translate(parser, defState); 16 | } 17 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGG.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGG_DEFINED 11 | #define SkSVGG_DEFINED 12 | 13 | #include "SkSVGGroup.h" 14 | 15 | class SkSVGG : public SkSVGGroup { 16 | DECLARE_SVG_INFO(G); 17 | private: 18 | typedef SkSVGGroup INHERITED; 19 | }; 20 | 21 | #endif // SkSVGG_DEFINED 22 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGGradient.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGGradient_DEFINED 11 | #define SkSVGGradient_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGGradient : public SkSVGElement { 16 | public: 17 | SkSVGGradient(); 18 | virtual SkSVGElement* getGradient(); 19 | virtual bool isDef(); 20 | virtual bool isNotDef(); 21 | virtual void write(SkSVGParser& , SkString& color); 22 | protected: 23 | void translate(SkSVGParser& , bool defState); 24 | void translateGradientUnits(SkString& units); 25 | private: 26 | typedef SkSVGElement INHERITED; 27 | }; 28 | 29 | #endif // SkSVGGradient_DEFINED 30 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGGroup.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGGroup_DEFINED 11 | #define SkSVGGroup_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGGroup : public SkSVGElement { 16 | public: 17 | SkSVGGroup(); 18 | virtual SkSVGElement* getGradient(); 19 | virtual bool isDef(); 20 | virtual bool isFlushable(); 21 | virtual bool isGroup(); 22 | virtual bool isNotDef(); 23 | void translate(SkSVGParser& , bool defState); 24 | private: 25 | typedef SkSVGElement INHERITED; 26 | }; 27 | 28 | #endif // SkSVGGroup_DEFINED 29 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGImage.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGImage_DEFINED 11 | #define SkSVGImage_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGImage : public SkSVGElement { 16 | public: 17 | DECLARE_SVG_INFO(Image); 18 | private: 19 | void translateImage(SkSVGParser& parser); 20 | SkString f_height; 21 | SkString f_width; 22 | SkString f_x; 23 | SkString f_xlink_href; 24 | SkString f_y; 25 | typedef SkSVGElement INHERITED; 26 | }; 27 | 28 | #endif // SkSVGImage_DEFINED 29 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGLine.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVGLine.h" 11 | #include "SkSVGParser.h" 12 | 13 | const SkSVGAttribute SkSVGLine::gAttributes[] = { 14 | SVG_ATTRIBUTE(x1), 15 | SVG_ATTRIBUTE(x2), 16 | SVG_ATTRIBUTE(y1), 17 | SVG_ATTRIBUTE(y2) 18 | }; 19 | 20 | DEFINE_SVG_INFO(Line) 21 | 22 | void SkSVGLine::translate(SkSVGParser& parser, bool defState) { 23 | parser._startElement("line"); 24 | INHERITED::translate(parser, defState); 25 | SVG_ADD_ATTRIBUTE(x1); 26 | SVG_ADD_ATTRIBUTE(y1); 27 | SVG_ADD_ATTRIBUTE(x2); 28 | SVG_ADD_ATTRIBUTE(y2); 29 | parser._endElement(); 30 | } 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGLine.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGLine_DEFINED 11 | #define SkSVGLine_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGLine : public SkSVGElement { 16 | DECLARE_SVG_INFO(Line); 17 | private: 18 | SkString f_x1; 19 | SkString f_x2; 20 | SkString f_y1; 21 | SkString f_y2; 22 | typedef SkSVGElement INHERITED; 23 | }; 24 | 25 | #endif // SkSVGLine_DEFINED 26 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGLinearGradient.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGLinearGradient_DEFINED 11 | #define SkSVGLinearGradient_DEFINED 12 | 13 | #include "SkSVGGradient.h" 14 | 15 | class SkSVGLinearGradient : public SkSVGGradient { 16 | DECLARE_SVG_INFO(LinearGradient); 17 | private: 18 | SkString f_gradientTransform; 19 | SkString f_gradientUnits; 20 | SkString f_x1; 21 | SkString f_x2; 22 | SkString f_y1; 23 | SkString f_y2; 24 | SkString fMatrixID; 25 | typedef SkSVGGradient INHERITED; 26 | }; 27 | 28 | #endif // SkSVGLinearGradient_DEFINED 29 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGMask.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVGMask.h" 11 | #include "SkSVGParser.h" 12 | 13 | const SkSVGAttribute SkSVGMask::gAttributes[] = { 14 | SVG_ATTRIBUTE(height), 15 | SVG_ATTRIBUTE(maskUnits), 16 | SVG_ATTRIBUTE(width), 17 | SVG_ATTRIBUTE(x), 18 | SVG_ATTRIBUTE(y) 19 | }; 20 | 21 | DEFINE_SVG_INFO(Mask) 22 | 23 | bool SkSVGMask::isDef() { 24 | return false; 25 | } 26 | 27 | bool SkSVGMask::isNotDef() { 28 | return false; 29 | } 30 | 31 | void SkSVGMask::translate(SkSVGParser& parser, bool defState) { 32 | INHERITED::translate(parser, defState); 33 | } 34 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGMask.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGMask_DEFINED 11 | #define SkSVGMask_DEFINED 12 | 13 | #include "SkSVGGroup.h" 14 | 15 | class SkSVGMask : public SkSVGGroup { 16 | DECLARE_SVG_INFO(Mask); 17 | virtual bool isDef(); 18 | virtual bool isNotDef(); 19 | protected: 20 | SkString f_height; 21 | SkString f_maskUnits; 22 | SkString f_width; 23 | SkString f_x; 24 | SkString f_y; 25 | private: 26 | typedef SkSVGGroup INHERITED; 27 | }; 28 | 29 | #endif // SkSVGMask_DEFINED 30 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGMetadata.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVGMetadata.h" 11 | #include "SkSVGParser.h" 12 | 13 | DEFINE_SVG_NO_INFO(Metadata) 14 | 15 | bool SkSVGMetadata::isDef() { 16 | return false; 17 | } 18 | 19 | bool SkSVGMetadata::isNotDef() { 20 | return false; 21 | } 22 | 23 | void SkSVGMetadata::translate(SkSVGParser& parser, bool defState) { 24 | } 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGMetadata.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGMetadata_DEFINED 11 | #define SkSVGMetadata_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGMetadata : public SkSVGElement { 16 | DECLARE_SVG_INFO(Metadata); 17 | virtual bool isDef(); 18 | virtual bool isNotDef(); 19 | private: 20 | typedef SkSVGElement INHERITED; 21 | }; 22 | 23 | #endif // SkSVGMetadata_DEFINED 24 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGPath.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGPath_DEFINED 11 | #define SkSVGPath_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGPath : public SkSVGElement { 16 | DECLARE_SVG_INFO(Path); 17 | private: 18 | SkString f_d; 19 | typedef SkSVGElement INHERITED; 20 | }; 21 | 22 | #endif // SkSVGPath_DEFINED 23 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGPolygon.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGPolygon_DEFINED 11 | #define SkSVGPolygon_DEFINED 12 | 13 | #include "SkSVGPolyline.h" 14 | 15 | class SkSVGPolygon : public SkSVGPolyline { 16 | DECLARE_SVG_INFO(Polygon); 17 | virtual void addAttribute(SkSVGParser& , int attrIndex, 18 | const char* attrValue, size_t attrLength); 19 | private: 20 | typedef SkSVGPolyline INHERITED; 21 | }; 22 | 23 | #endif // SkSVGPolygon_DEFINED 24 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGPolyline.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGPolyline_DEFINED 11 | #define SkSVGPolyline_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | #include "SkString.h" 15 | 16 | class SkSVGPolyline : public SkSVGElement { 17 | DECLARE_SVG_INFO(Polyline); 18 | virtual void addAttribute(SkSVGParser& , int attrIndex, 19 | const char* attrValue, size_t attrLength); 20 | protected: 21 | SkString f_clipRule; 22 | SkString f_fillRule; 23 | SkString f_points; 24 | typedef SkSVGElement INHERITED; 25 | }; 26 | 27 | #endif // SkSVGPolyline_DEFINED 28 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGRadialGradient.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGRadialGradient_DEFINED 11 | #define SkSVGRadialGradient_DEFINED 12 | 13 | #include "SkSVGGradient.h" 14 | 15 | class SkSVGRadialGradient : public SkSVGGradient { 16 | DECLARE_SVG_INFO(RadialGradient); 17 | protected: 18 | SkString f_cx; 19 | SkString f_cy; 20 | SkString f_fx; 21 | SkString f_fy; 22 | SkString f_gradientTransform; 23 | SkString f_gradientUnits; 24 | SkString f_r; 25 | SkString fMatrixID; 26 | private: 27 | typedef SkSVGGradient INHERITED; 28 | }; 29 | 30 | #endif // SkSVGRadialGradient_DEFINED 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGRect.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVGRect.h" 11 | #include "SkSVGParser.h" 12 | 13 | const SkSVGAttribute SkSVGRect::gAttributes[] = { 14 | SVG_ATTRIBUTE(height), 15 | SVG_ATTRIBUTE(width), 16 | SVG_ATTRIBUTE(x), 17 | SVG_ATTRIBUTE(y) 18 | }; 19 | 20 | DEFINE_SVG_INFO(Rect) 21 | 22 | SkSVGRect::SkSVGRect() { 23 | f_x.set("0"); 24 | f_y.set("0"); 25 | } 26 | 27 | void SkSVGRect::translate(SkSVGParser& parser, bool defState) { 28 | parser._startElement("rect"); 29 | INHERITED::translate(parser, defState); 30 | SVG_ADD_ATTRIBUTE_ALIAS(left, x); 31 | SVG_ADD_ATTRIBUTE_ALIAS(top, y); 32 | SVG_ADD_ATTRIBUTE(width); 33 | SVG_ADD_ATTRIBUTE(height); 34 | parser._endElement(); 35 | } 36 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGRect.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGRect_DEFINED 11 | #define SkSVGRect_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGRect : public SkSVGElement { 16 | DECLARE_SVG_INFO(Rect); 17 | SkSVGRect(); 18 | private: 19 | SkString f_height; 20 | SkString f_width; 21 | SkString f_x; 22 | SkString f_y; 23 | typedef SkSVGElement INHERITED; 24 | }; 25 | 26 | #endif // SkSVGRect_DEFINED 27 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGSVG.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGSVG_DEFINED 11 | #define SkSVGSVG_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGSVG : public SkSVGElement { 16 | DECLARE_SVG_INFO(SVG); 17 | virtual bool isFlushable(); 18 | private: 19 | SkString f_enable_background; 20 | SkString f_height; 21 | SkString f_overflow; 22 | SkString f_width; 23 | SkString f_version; 24 | SkString f_viewBox; 25 | SkString f_x; 26 | SkString f_xml_space; 27 | SkString f_xmlns; 28 | SkString f_xml_xlink; 29 | SkString f_y; 30 | 31 | typedef SkSVGElement INHERITED; 32 | }; 33 | 34 | #endif // SkSVGSVG_DEFINED 35 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGStop.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVGStop.h" 11 | #include "SkSVGParser.h" 12 | 13 | const SkSVGAttribute SkSVGStop::gAttributes[] = { 14 | SVG_ATTRIBUTE(offset) 15 | }; 16 | 17 | DEFINE_SVG_INFO(Stop) 18 | 19 | void SkSVGStop::translate(SkSVGParser& parser, bool defState) { 20 | parser._startElement("color"); 21 | INHERITED::translate(parser, defState); 22 | parser._addAttribute("color", parser.getPaintLast(SkSVGPaint::kStopColor)); 23 | parser._endElement(); 24 | } 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGStop.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGStop_DEFINED 11 | #define SkSVGStop_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGStop : public SkSVGElement { 16 | DECLARE_SVG_INFO(Stop); 17 | private: 18 | SkString f_offset; 19 | friend class SkSVGGradient; 20 | typedef SkSVGElement INHERITED; 21 | }; 22 | 23 | #endif // SkSVGStop_DEFINED 24 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGSymbol.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVGSymbol.h" 11 | #include "SkSVGParser.h" 12 | 13 | const SkSVGAttribute SkSVGSymbol::gAttributes[] = { 14 | SVG_ATTRIBUTE(viewBox) 15 | }; 16 | 17 | DEFINE_SVG_INFO(Symbol) 18 | 19 | void SkSVGSymbol::translate(SkSVGParser& parser, bool defState) { 20 | INHERITED::translate(parser, defState); 21 | // !!! children need to be written into document 22 | } 23 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGSymbol.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGSymbol_DEFINED 11 | #define SkSVGSymbol_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGSymbol : public SkSVGElement { 16 | DECLARE_SVG_INFO(Symbol); 17 | private: 18 | SkString f_viewBox; 19 | typedef SkSVGElement INHERITED; 20 | }; 21 | 22 | #endif // SkSVGSymbol_DEFINED 23 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGText.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVGText.h" 11 | #include "SkSVGParser.h" 12 | 13 | const SkSVGAttribute SkSVGText::gAttributes[] = { 14 | SVG_ATTRIBUTE(x), 15 | SVG_ATTRIBUTE(y) 16 | }; 17 | 18 | DEFINE_SVG_INFO(Text) 19 | 20 | void SkSVGText::translate(SkSVGParser& parser, bool defState) { 21 | parser._startElement("text"); 22 | INHERITED::translate(parser, defState); 23 | SVG_ADD_ATTRIBUTE(x); 24 | SVG_ADD_ATTRIBUTE(y); 25 | SVG_ADD_ATTRIBUTE(text); 26 | parser._endElement(); 27 | } 28 | 29 | 30 | const SkSVGAttribute SkSVGTspan::gAttributes[] = { 31 | SVG_ATTRIBUTE(x), 32 | SVG_ATTRIBUTE(y) 33 | }; 34 | 35 | DEFINE_SVG_INFO(Tspan) 36 | 37 | void SkSVGTspan::translate(SkSVGParser& parser, bool defState) { 38 | INHERITED::translate(parser, defState); 39 | } 40 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGText.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGText_DEFINED 11 | #define SkSVGText_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGText : public SkSVGElement { 16 | DECLARE_SVG_INFO(Text); 17 | protected: 18 | SkString f_x; 19 | SkString f_y; 20 | SkString f_text; // not an attribute 21 | private: 22 | typedef SkSVGElement INHERITED; 23 | friend class SkSVGParser; 24 | }; 25 | 26 | class SkSVGTspan : public SkSVGText { 27 | DECLARE_SVG_INFO(Tspan); 28 | private: 29 | typedef SkSVGText INHERITED; 30 | }; 31 | 32 | #endif // SkSVGText_DEFINED 33 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGUse.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #include "SkSVGUse.h" 11 | #include "SkSVGParser.h" 12 | 13 | const SkSVGAttribute SkSVGUse::gAttributes[] = { 14 | SVG_ATTRIBUTE(height), 15 | SVG_ATTRIBUTE(width), 16 | SVG_ATTRIBUTE(x), 17 | SVG_LITERAL_ATTRIBUTE(xlink:href, f_xlink_href), 18 | SVG_ATTRIBUTE(y) 19 | }; 20 | 21 | DEFINE_SVG_INFO(Use) 22 | 23 | void SkSVGUse::translate(SkSVGParser& parser, bool defState) { 24 | INHERITED::translate(parser, defState); 25 | parser._startElement("add"); 26 | const char* start = strchr(f_xlink_href.c_str(), '#') + 1; 27 | SkASSERT(start); 28 | parser._addAttributeLen("use", start, strlen(start) - 1); 29 | parser._endElement(); // clip 30 | } 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/svg/SkSVGUse.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkSVGUse_DEFINED 11 | #define SkSVGUse_DEFINED 12 | 13 | #include "SkSVGElements.h" 14 | 15 | class SkSVGUse : public SkSVGElement { 16 | DECLARE_SVG_INFO(Use); 17 | protected: 18 | SkString f_height; 19 | SkString f_width; 20 | SkString f_x; 21 | SkString f_xlink_href; 22 | SkString f_y; 23 | private: 24 | typedef SkSVGElement INHERITED; 25 | friend class SkSVGClipPath; 26 | }; 27 | 28 | #endif // SkSVGUse_DEFINED 29 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/utils/SkCityHash.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | /** 9 | * Pass any calls through to the CityHash library. 10 | * This is the only source file that accesses the CityHash code directly. 11 | */ 12 | 13 | #include "SkCityHash.h" 14 | #include "SkTypes.h" 15 | #include "city.h" 16 | 17 | uint32_t SkCityHash::Compute32(const char *data, size_t size) { 18 | return CityHash32(data, size); 19 | } 20 | 21 | uint64_t SkCityHash::Compute64(const char *data, size_t size) { 22 | return CityHash64(data, size); 23 | } 24 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/utils/SkCountdown.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkCountdown.h" 9 | #include "SkThread.h" 10 | 11 | SkCountdown::SkCountdown(int32_t count) 12 | : fCount(count) {} 13 | 14 | void SkCountdown::reset(int32_t count) { 15 | fCount = count; 16 | } 17 | 18 | void SkCountdown::run() { 19 | if (sk_atomic_dec(&fCount) == 1) { 20 | fReady.lock(); 21 | fReady.signal(); 22 | fReady.unlock(); 23 | } 24 | } 25 | 26 | void SkCountdown::wait() { 27 | fReady.lock(); 28 | while (fCount > 0) { 29 | fReady.wait(); 30 | } 31 | fReady.unlock(); 32 | } 33 | 34 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/utils/SkDebugTrace.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #ifndef SkUserTrace_DEFINED 10 | #define SkUserTrace_DEFINED 11 | 12 | /* Sample implementation of SkUserTrace that routes all of the 13 | trace macros to debug output stream. 14 | To use this, redefine SK_USER_TRACE_INCLUDE_FILE in 15 | include/config/SkUserConfig.h to point to this file 16 | */ 17 | #define SK_TRACE_EVENT0(event) \ 18 | SkDebugf("Trace: %s\n", event) 19 | #define SK_TRACE_EVENT1(event, name1, value1) \ 20 | SkDebugf("Trace: %s (%s=%s)\n", event, name1, value1) 21 | #define SK_TRACE_EVENT2(event, name1, value1, name2, value2) \ 22 | SkDebugf("Trace: %s (%s=%s, %s=%s)\n", event, name1, value1, name2, value2) 23 | 24 | #endif 25 | 26 | 27 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/utils/SkNullCanvas.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkNullCanvas.h" 9 | 10 | #include "SkCanvas.h" 11 | #include "SkNWayCanvas.h" 12 | 13 | 14 | SkCanvas* SkCreateNullCanvas() { 15 | // An N-Way canvas forwards calls to N canvas's. When N == 0 it's 16 | // effectively a null canvas. 17 | return SkNEW_ARGS(SkNWayCanvas, (0,0)); 18 | } 19 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/utils/SkThreadUtils_pthread_mach.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkThreadUtils.h" 9 | #include "SkThreadUtils_pthread.h" 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | bool SkThread::setProcessorAffinity(unsigned int processor) { 16 | SkThread_PThreadData* pthreadData = static_cast(fData); 17 | if (!pthreadData->fValidPThread) { 18 | return false; 19 | } 20 | 21 | mach_port_t tid = pthread_mach_thread_np(pthreadData->fPThread); 22 | 23 | thread_affinity_policy_data_t policy; 24 | policy.affinity_tag = processor; 25 | 26 | return 0 == thread_policy_set(tid, 27 | THREAD_AFFINITY_POLICY, 28 | (thread_policy_t) &policy, 29 | THREAD_AFFINITY_POLICY_COUNT); 30 | } 31 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/utils/SkThreadUtils_pthread_other.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #include "SkThreadUtils.h" 9 | 10 | bool SkThread::setProcessorAffinity(unsigned int processor) { 11 | return false; 12 | } 13 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/utils/SkThreadUtils_win.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | #ifndef SkThreadUtils_WinData_DEFINED 9 | #define SkThreadUtils_WinData_DEFINED 10 | 11 | #include "SkTypes.h" 12 | 13 | #include "SkThreadUtils.h" 14 | 15 | class SkThread_WinData : SkNoncopyable { 16 | public: 17 | SkThread_WinData(SkThread::entryPointProc entryPoint, void* data); 18 | ~SkThread_WinData(); 19 | HANDLE fHandle; 20 | HANDLE fCancelEvent; 21 | 22 | LPVOID fParam; 23 | DWORD fThreadId; 24 | SkThread::entryPointProc fEntryPoint; 25 | bool fStarted; 26 | }; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/utils/cityhash/README: -------------------------------------------------------------------------------- 1 | This directory contains files needed to build third_party/externals/cityhash 2 | (such as the config.h file that would normally be created by autoconf) 3 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/utils/cityhash/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | 8 | /** 9 | * Converts from Skia build flags to the macro definitions cityhash normally 10 | * gets from autoconf. 11 | */ 12 | 13 | #include "SkTypes.h" 14 | 15 | #ifdef SK_CPU_BENDIAN 16 | #define WORDS_BIGENDIAN 1 17 | #endif 18 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/utils/win/SkAutoCoInitialize.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #define WIN32_LEAN_AND_MEAN 11 | #include 12 | #include 13 | #include "SkAutoCoInitialize.h" 14 | 15 | SkAutoCoInitialize::SkAutoCoInitialize() : 16 | fHR( 17 | CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE) 18 | ) 19 | { } 20 | 21 | SkAutoCoInitialize::~SkAutoCoInitialize() { 22 | if (SUCCEEDED(this->fHR)) { 23 | CoUninitialize(); 24 | } 25 | } 26 | 27 | bool SkAutoCoInitialize::succeeded() { 28 | return SUCCEEDED(this->fHR) || RPC_E_CHANGED_MODE == this->fHR; 29 | } 30 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/views/SkBGViewArtist.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | #include "SkBGViewArtist.h" 9 | #include "SkCanvas.h" 10 | #include "SkParsePaint.h" 11 | 12 | SkBGViewArtist::SkBGViewArtist(SkColor c) 13 | { 14 | fPaint.setColor(c); 15 | } 16 | 17 | SkBGViewArtist::~SkBGViewArtist() 18 | { 19 | } 20 | 21 | void SkBGViewArtist::onDraw(SkView*, SkCanvas* canvas) 22 | { 23 | // only works for views that are clipped their bounds. 24 | canvas->drawPaint(fPaint); 25 | } 26 | 27 | void SkBGViewArtist::onInflate(const SkDOM& dom, const SkDOM::Node* node) 28 | { 29 | SkPaint_Inflate(&fPaint, dom, node); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/views/SkTagList.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkTagList_DEFINED 11 | #define SkTagList_DEFINED 12 | 13 | #include "SkTypes.h" 14 | 15 | enum SkTagListEnum { 16 | kListeners_SkTagList, 17 | kViewLayout_SkTagList, 18 | kViewArtist_SkTagList, 19 | 20 | kSkTagListCount 21 | }; 22 | 23 | struct SkTagList { 24 | SkTagList* fNext; 25 | uint16_t fExtra16; 26 | uint8_t fExtra8; 27 | uint8_t fTag; 28 | 29 | SkTagList(U8CPU tag) : fTag(SkToU8(tag)) 30 | { 31 | SkASSERT(tag < kSkTagListCount); 32 | fNext = NULL; 33 | fExtra16 = 0; 34 | fExtra8 = 0; 35 | } 36 | virtual ~SkTagList(); 37 | 38 | static SkTagList* Find(SkTagList* head, U8CPU tag); 39 | static void DeleteTag(SkTagList** headptr, U8CPU tag); 40 | static void DeleteAll(SkTagList* head); 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/views/mac/SampleAppDelegate.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #import 11 | #import "SkSampleNSView.h" 12 | #import "SkOptionsTableView.h" 13 | @interface SampleAppDelegate : NSObject { 14 | NSWindow* fWindow; 15 | SkSampleNSView* fView; 16 | SkOptionsTableView* fOptions; 17 | } 18 | 19 | @property (assign) IBOutlet NSWindow* fWindow; 20 | @property (assign) IBOutlet SkSampleNSView* fView; 21 | @property (assign) IBOutlet SkOptionsTableView* fOptions; 22 | 23 | - (IBAction)toiPadSize:(id)sender; 24 | @end 25 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/views/mac/SampleAppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "SampleAppDelegate.h" 2 | @implementation SampleAppDelegate 3 | @synthesize fWindow, fView, fOptions; 4 | 5 | -(void) applicationDidFinishLaunching:(NSNotification *)aNotification { 6 | //Load specified skia views after launching 7 | fView.fOptionsDelegate = fOptions; 8 | [fWindow setAcceptsMouseMovedEvents:YES]; 9 | [fOptions registerMenus:fView.fWind->getMenus()]; 10 | } 11 | 12 | - (IBAction)toiPadSize:(id)sender { 13 | NSRect frame = NSMakeRect(fWindow.frame.origin.x, fWindow.frame.origin.y, 768, 1024); 14 | [fWindow setFrame:frame display:YES animate:YES]; 15 | } 16 | @end 17 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/views/mac/SkEventNotifier.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Google Inc. 3 | * 4 | * Use of this source code is governed by a BSD-style license that can be 5 | * found in the LICENSE file. 6 | */ 7 | #import 8 | 9 | @interface SkEventNotifier : NSObject 10 | - (void)receiveSkEvent:(NSNotification*)notification; 11 | + (void)postTimedSkEvent:(NSTimeInterval)ti; 12 | + (void)timerFireMethod:(NSTimer*)theTimer; 13 | @end 14 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/views/mac/SkSampleNSView.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #import "SkNSView.h" 10 | @interface SkSampleNSView : SkNSView 11 | - (id)initWithDefaults; 12 | @end 13 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/views/mac/SkSampleNSView.mm: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #import "SkSampleNSView.h" 10 | #include "SampleApp.h" 11 | #include 12 | @implementation SkSampleNSView 13 | 14 | - (id)initWithDefaults { 15 | if ((self = [super initWithDefaults])) { 16 | fWind = new SampleWindow(self, *_NSGetArgc(), *_NSGetArgv(), NULL); 17 | } 18 | return self; 19 | } 20 | 21 | - (void)dealloc { 22 | delete fWind; 23 | [super dealloc]; 24 | } 25 | 26 | - (void)swipeWithEvent:(NSEvent *)event { 27 | CGFloat x = [event deltaX]; 28 | if (x < 0) 29 | ((SampleWindow*)fWind)->previousSample(); 30 | else if (x > 0) 31 | ((SampleWindow*)fWind)->nextSample(); 32 | else 33 | ((SampleWindow*)fWind)->showOverview(); 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/views/mac/SkTextFieldCell.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #import 11 | //A text field cell that has vertically centered text 12 | @interface SkTextFieldCell : NSTextFieldCell { 13 | BOOL selectingOrEditing; 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/views/mac/skia_mac.mm: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2011 Google Inc. 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | #import 10 | #include "SkApplication.h" 11 | 12 | int main(int argc, char *argv[]) { 13 | signal(SIGPIPE, SIG_IGN); 14 | NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 15 | application_init(); 16 | int retVal = NSApplicationMain(argc, (const char **)argv); 17 | application_term(); 18 | [pool release]; 19 | return retVal; 20 | } 21 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/views/views_files.mk: -------------------------------------------------------------------------------- 1 | SOURCE := \ 2 | SkEvent.cpp \ 3 | SkEventSink.cpp \ 4 | SkOSMenu.cpp \ 5 | SkTagList.cpp \ 6 | SkView.cpp \ 7 | SkViewPriv.cpp \ 8 | SkWindow.cpp \ 9 | SkTouchGesture.cpp 10 | # SkBGViewArtist.cpp \ 11 | SkMetaData.cpp \ 12 | SkListView.cpp \ 13 | SkListWidget.cpp \ 14 | SkParsePaint.cpp \ 15 | SkProgressBarView.cpp \ 16 | SkProgressView.cpp \ 17 | SkScrollBarView.cpp \ 18 | SkStackViewLayout.cpp \ 19 | SkStaticTextView.cpp \ 20 | SkTextBox.cpp \ 21 | SkViewInflate.cpp \ 22 | SkWidget.cpp \ 23 | SkWidgetViews.cpp \ 24 | SkWidgets.cpp \ 25 | # SkBorderView.cpp \ 26 | # SkImageView.cpp \ 27 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/xml/SkBML_Verbs.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright 2006 The Android Open Source Project 4 | * 5 | * Use of this source code is governed by a BSD-style license that can be 6 | * found in the LICENSE file. 7 | */ 8 | 9 | 10 | #ifndef SkBML_Verbs_DEFINED 11 | #define SkBML_Verbs_DEFINED 12 | 13 | enum Verbs { 14 | kStartElem_Value_Verb, 15 | kStartElem_Index_Verb, 16 | kEndElem_Verb, 17 | kAttr_Value_Value_Verb, 18 | kAttr_Value_Index_Verb, 19 | kAttr_Index_Value_Verb, 20 | kAttr_Index_Index_Verb, 21 | 22 | kVerbCount 23 | }; 24 | 25 | #endif // SkBML_Verbs_DEFINED 26 | -------------------------------------------------------------------------------- /ui/third_party/skia/src/xml/xml_files.mk: -------------------------------------------------------------------------------- 1 | SOURCE := \ 2 | SkDOM.cpp \ 3 | SkXMLParser.cpp 4 | -------------------------------------------------------------------------------- /ui/third_party/skia/third_party/externals/cityhash/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | SUBDIRS = src 3 | 4 | dist_doc_DATA = README NEWS COPYING 5 | -------------------------------------------------------------------------------- /ui/third_party/skia/third_party/externals/cityhash/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # Generated from ltversion.in. 11 | 12 | # serial 3017 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.2.6b]) 16 | m4_define([LT_PACKAGE_REVISION], [1.3017]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.2.6b' 20 | macro_revision='1.3017' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /ui/third_party/skia/third_party/externals/cityhash/src/Makefile.am: -------------------------------------------------------------------------------- 1 | # library 2 | lib_LTLIBRARIES = libcityhash.la 3 | libcityhash_la_SOURCES = city.cc 4 | if SSE42 5 | include_HEADERS = city.h citycrc.h 6 | else 7 | include_HEADERS = city.h 8 | endif 9 | 10 | # test 11 | cityhash_unittest_SOURCES = city-test.cc 12 | cityhash_unittest_LDADD = libcityhash.la 13 | TESTS = cityhash_unittest 14 | noinst_PROGRAMS = $(TESTS) 15 | -------------------------------------------------------------------------------- /ui/third_party/skia/third_party/externals/libjpeg/README.chromium: -------------------------------------------------------------------------------- 1 | Name: libjpeg 2 | URL: http://www.ijg.org/ 3 | Version: 6b 4 | 5 | Description: 6 | This contains a copy of libjpeg-6b. 7 | 8 | The project files does not incldue from the distribution: 9 | jidctred.c : downsampling 10 | jdtrans.c : decoder transcoder 11 | 12 | Also not included are files obviously not needed: 13 | jmemdos.c 14 | jmemname.c 15 | along with all of the frontend files for doing utility programs. 16 | 17 | We added a new file jpeglibmangler.h and included it from jpeglib.h that changes 18 | the names of all externally visible functions to chromium_* so that we can avoid 19 | conflicts that arise when system libraries attempt to use our libjpeg. 20 | -------------------------------------------------------------------------------- /ui/third_party/skia/third_party/externals/libjpeg/jversion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jversion.h 3 | * 4 | * Copyright (C) 1991-1998, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains software version identification. 9 | */ 10 | 11 | 12 | #define JVERSION "6b 27-Mar-1998" 13 | 14 | #define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" 15 | -------------------------------------------------------------------------------- /ui/third_party/zlib/src/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /ui/ui.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luheyun/KUI/dbd43c9cc865000224a751c2efa0153784626df3/ui/ui.suo --------------------------------------------------------------------------------