Roll Skia from fe71605185d9 to 3d7cb33f7a44 (1 revision)
https://skia.googlesource.com/skia.git/+log/fe71605185d9..3d7cb33f7a44
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://skia-autoroll.corp.goog/r/android-next-autoroll
Please CC djsollen@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Test: Presubmit checks will test this change.
Exempt-From-Owner-Approval: The autoroll bot does not require owner approval.
Bug: b/192358244
Change-Id: I536c255fcaf5259c50149345598425a2c40a0a23
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..e9539c5
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,3728 @@
+// This file is autogenerated by gn_to_bp.py.
+// To make changes to this file, follow the instructions on skia.org for
+// downloading Skia and submitting changes. Modify gn_to_bp.py (or the build
+// files it uses) and submit. The autoroller will then create the updated
+// Android.bp. Or ask a Skia engineer for help.
+
+package {
+ default_applicable_licenses: ["external_skia_license"],
+}
+
+// Added automatically by a large-scale-change that took the approach of
+// 'apply every license found to every target'. While this makes sure we respect
+// every license restriction, it may not be entirely correct.
+//
+// e.g. GPL in an MIT project might only apply to the contrib/ directory.
+//
+// Please consider splitting the single license below into multiple licenses,
+// taking care not to lose any license_kind information, and overriding the
+// default license using the 'licenses: [...]' property on targets as needed.
+//
+// For unused files, consider creating a 'fileGroup' with "//visibility:private"
+// to attach the license to, and including a comment whether the files may be
+// used in the current project.
+//
+// large-scale-change included anything that looked like it might be a license
+// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
+//
+// Please consider removing redundant or irrelevant files from 'license_text:'.
+//
+// large-scale-change filtered out the below license kinds as false-positives:
+// SPDX-license-identifier-CC-BY-NC
+// SPDX-license-identifier-GPL-2.0
+// SPDX-license-identifier-LGPL-2.1
+// SPDX-license-identifier-OFL:by_exception_only
+// See: http://go/android-license-faq
+license {
+ name: "external_skia_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-BSD",
+ "SPDX-license-identifier-CC0-1.0",
+ "SPDX-license-identifier-FTL",
+ "SPDX-license-identifier-MIT",
+ "SPDX-license-identifier-MPL",
+ "legacy_unencumbered",
+ ],
+ license_text: [
+ "LICENSE",
+ "NOTICE",
+ ],
+}
+
+cc_defaults {
+ name: "skia_defaults",
+ cflags: [
+ "-U_FORTIFY_SOURCE",
+ "-DATRACE_TAG=ATRACE_TAG_VIEW",
+ "-DSKIA_DLL",
+ "-DSKIA_IMPLEMENTATION=1",
+ "-D_FORTIFY_SOURCE=1",
+ "-Wno-attributes",
+ "-Wno-implicit-fallthrough",
+ "-Wno-missing-field-initializers",
+ "-Wno-sign-conversion",
+ "-Wno-thread-safety-analysis",
+ "-Wno-unused-parameter",
+ "-Wno-unused-variable",
+ "-fvisibility=hidden",
+ ],
+
+ cppflags:[
+
+ ],
+
+ export_include_dirs: [
+ "",
+ "client_utils/android/",
+ "include/android/",
+ "include/c/",
+ "include/codec/",
+ "include/config/",
+ "include/core/",
+ "include/docs/",
+ "include/effects/",
+ "include/encode/",
+ "include/gpu/",
+ "include/pathops/",
+ "include/ports/",
+ "include/svg/",
+ "include/utils/",
+ "include/utils/mac/",
+ "modules/particles/include/",
+ "modules/skottie/include/",
+ "modules/skparagraph/include/",
+ "modules/skshaper/include/",
+ "modules/svg/include/",
+ ],
+
+ local_include_dirs: [
+ "",
+ "include/third_party/skcms",
+ "third_party/libgifcodec/",
+ ],
+
+ arch: {
+ arm: {
+ srcs: [
+
+ ],
+
+ neon: {
+ srcs: [
+
+ ],
+ },
+ },
+
+ arm64: {
+ srcs: [
+ "src/opts/SkOpts_crc32.cpp",
+ ],
+ },
+
+ x86: {
+ srcs: [
+ "src/opts/SkOpts_avx.cpp",
+ "src/opts/SkOpts_hsw.cpp",
+ "src/opts/SkOpts_skx.cpp",
+ "src/opts/SkOpts_sse41.cpp",
+ "src/opts/SkOpts_sse42.cpp",
+ "src/opts/SkOpts_ssse3.cpp",
+ ],
+ },
+
+ x86_64: {
+ srcs: [
+ "src/opts/SkOpts_avx.cpp",
+ "src/opts/SkOpts_hsw.cpp",
+ "src/opts/SkOpts_skx.cpp",
+ "src/opts/SkOpts_sse41.cpp",
+ "src/opts/SkOpts_sse42.cpp",
+ "src/opts/SkOpts_ssse3.cpp",
+ ],
+ },
+ },
+
+ target: {
+ android: {
+ srcs: [
+ "third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator.cpp",
+ ],
+ local_include_dirs: [
+ "third_party/vulkanmemoryallocator/",
+ ],
+ },
+ },
+}
+
+cc_library_static {
+ // Smaller version of Skia, without e.g. codecs, intended for use by RenderEngine.
+ name: "libskia_renderengine",
+ defaults: ["skia_defaults",
+ "skia_renderengine_deps"],
+ srcs: [
+ "src/android/SkAndroidFrameworkUtils.cpp",
+ "src/android/SkAnimatedImage.cpp",
+ "src/c/sk_effects.cpp",
+ "src/c/sk_imageinfo.cpp",
+ "src/c/sk_paint.cpp",
+ "src/c/sk_surface.cpp",
+ "src/codec/SkAndroidCodec.cpp",
+ "src/codec/SkAndroidCodecAdapter.cpp",
+ "src/codec/SkBmpBaseCodec.cpp",
+ "src/codec/SkBmpCodec.cpp",
+ "src/codec/SkBmpMaskCodec.cpp",
+ "src/codec/SkBmpRLECodec.cpp",
+ "src/codec/SkBmpStandardCodec.cpp",
+ "src/codec/SkCodec.cpp",
+ "src/codec/SkCodecImageGenerator.cpp",
+ "src/codec/SkColorTable.cpp",
+ "src/codec/SkEncodedInfo.cpp",
+ "src/codec/SkMaskSwizzler.cpp",
+ "src/codec/SkMasks.cpp",
+ "src/codec/SkParseEncodedOrigin.cpp",
+ "src/codec/SkSampledCodec.cpp",
+ "src/codec/SkSampler.cpp",
+ "src/codec/SkStreamBuffer.cpp",
+ "src/codec/SkSwizzler.cpp",
+ "src/codec/SkWbmpCodec.cpp",
+ "src/core/SkAAClip.cpp",
+ "src/core/SkATrace.cpp",
+ "src/core/SkAlphaRuns.cpp",
+ "src/core/SkAnalyticEdge.cpp",
+ "src/core/SkAnnotation.cpp",
+ "src/core/SkArenaAlloc.cpp",
+ "src/core/SkAutoPixmapStorage.cpp",
+ "src/core/SkBBHFactory.cpp",
+ "src/core/SkBigPicture.cpp",
+ "src/core/SkBitmap.cpp",
+ "src/core/SkBitmapCache.cpp",
+ "src/core/SkBitmapDevice.cpp",
+ "src/core/SkBitmapProcState.cpp",
+ "src/core/SkBitmapProcState_matrixProcs.cpp",
+ "src/core/SkBlendMode.cpp",
+ "src/core/SkBlitRow_D32.cpp",
+ "src/core/SkBlitter.cpp",
+ "src/core/SkBlitter_A8.cpp",
+ "src/core/SkBlitter_ARGB32.cpp",
+ "src/core/SkBlitter_RGB565.cpp",
+ "src/core/SkBlitter_Sprite.cpp",
+ "src/core/SkBlurMF.cpp",
+ "src/core/SkBlurMask.cpp",
+ "src/core/SkBuffer.cpp",
+ "src/core/SkCachedData.cpp",
+ "src/core/SkCanvas.cpp",
+ "src/core/SkCanvasPriv.cpp",
+ "src/core/SkClipStack.cpp",
+ "src/core/SkClipStackDevice.cpp",
+ "src/core/SkColor.cpp",
+ "src/core/SkColorFilter.cpp",
+ "src/core/SkColorFilter_Matrix.cpp",
+ "src/core/SkColorSpace.cpp",
+ "src/core/SkColorSpaceXformSteps.cpp",
+ "src/core/SkCompressedDataUtils.cpp",
+ "src/core/SkContourMeasure.cpp",
+ "src/core/SkConvertPixels.cpp",
+ "src/core/SkCpu.cpp",
+ "src/core/SkCubicClipper.cpp",
+ "src/core/SkCubicMap.cpp",
+ "src/core/SkData.cpp",
+ "src/core/SkDataTable.cpp",
+ "src/core/SkDebug.cpp",
+ "src/core/SkDeferredDisplayList.cpp",
+ "src/core/SkDeferredDisplayListRecorder.cpp",
+ "src/core/SkDeque.cpp",
+ "src/core/SkDescriptor.cpp",
+ "src/core/SkDevice.cpp",
+ "src/core/SkDistanceFieldGen.cpp",
+ "src/core/SkDocument.cpp",
+ "src/core/SkDraw.cpp",
+ "src/core/SkDrawLooper.cpp",
+ "src/core/SkDrawShadowInfo.cpp",
+ "src/core/SkDraw_atlas.cpp",
+ "src/core/SkDraw_text.cpp",
+ "src/core/SkDraw_vertices.cpp",
+ "src/core/SkDrawable.cpp",
+ "src/core/SkEdge.cpp",
+ "src/core/SkEdgeBuilder.cpp",
+ "src/core/SkEdgeClipper.cpp",
+ "src/core/SkExecutor.cpp",
+ "src/core/SkFlattenable.cpp",
+ "src/core/SkFont.cpp",
+ "src/core/SkFontDescriptor.cpp",
+ "src/core/SkFontMgr.cpp",
+ "src/core/SkFontStream.cpp",
+ "src/core/SkFont_serial.cpp",
+ "src/core/SkGaussFilter.cpp",
+ "src/core/SkGeometry.cpp",
+ "src/core/SkGlobalInitialization_core.cpp",
+ "src/core/SkGlyph.cpp",
+ "src/core/SkGlyphBuffer.cpp",
+ "src/core/SkGlyphRun.cpp",
+ "src/core/SkGlyphRunPainter.cpp",
+ "src/core/SkGpuBlurUtils.cpp",
+ "src/core/SkGraphics.cpp",
+ "src/core/SkHalf.cpp",
+ "src/core/SkICC.cpp",
+ "src/core/SkIDChangeListener.cpp",
+ "src/core/SkImageFilter.cpp",
+ "src/core/SkImageFilterCache.cpp",
+ "src/core/SkImageFilterTypes.cpp",
+ "src/core/SkImageGenerator.cpp",
+ "src/core/SkImageInfo.cpp",
+ "src/core/SkLatticeIter.cpp",
+ "src/core/SkLineClipper.cpp",
+ "src/core/SkLocalMatrixImageFilter.cpp",
+ "src/core/SkM44.cpp",
+ "src/core/SkMD5.cpp",
+ "src/core/SkMalloc.cpp",
+ "src/core/SkMallocPixelRef.cpp",
+ "src/core/SkMarkerStack.cpp",
+ "src/core/SkMask.cpp",
+ "src/core/SkMaskBlurFilter.cpp",
+ "src/core/SkMaskCache.cpp",
+ "src/core/SkMaskFilter.cpp",
+ "src/core/SkMaskGamma.cpp",
+ "src/core/SkMath.cpp",
+ "src/core/SkMatrix.cpp",
+ "src/core/SkMatrix44.cpp",
+ "src/core/SkMatrixImageFilter.cpp",
+ "src/core/SkMiniRecorder.cpp",
+ "src/core/SkMipmap.cpp",
+ "src/core/SkMipmapAccessor.cpp",
+ "src/core/SkModeColorFilter.cpp",
+ "src/core/SkOpts.cpp",
+ "src/core/SkOpts_erms.cpp",
+ "src/core/SkOverdrawCanvas.cpp",
+ "src/core/SkPaint.cpp",
+ "src/core/SkPaintPriv.cpp",
+ "src/core/SkPath.cpp",
+ "src/core/SkPathBuilder.cpp",
+ "src/core/SkPathEffect.cpp",
+ "src/core/SkPathMeasure.cpp",
+ "src/core/SkPathRef.cpp",
+ "src/core/SkPath_serial.cpp",
+ "src/core/SkPicture.cpp",
+ "src/core/SkPictureData.cpp",
+ "src/core/SkPictureFlat.cpp",
+ "src/core/SkPictureImageGenerator.cpp",
+ "src/core/SkPicturePlayback.cpp",
+ "src/core/SkPictureRecord.cpp",
+ "src/core/SkPictureRecorder.cpp",
+ "src/core/SkPixelRef.cpp",
+ "src/core/SkPixmap.cpp",
+ "src/core/SkPoint.cpp",
+ "src/core/SkPoint3.cpp",
+ "src/core/SkPromiseImageTexture.cpp",
+ "src/core/SkPtrRecorder.cpp",
+ "src/core/SkQuadClipper.cpp",
+ "src/core/SkRRect.cpp",
+ "src/core/SkRTree.cpp",
+ "src/core/SkRasterClip.cpp",
+ "src/core/SkRasterPipeline.cpp",
+ "src/core/SkRasterPipelineBlitter.cpp",
+ "src/core/SkReadBuffer.cpp",
+ "src/core/SkRecord.cpp",
+ "src/core/SkRecordDraw.cpp",
+ "src/core/SkRecordOpts.cpp",
+ "src/core/SkRecordedDrawable.cpp",
+ "src/core/SkRecorder.cpp",
+ "src/core/SkRecords.cpp",
+ "src/core/SkRect.cpp",
+ "src/core/SkRegion.cpp",
+ "src/core/SkRegion_path.cpp",
+ "src/core/SkRemoteGlyphCache.cpp",
+ "src/core/SkResourceCache.cpp",
+ "src/core/SkRuntimeEffect.cpp",
+ "src/core/SkScalar.cpp",
+ "src/core/SkScalerCache.cpp",
+ "src/core/SkScalerContext.cpp",
+ "src/core/SkScan.cpp",
+ "src/core/SkScan_AAAPath.cpp",
+ "src/core/SkScan_AntiPath.cpp",
+ "src/core/SkScan_Antihair.cpp",
+ "src/core/SkScan_Hairline.cpp",
+ "src/core/SkScan_Path.cpp",
+ "src/core/SkSemaphore.cpp",
+ "src/core/SkSharedMutex.cpp",
+ "src/core/SkSpecialImage.cpp",
+ "src/core/SkSpecialSurface.cpp",
+ "src/core/SkSpinlock.cpp",
+ "src/core/SkSpriteBlitter_ARGB32.cpp",
+ "src/core/SkSpriteBlitter_RGB565.cpp",
+ "src/core/SkStream.cpp",
+ "src/core/SkStrikeCache.cpp",
+ "src/core/SkStrikeForGPU.cpp",
+ "src/core/SkStrikeSpec.cpp",
+ "src/core/SkString.cpp",
+ "src/core/SkStringUtils.cpp",
+ "src/core/SkStroke.cpp",
+ "src/core/SkStrokeRec.cpp",
+ "src/core/SkStrokerPriv.cpp",
+ "src/core/SkSurfaceCharacterization.cpp",
+ "src/core/SkSwizzle.cpp",
+ "src/core/SkTSearch.cpp",
+ "src/core/SkTaskGroup.cpp",
+ "src/core/SkTextBlob.cpp",
+ "src/core/SkTextBlobTrace.cpp",
+ "src/core/SkThreadID.cpp",
+ "src/core/SkTime.cpp",
+ "src/core/SkTypeface.cpp",
+ "src/core/SkTypefaceCache.cpp",
+ "src/core/SkTypeface_remote.cpp",
+ "src/core/SkUnPreMultiply.cpp",
+ "src/core/SkUtils.cpp",
+ "src/core/SkVM.cpp",
+ "src/core/SkVMBlitter.cpp",
+ "src/core/SkVertState.cpp",
+ "src/core/SkVertices.cpp",
+ "src/core/SkWriteBuffer.cpp",
+ "src/core/SkWriter32.cpp",
+ "src/core/SkXfermode.cpp",
+ "src/core/SkXfermodeInterpretation.cpp",
+ "src/core/SkYUVAInfo.cpp",
+ "src/core/SkYUVAPixmaps.cpp",
+ "src/core/SkYUVMath.cpp",
+ "src/core/SkYUVPlanesCache.cpp",
+ "src/effects/Sk1DPathEffect.cpp",
+ "src/effects/Sk2DPathEffect.cpp",
+ "src/effects/SkColorMatrix.cpp",
+ "src/effects/SkColorMatrixFilter.cpp",
+ "src/effects/SkCornerPathEffect.cpp",
+ "src/effects/SkDashPathEffect.cpp",
+ "src/effects/SkDiscretePathEffect.cpp",
+ "src/effects/SkEmbossMask.cpp",
+ "src/effects/SkEmbossMaskFilter.cpp",
+ "src/effects/SkHighContrastFilter.cpp",
+ "src/effects/SkLayerDrawLooper.cpp",
+ "src/effects/SkLumaColorFilter.cpp",
+ "src/effects/SkOpPathEffect.cpp",
+ "src/effects/SkOverdrawColorFilter.cpp",
+ "src/effects/SkShaderMaskFilter.cpp",
+ "src/effects/SkTableColorFilter.cpp",
+ "src/effects/SkTableMaskFilter.cpp",
+ "src/effects/SkTrimPathEffect.cpp",
+ "src/effects/imagefilters/SkAlphaThresholdImageFilter.cpp",
+ "src/effects/imagefilters/SkArithmeticImageFilter.cpp",
+ "src/effects/imagefilters/SkBlendImageFilter.cpp",
+ "src/effects/imagefilters/SkBlurImageFilter.cpp",
+ "src/effects/imagefilters/SkColorFilterImageFilter.cpp",
+ "src/effects/imagefilters/SkComposeImageFilter.cpp",
+ "src/effects/imagefilters/SkDisplacementMapImageFilter.cpp",
+ "src/effects/imagefilters/SkDropShadowImageFilter.cpp",
+ "src/effects/imagefilters/SkImageImageFilter.cpp",
+ "src/effects/imagefilters/SkLightingImageFilter.cpp",
+ "src/effects/imagefilters/SkMagnifierImageFilter.cpp",
+ "src/effects/imagefilters/SkMatrixConvolutionImageFilter.cpp",
+ "src/effects/imagefilters/SkMergeImageFilter.cpp",
+ "src/effects/imagefilters/SkMorphologyImageFilter.cpp",
+ "src/effects/imagefilters/SkOffsetImageFilter.cpp",
+ "src/effects/imagefilters/SkPictureImageFilter.cpp",
+ "src/effects/imagefilters/SkShaderImageFilter.cpp",
+ "src/effects/imagefilters/SkTileImageFilter.cpp",
+ "src/gpu/GrAATriangulator.cpp",
+ "src/gpu/GrAHardwareBufferImageGenerator.cpp",
+ "src/gpu/GrAHardwareBufferUtils.cpp",
+ "src/gpu/GrAttachment.cpp",
+ "src/gpu/GrAuditTrail.cpp",
+ "src/gpu/GrBackendSemaphore.cpp",
+ "src/gpu/GrBackendSurface.cpp",
+ "src/gpu/GrBackendSurfaceMutableState.cpp",
+ "src/gpu/GrBackendTextureImageGenerator.cpp",
+ "src/gpu/GrBackendUtils.cpp",
+ "src/gpu/GrBlockAllocator.cpp",
+ "src/gpu/GrBlurUtils.cpp",
+ "src/gpu/GrBufferAllocPool.cpp",
+ "src/gpu/GrCaps.cpp",
+ "src/gpu/GrClientMappedBufferManager.cpp",
+ "src/gpu/GrClipStack.cpp",
+ "src/gpu/GrClipStackClip.cpp",
+ "src/gpu/GrColorInfo.cpp",
+ "src/gpu/GrColorSpaceXform.cpp",
+ "src/gpu/GrContextThreadSafeProxy.cpp",
+ "src/gpu/GrContext_Base.cpp",
+ "src/gpu/GrCopyRenderTask.cpp",
+ "src/gpu/GrDDLContext.cpp",
+ "src/gpu/GrDDLTask.cpp",
+ "src/gpu/GrDataUtils.cpp",
+ "src/gpu/GrDefaultGeoProcFactory.cpp",
+ "src/gpu/GrDirectContext.cpp",
+ "src/gpu/GrDirectContextPriv.cpp",
+ "src/gpu/GrDistanceFieldGenFromVector.cpp",
+ "src/gpu/GrDrawOpAtlas.cpp",
+ "src/gpu/GrDrawOpTest.cpp",
+ "src/gpu/GrDrawingManager.cpp",
+ "src/gpu/GrDriverBugWorkarounds.cpp",
+ "src/gpu/GrDynamicAtlas.cpp",
+ "src/gpu/GrFinishCallbacks.cpp",
+ "src/gpu/GrFixedClip.cpp",
+ "src/gpu/GrFragmentProcessor.cpp",
+ "src/gpu/GrGeometryProcessor.cpp",
+ "src/gpu/GrGpu.cpp",
+ "src/gpu/GrGpuBuffer.cpp",
+ "src/gpu/GrGpuResource.cpp",
+ "src/gpu/GrImageContext.cpp",
+ "src/gpu/GrManagedResource.cpp",
+ "src/gpu/GrMemoryPool.cpp",
+ "src/gpu/GrOnFlushResourceProvider.cpp",
+ "src/gpu/GrOpFlushState.cpp",
+ "src/gpu/GrOpsRenderPass.cpp",
+ "src/gpu/GrOpsTask.cpp",
+ "src/gpu/GrPaint.cpp",
+ "src/gpu/GrPathRenderer.cpp",
+ "src/gpu/GrPathRendererChain.cpp",
+ "src/gpu/GrPersistentCacheUtils.cpp",
+ "src/gpu/GrPipeline.cpp",
+ "src/gpu/GrProcessor.cpp",
+ "src/gpu/GrProcessorAnalysis.cpp",
+ "src/gpu/GrProcessorSet.cpp",
+ "src/gpu/GrProcessorUnitTest.cpp",
+ "src/gpu/GrProgramDesc.cpp",
+ "src/gpu/GrProgramInfo.cpp",
+ "src/gpu/GrProxyProvider.cpp",
+ "src/gpu/GrRecordingContext.cpp",
+ "src/gpu/GrRecordingContextPriv.cpp",
+ "src/gpu/GrRectanizerPow2.cpp",
+ "src/gpu/GrRectanizerSkyline.cpp",
+ "src/gpu/GrReducedClip.cpp",
+ "src/gpu/GrRenderTarget.cpp",
+ "src/gpu/GrRenderTargetProxy.cpp",
+ "src/gpu/GrRenderTask.cpp",
+ "src/gpu/GrRenderTaskCluster.cpp",
+ "src/gpu/GrResourceAllocator.cpp",
+ "src/gpu/GrResourceCache.cpp",
+ "src/gpu/GrResourceProvider.cpp",
+ "src/gpu/GrRingBuffer.cpp",
+ "src/gpu/GrSPIRVUniformHandler.cpp",
+ "src/gpu/GrSPIRVVaryingHandler.cpp",
+ "src/gpu/GrSWMaskHelper.cpp",
+ "src/gpu/GrShaderCaps.cpp",
+ "src/gpu/GrShaderUtils.cpp",
+ "src/gpu/GrShaderVar.cpp",
+ "src/gpu/GrSoftwarePathRenderer.cpp",
+ "src/gpu/GrStagingBufferManager.cpp",
+ "src/gpu/GrStencilMaskHelper.cpp",
+ "src/gpu/GrStencilSettings.cpp",
+ "src/gpu/GrStyle.cpp",
+ "src/gpu/GrSubRunAllocator.cpp",
+ "src/gpu/GrSurface.cpp",
+ "src/gpu/GrSurfaceContext.cpp",
+ "src/gpu/GrSurfaceDrawContext.cpp",
+ "src/gpu/GrSurfaceFillContext.cpp",
+ "src/gpu/GrSurfaceProxy.cpp",
+ "src/gpu/GrSwizzle.cpp",
+ "src/gpu/GrTestUtils.cpp",
+ "src/gpu/GrTexture.cpp",
+ "src/gpu/GrTextureProxy.cpp",
+ "src/gpu/GrTextureRenderTargetProxy.cpp",
+ "src/gpu/GrTextureResolveRenderTask.cpp",
+ "src/gpu/GrThreadSafeCache.cpp",
+ "src/gpu/GrThreadSafePipelineBuilder.cpp",
+ "src/gpu/GrTransferFromRenderTask.cpp",
+ "src/gpu/GrTriangulator.cpp",
+ "src/gpu/GrUniformDataManager.cpp",
+ "src/gpu/GrUtil.cpp",
+ "src/gpu/GrWaitRenderTask.cpp",
+ "src/gpu/GrWritePixelsRenderTask.cpp",
+ "src/gpu/GrXferProcessor.cpp",
+ "src/gpu/GrYUVABackendTextures.cpp",
+ "src/gpu/GrYUVATextureProxies.cpp",
+ "src/gpu/SkGpuDevice.cpp",
+ "src/gpu/SkGpuDevice_drawTexture.cpp",
+ "src/gpu/SkGr.cpp",
+ "src/gpu/ccpr/GrCCAtlas.cpp",
+ "src/gpu/ccpr/GrCCClipPath.cpp",
+ "src/gpu/ccpr/GrCCClipProcessor.cpp",
+ "src/gpu/ccpr/GrCCPerFlushResources.cpp",
+ "src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp",
+ "src/gpu/effects/GrBezierEffect.cpp",
+ "src/gpu/effects/GrBicubicEffect.cpp",
+ "src/gpu/effects/GrBitmapTextGeoProc.cpp",
+ "src/gpu/effects/GrBlendFragmentProcessor.cpp",
+ "src/gpu/effects/GrConvexPolyEffect.cpp",
+ "src/gpu/effects/GrCoverageSetOpXP.cpp",
+ "src/gpu/effects/GrCustomXfermode.cpp",
+ "src/gpu/effects/GrDisableColorXP.cpp",
+ "src/gpu/effects/GrDistanceFieldGeoProc.cpp",
+ "src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp",
+ "src/gpu/effects/GrMatrixConvolutionEffect.cpp",
+ "src/gpu/effects/GrMatrixEffect.cpp",
+ "src/gpu/effects/GrOvalEffect.cpp",
+ "src/gpu/effects/GrPorterDuffXferProcessor.cpp",
+ "src/gpu/effects/GrRRectEffect.cpp",
+ "src/gpu/effects/GrShadowGeoProc.cpp",
+ "src/gpu/effects/GrSkSLFP.cpp",
+ "src/gpu/effects/GrTextureEffect.cpp",
+ "src/gpu/effects/GrYUVtoRGBEffect.cpp",
+ "src/gpu/effects/generated/GrAARectEffect.cpp",
+ "src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.cpp",
+ "src/gpu/effects/generated/GrArithmeticProcessor.cpp",
+ "src/gpu/effects/generated/GrBlurredEdgeFragmentProcessor.cpp",
+ "src/gpu/effects/generated/GrCircleBlurFragmentProcessor.cpp",
+ "src/gpu/effects/generated/GrCircleEffect.cpp",
+ "src/gpu/effects/generated/GrClampFragmentProcessor.cpp",
+ "src/gpu/effects/generated/GrColorMatrixFragmentProcessor.cpp",
+ "src/gpu/effects/generated/GrConfigConversionEffect.cpp",
+ "src/gpu/effects/generated/GrDeviceSpaceEffect.cpp",
+ "src/gpu/effects/generated/GrDitherEffect.cpp",
+ "src/gpu/effects/generated/GrEllipseEffect.cpp",
+ "src/gpu/effects/generated/GrHSLToRGBFilterEffect.cpp",
+ "src/gpu/effects/generated/GrMagnifierEffect.cpp",
+ "src/gpu/effects/generated/GrOverrideInputFragmentProcessor.cpp",
+ "src/gpu/effects/generated/GrRGBToHSLFilterEffect.cpp",
+ "src/gpu/effects/generated/GrRRectBlurEffect.cpp",
+ "src/gpu/effects/generated/GrRectBlurEffect.cpp",
+ "src/gpu/geometry/GrPathUtils.cpp",
+ "src/gpu/geometry/GrQuad.cpp",
+ "src/gpu/geometry/GrQuadUtils.cpp",
+ "src/gpu/geometry/GrShape.cpp",
+ "src/gpu/geometry/GrStyledShape.cpp",
+ "src/gpu/gl/GrGLAssembleGLESInterfaceAutogen.cpp",
+ "src/gpu/gl/GrGLAssembleGLInterfaceAutogen.cpp",
+ "src/gpu/gl/GrGLAssembleHelpers.cpp",
+ "src/gpu/gl/GrGLAssembleInterface.cpp",
+ "src/gpu/gl/GrGLAssembleWebGLInterfaceAutogen.cpp",
+ "src/gpu/gl/GrGLAttachment.cpp",
+ "src/gpu/gl/GrGLBuffer.cpp",
+ "src/gpu/gl/GrGLCaps.cpp",
+ "src/gpu/gl/GrGLContext.cpp",
+ "src/gpu/gl/GrGLExtensions.cpp",
+ "src/gpu/gl/GrGLGLSL.cpp",
+ "src/gpu/gl/GrGLGpu.cpp",
+ "src/gpu/gl/GrGLGpuProgramCache.cpp",
+ "src/gpu/gl/GrGLInterfaceAutogen.cpp",
+ "src/gpu/gl/GrGLOpsRenderPass.cpp",
+ "src/gpu/gl/GrGLProgram.cpp",
+ "src/gpu/gl/GrGLProgramDataManager.cpp",
+ "src/gpu/gl/GrGLRenderTarget.cpp",
+ "src/gpu/gl/GrGLSemaphore.cpp",
+ "src/gpu/gl/GrGLTexture.cpp",
+ "src/gpu/gl/GrGLTextureRenderTarget.cpp",
+ "src/gpu/gl/GrGLTypesPriv.cpp",
+ "src/gpu/gl/GrGLUniformHandler.cpp",
+ "src/gpu/gl/GrGLUtil.cpp",
+ "src/gpu/gl/GrGLVertexArray.cpp",
+ "src/gpu/gl/builders/GrGLProgramBuilder.cpp",
+ "src/gpu/gl/builders/GrGLShaderStringBuilder.cpp",
+ "src/gpu/gl/egl/GrGLMakeEGLInterface.cpp",
+ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp",
+ "src/gpu/glsl/GrGLSL.cpp",
+ "src/gpu/glsl/GrGLSLBlend.cpp",
+ "src/gpu/glsl/GrGLSLFragmentProcessor.cpp",
+ "src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp",
+ "src/gpu/glsl/GrGLSLGeometryProcessor.cpp",
+ "src/gpu/glsl/GrGLSLProgramBuilder.cpp",
+ "src/gpu/glsl/GrGLSLProgramDataManager.cpp",
+ "src/gpu/glsl/GrGLSLShaderBuilder.cpp",
+ "src/gpu/glsl/GrGLSLUniformHandler.cpp",
+ "src/gpu/glsl/GrGLSLVarying.cpp",
+ "src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp",
+ "src/gpu/glsl/GrGLSLXferProcessor.cpp",
+ "src/gpu/gradients/GrGradientBitmapCache.cpp",
+ "src/gpu/gradients/GrGradientShader.cpp",
+ "src/gpu/gradients/generated/GrClampedGradientEffect.cpp",
+ "src/gpu/gradients/generated/GrDualIntervalGradientColorizer.cpp",
+ "src/gpu/gradients/generated/GrLinearGradientLayout.cpp",
+ "src/gpu/gradients/generated/GrRadialGradientLayout.cpp",
+ "src/gpu/gradients/generated/GrSingleIntervalGradientColorizer.cpp",
+ "src/gpu/gradients/generated/GrSweepGradientLayout.cpp",
+ "src/gpu/gradients/generated/GrTiledGradientEffect.cpp",
+ "src/gpu/gradients/generated/GrTwoPointConicalGradientLayout.cpp",
+ "src/gpu/gradients/generated/GrUnrolledBinaryGradientColorizer.cpp",
+ "src/gpu/mock/GrMockCaps.cpp",
+ "src/gpu/mock/GrMockGpu.cpp",
+ "src/gpu/mock/GrMockTypes.cpp",
+ "src/gpu/ops/GrAAConvexPathRenderer.cpp",
+ "src/gpu/ops/GrAAConvexTessellator.cpp",
+ "src/gpu/ops/GrAAHairLinePathRenderer.cpp",
+ "src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp",
+ "src/gpu/ops/GrAtlasTextOp.cpp",
+ "src/gpu/ops/GrClearOp.cpp",
+ "src/gpu/ops/GrDashLinePathRenderer.cpp",
+ "src/gpu/ops/GrDashOp.cpp",
+ "src/gpu/ops/GrDefaultPathRenderer.cpp",
+ "src/gpu/ops/GrDrawAtlasOp.cpp",
+ "src/gpu/ops/GrDrawVerticesOp.cpp",
+ "src/gpu/ops/GrDrawableOp.cpp",
+ "src/gpu/ops/GrFillRRectOp.cpp",
+ "src/gpu/ops/GrFillRectOp.cpp",
+ "src/gpu/ops/GrLatticeOp.cpp",
+ "src/gpu/ops/GrMeshDrawOp.cpp",
+ "src/gpu/ops/GrOp.cpp",
+ "src/gpu/ops/GrOvalOpFactory.cpp",
+ "src/gpu/ops/GrQuadPerEdgeAA.cpp",
+ "src/gpu/ops/GrRegionOp.cpp",
+ "src/gpu/ops/GrShadowRRectOp.cpp",
+ "src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp",
+ "src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp",
+ "src/gpu/ops/GrSmallPathAtlasMgr.cpp",
+ "src/gpu/ops/GrSmallPathRenderer.cpp",
+ "src/gpu/ops/GrSmallPathShapeData.cpp",
+ "src/gpu/ops/GrStrokeRectOp.cpp",
+ "src/gpu/ops/GrTextureOp.cpp",
+ "src/gpu/ops/GrTriangulatingPathRenderer.cpp",
+ "src/gpu/tessellate/GrDrawAtlasPathOp.cpp",
+ "src/gpu/tessellate/GrFillPathShader.cpp",
+ "src/gpu/tessellate/GrPathInnerTriangulateOp.cpp",
+ "src/gpu/tessellate/GrPathStencilFillOp.cpp",
+ "src/gpu/tessellate/GrPathTessellator.cpp",
+ "src/gpu/tessellate/GrStencilPathShader.cpp",
+ "src/gpu/tessellate/GrStrokeFixedCountTessellator.cpp",
+ "src/gpu/tessellate/GrStrokeHardwareTessellator.cpp",
+ "src/gpu/tessellate/GrStrokeIndirectTessellator.cpp",
+ "src/gpu/tessellate/GrStrokeTessellateOp.cpp",
+ "src/gpu/tessellate/GrStrokeTessellateShader.cpp",
+ "src/gpu/tessellate/GrTessellationPathRenderer.cpp",
+ "src/gpu/text/GrAtlasManager.cpp",
+ "src/gpu/text/GrDistanceFieldAdjustTable.cpp",
+ "src/gpu/text/GrSDFMaskFilter.cpp",
+ "src/gpu/text/GrSDFTControl.cpp",
+ "src/gpu/text/GrStrikeCache.cpp",
+ "src/gpu/text/GrTextBlob.cpp",
+ "src/gpu/text/GrTextBlobCache.cpp",
+ "src/gpu/vk/GrVkAMDMemoryAllocator.cpp",
+ "src/gpu/vk/GrVkAttachment.cpp",
+ "src/gpu/vk/GrVkBuffer.cpp",
+ "src/gpu/vk/GrVkCaps.cpp",
+ "src/gpu/vk/GrVkCommandBuffer.cpp",
+ "src/gpu/vk/GrVkCommandPool.cpp",
+ "src/gpu/vk/GrVkDescriptorPool.cpp",
+ "src/gpu/vk/GrVkDescriptorSet.cpp",
+ "src/gpu/vk/GrVkDescriptorSetManager.cpp",
+ "src/gpu/vk/GrVkExtensions.cpp",
+ "src/gpu/vk/GrVkFramebuffer.cpp",
+ "src/gpu/vk/GrVkGpu.cpp",
+ "src/gpu/vk/GrVkImage.cpp",
+ "src/gpu/vk/GrVkImageView.cpp",
+ "src/gpu/vk/GrVkInterface.cpp",
+ "src/gpu/vk/GrVkMSAALoadManager.cpp",
+ "src/gpu/vk/GrVkMemory.cpp",
+ "src/gpu/vk/GrVkOpsRenderPass.cpp",
+ "src/gpu/vk/GrVkPipeline.cpp",
+ "src/gpu/vk/GrVkPipelineState.cpp",
+ "src/gpu/vk/GrVkPipelineStateBuilder.cpp",
+ "src/gpu/vk/GrVkPipelineStateCache.cpp",
+ "src/gpu/vk/GrVkPipelineStateDataManager.cpp",
+ "src/gpu/vk/GrVkRenderPass.cpp",
+ "src/gpu/vk/GrVkRenderTarget.cpp",
+ "src/gpu/vk/GrVkResourceProvider.cpp",
+ "src/gpu/vk/GrVkSampler.cpp",
+ "src/gpu/vk/GrVkSamplerYcbcrConversion.cpp",
+ "src/gpu/vk/GrVkSecondaryCBDrawContext.cpp",
+ "src/gpu/vk/GrVkSemaphore.cpp",
+ "src/gpu/vk/GrVkTexture.cpp",
+ "src/gpu/vk/GrVkTextureRenderTarget.cpp",
+ "src/gpu/vk/GrVkTypesPriv.cpp",
+ "src/gpu/vk/GrVkUniformHandler.cpp",
+ "src/gpu/vk/GrVkUtil.cpp",
+ "src/gpu/vk/GrVkVaryingHandler.cpp",
+ "src/image/SkImage.cpp",
+ "src/image/SkImage_Gpu.cpp",
+ "src/image/SkImage_GpuBase.cpp",
+ "src/image/SkImage_GpuYUVA.cpp",
+ "src/image/SkImage_Lazy.cpp",
+ "src/image/SkImage_Raster.cpp",
+ "src/image/SkRescaleAndReadPixels.cpp",
+ "src/image/SkSurface.cpp",
+ "src/image/SkSurface_Gpu.cpp",
+ "src/image/SkSurface_Raster.cpp",
+ "src/images/SkImageEncoder.cpp",
+ "src/images/SkPngEncoder.cpp",
+ "src/lazy/SkDiscardableMemoryPool.cpp",
+ "src/pathops/SkAddIntersections.cpp",
+ "src/pathops/SkDConicLineIntersection.cpp",
+ "src/pathops/SkDCubicLineIntersection.cpp",
+ "src/pathops/SkDCubicToQuads.cpp",
+ "src/pathops/SkDLineIntersection.cpp",
+ "src/pathops/SkDQuadLineIntersection.cpp",
+ "src/pathops/SkIntersections.cpp",
+ "src/pathops/SkOpAngle.cpp",
+ "src/pathops/SkOpBuilder.cpp",
+ "src/pathops/SkOpCoincidence.cpp",
+ "src/pathops/SkOpContour.cpp",
+ "src/pathops/SkOpCubicHull.cpp",
+ "src/pathops/SkOpEdgeBuilder.cpp",
+ "src/pathops/SkOpSegment.cpp",
+ "src/pathops/SkOpSpan.cpp",
+ "src/pathops/SkPathOpsAsWinding.cpp",
+ "src/pathops/SkPathOpsCommon.cpp",
+ "src/pathops/SkPathOpsConic.cpp",
+ "src/pathops/SkPathOpsCubic.cpp",
+ "src/pathops/SkPathOpsCurve.cpp",
+ "src/pathops/SkPathOpsDebug.cpp",
+ "src/pathops/SkPathOpsLine.cpp",
+ "src/pathops/SkPathOpsOp.cpp",
+ "src/pathops/SkPathOpsQuad.cpp",
+ "src/pathops/SkPathOpsRect.cpp",
+ "src/pathops/SkPathOpsSimplify.cpp",
+ "src/pathops/SkPathOpsTSect.cpp",
+ "src/pathops/SkPathOpsTightBounds.cpp",
+ "src/pathops/SkPathOpsTypes.cpp",
+ "src/pathops/SkPathOpsWinding.cpp",
+ "src/pathops/SkPathWriter.cpp",
+ "src/pathops/SkReduceOrder.cpp",
+ "src/pdf/SkDocument_PDF_None.cpp",
+ "src/ports/SkDebug_android.cpp",
+ "src/ports/SkDiscardableMemory_none.cpp",
+ "src/ports/SkFontMgr_empty_factory.cpp",
+ "src/ports/SkGlobalInitialization_default.cpp",
+ "src/ports/SkImageGenerator_skia.cpp",
+ "src/ports/SkMemory_malloc.cpp",
+ "src/ports/SkOSFile_posix.cpp",
+ "src/ports/SkOSFile_stdio.cpp",
+ "src/ports/SkOSLibrary_posix.cpp",
+ "src/sfnt/SkOTTable_name.cpp",
+ "src/sfnt/SkOTUtils.cpp",
+ "src/shaders/SkBitmapProcShader.cpp",
+ "src/shaders/SkColorFilterShader.cpp",
+ "src/shaders/SkColorShader.cpp",
+ "src/shaders/SkComposeShader.cpp",
+ "src/shaders/SkImageShader.cpp",
+ "src/shaders/SkLocalMatrixShader.cpp",
+ "src/shaders/SkPerlinNoiseShader.cpp",
+ "src/shaders/SkPictureShader.cpp",
+ "src/shaders/SkShader.cpp",
+ "src/shaders/gradients/Sk4fGradientBase.cpp",
+ "src/shaders/gradients/Sk4fLinearGradient.cpp",
+ "src/shaders/gradients/SkGradientShader.cpp",
+ "src/shaders/gradients/SkLinearGradient.cpp",
+ "src/shaders/gradients/SkRadialGradient.cpp",
+ "src/shaders/gradients/SkSweepGradient.cpp",
+ "src/shaders/gradients/SkTwoPointConicalGradient.cpp",
+ "src/sksl/SkSLASTNode.cpp",
+ "src/sksl/SkSLAnalysis.cpp",
+ "src/sksl/SkSLBuiltinTypes.cpp",
+ "src/sksl/SkSLCPPUniformCTypes.cpp",
+ "src/sksl/SkSLCompiler.cpp",
+ "src/sksl/SkSLConstantFolder.cpp",
+ "src/sksl/SkSLContext.cpp",
+ "src/sksl/SkSLDehydrator.cpp",
+ "src/sksl/SkSLIRGenerator.cpp",
+ "src/sksl/SkSLInliner.cpp",
+ "src/sksl/SkSLLexer.cpp",
+ "src/sksl/SkSLMangler.cpp",
+ "src/sksl/SkSLOperators.cpp",
+ "src/sksl/SkSLOutputStream.cpp",
+ "src/sksl/SkSLParser.cpp",
+ "src/sksl/SkSLPool.cpp",
+ "src/sksl/SkSLRehydrator.cpp",
+ "src/sksl/SkSLSampleUsage.cpp",
+ "src/sksl/SkSLSectionAndParameterHelper.cpp",
+ "src/sksl/SkSLString.cpp",
+ "src/sksl/SkSLUtil.cpp",
+ "src/sksl/codegen/SkSLCPPCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLDSLCPPCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLGLSLCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLHCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLMetalCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLPipelineStageCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLSPIRVtoHLSL.cpp",
+ "src/sksl/codegen/SkSLVMCodeGenerator.cpp",
+ "src/sksl/dsl/DSLBlock.cpp",
+ "src/sksl/dsl/DSLCase.cpp",
+ "src/sksl/dsl/DSLCore.cpp",
+ "src/sksl/dsl/DSLExpression.cpp",
+ "src/sksl/dsl/DSLFunction.cpp",
+ "src/sksl/dsl/DSLLayout.cpp",
+ "src/sksl/dsl/DSLRuntimeEffects.cpp",
+ "src/sksl/dsl/DSLStatement.cpp",
+ "src/sksl/dsl/DSLType.cpp",
+ "src/sksl/dsl/DSLVar.cpp",
+ "src/sksl/dsl/priv/DSLFPs.cpp",
+ "src/sksl/dsl/priv/DSLWriter.cpp",
+ "src/sksl/ir/SkSLBinaryExpression.cpp",
+ "src/sksl/ir/SkSLBlock.cpp",
+ "src/sksl/ir/SkSLConstructor.cpp",
+ "src/sksl/ir/SkSLConstructorArray.cpp",
+ "src/sksl/ir/SkSLConstructorCompound.cpp",
+ "src/sksl/ir/SkSLConstructorCompoundCast.cpp",
+ "src/sksl/ir/SkSLConstructorDiagonalMatrix.cpp",
+ "src/sksl/ir/SkSLConstructorMatrixResize.cpp",
+ "src/sksl/ir/SkSLConstructorScalarCast.cpp",
+ "src/sksl/ir/SkSLConstructorSplat.cpp",
+ "src/sksl/ir/SkSLConstructorStruct.cpp",
+ "src/sksl/ir/SkSLDoStatement.cpp",
+ "src/sksl/ir/SkSLExpressionStatement.cpp",
+ "src/sksl/ir/SkSLFieldAccess.cpp",
+ "src/sksl/ir/SkSLForStatement.cpp",
+ "src/sksl/ir/SkSLFunctionCall.cpp",
+ "src/sksl/ir/SkSLFunctionDeclaration.cpp",
+ "src/sksl/ir/SkSLIfStatement.cpp",
+ "src/sksl/ir/SkSLIndexExpression.cpp",
+ "src/sksl/ir/SkSLPostfixExpression.cpp",
+ "src/sksl/ir/SkSLPrefixExpression.cpp",
+ "src/sksl/ir/SkSLSetting.cpp",
+ "src/sksl/ir/SkSLSwitchStatement.cpp",
+ "src/sksl/ir/SkSLSwizzle.cpp",
+ "src/sksl/ir/SkSLSymbolTable.cpp",
+ "src/sksl/ir/SkSLTernaryExpression.cpp",
+ "src/sksl/ir/SkSLType.cpp",
+ "src/sksl/ir/SkSLVarDeclarations.cpp",
+ "src/sksl/ir/SkSLVariable.cpp",
+ "src/sksl/ir/SkSLVariableReference.cpp",
+ "src/utils/SkAnimCodecPlayer.cpp",
+ "src/utils/SkBase64.cpp",
+ "src/utils/SkCamera.cpp",
+ "src/utils/SkCanvasStack.cpp",
+ "src/utils/SkCanvasStateUtils.cpp",
+ "src/utils/SkCharToGlyphCache.cpp",
+ "src/utils/SkClipStackUtils.cpp",
+ "src/utils/SkCustomTypeface.cpp",
+ "src/utils/SkDashPath.cpp",
+ "src/utils/SkEventTracer.cpp",
+ "src/utils/SkFloatToDecimal.cpp",
+ "src/utils/SkJSON.cpp",
+ "src/utils/SkJSONWriter.cpp",
+ "src/utils/SkMatrix22.cpp",
+ "src/utils/SkMultiPictureDocument.cpp",
+ "src/utils/SkNWayCanvas.cpp",
+ "src/utils/SkNullCanvas.cpp",
+ "src/utils/SkOSPath.cpp",
+ "src/utils/SkOrderedFontMgr.cpp",
+ "src/utils/SkPaintFilterCanvas.cpp",
+ "src/utils/SkParse.cpp",
+ "src/utils/SkParseColor.cpp",
+ "src/utils/SkParsePath.cpp",
+ "src/utils/SkPatchUtils.cpp",
+ "src/utils/SkPolyUtils.cpp",
+ "src/utils/SkShadowTessellator.cpp",
+ "src/utils/SkShadowUtils.cpp",
+ "src/utils/SkShaperJSONWriter.cpp",
+ "src/utils/SkTextUtils.cpp",
+ "src/utils/SkThreadUtils_pthread.cpp",
+ "src/utils/SkThreadUtils_win.cpp",
+ "src/utils/SkUTF.cpp",
+ "src/utils/mac/SkCTFont.cpp",
+ "src/utils/mac/SkCreateCGImageRef.cpp",
+ "src/utils/win/SkAutoCoInitialize.cpp",
+ "src/utils/win/SkDWrite.cpp",
+ "src/utils/win/SkDWriteFontFileStream.cpp",
+ "src/utils/win/SkDWriteGeometrySink.cpp",
+ "src/utils/win/SkHRESULT.cpp",
+ "src/utils/win/SkIStream.cpp",
+ "src/utils/win/SkWGL_win.cpp",
+ "third_party/skcms/skcms.cc",
+ "tools/SkSharingProc.cpp",
+ ],
+ local_include_dirs: [
+ "renderengine",
+ ],
+ export_include_dirs: [
+ "renderengine",
+ ],
+}
+
+cc_library_static {
+ name: "libskia",
+ host_supported: true,
+ cppflags:[
+ // Exceptions are necessary for SkRawCodec.
+ // FIXME: Should we split SkRawCodec into a separate target so the rest
+ // of Skia need not be compiled with exceptions?
+ "-fexceptions",
+ ],
+
+ srcs: [
+ "client_utils/android/BitmapRegionDecoder.cpp",
+ "client_utils/android/FrontBufferedStream.cpp",
+ "src/android/SkAndroidFrameworkUtils.cpp",
+ "src/android/SkAnimatedImage.cpp",
+ "src/c/sk_effects.cpp",
+ "src/c/sk_imageinfo.cpp",
+ "src/c/sk_paint.cpp",
+ "src/c/sk_surface.cpp",
+ "src/codec/SkAndroidCodec.cpp",
+ "src/codec/SkAndroidCodecAdapter.cpp",
+ "src/codec/SkBmpBaseCodec.cpp",
+ "src/codec/SkBmpCodec.cpp",
+ "src/codec/SkBmpMaskCodec.cpp",
+ "src/codec/SkBmpRLECodec.cpp",
+ "src/codec/SkBmpStandardCodec.cpp",
+ "src/codec/SkCodec.cpp",
+ "src/codec/SkCodecImageGenerator.cpp",
+ "src/codec/SkColorTable.cpp",
+ "src/codec/SkEncodedInfo.cpp",
+ "src/codec/SkIcoCodec.cpp",
+ "src/codec/SkJpegCodec.cpp",
+ "src/codec/SkJpegDecoderMgr.cpp",
+ "src/codec/SkJpegUtility.cpp",
+ "src/codec/SkMaskSwizzler.cpp",
+ "src/codec/SkMasks.cpp",
+ "src/codec/SkParseEncodedOrigin.cpp",
+ "src/codec/SkPngCodec.cpp",
+ "src/codec/SkSampledCodec.cpp",
+ "src/codec/SkSampler.cpp",
+ "src/codec/SkStreamBuffer.cpp",
+ "src/codec/SkSwizzler.cpp",
+ "src/codec/SkWbmpCodec.cpp",
+ "src/codec/SkWebpCodec.cpp",
+ "src/core/SkAAClip.cpp",
+ "src/core/SkATrace.cpp",
+ "src/core/SkAlphaRuns.cpp",
+ "src/core/SkAnalyticEdge.cpp",
+ "src/core/SkAnnotation.cpp",
+ "src/core/SkArenaAlloc.cpp",
+ "src/core/SkAutoPixmapStorage.cpp",
+ "src/core/SkBBHFactory.cpp",
+ "src/core/SkBigPicture.cpp",
+ "src/core/SkBitmap.cpp",
+ "src/core/SkBitmapCache.cpp",
+ "src/core/SkBitmapDevice.cpp",
+ "src/core/SkBitmapProcState.cpp",
+ "src/core/SkBitmapProcState_matrixProcs.cpp",
+ "src/core/SkBlendMode.cpp",
+ "src/core/SkBlitRow_D32.cpp",
+ "src/core/SkBlitter.cpp",
+ "src/core/SkBlitter_A8.cpp",
+ "src/core/SkBlitter_ARGB32.cpp",
+ "src/core/SkBlitter_RGB565.cpp",
+ "src/core/SkBlitter_Sprite.cpp",
+ "src/core/SkBlurMF.cpp",
+ "src/core/SkBlurMask.cpp",
+ "src/core/SkBuffer.cpp",
+ "src/core/SkCachedData.cpp",
+ "src/core/SkCanvas.cpp",
+ "src/core/SkCanvasPriv.cpp",
+ "src/core/SkClipStack.cpp",
+ "src/core/SkClipStackDevice.cpp",
+ "src/core/SkColor.cpp",
+ "src/core/SkColorFilter.cpp",
+ "src/core/SkColorFilter_Matrix.cpp",
+ "src/core/SkColorSpace.cpp",
+ "src/core/SkColorSpaceXformSteps.cpp",
+ "src/core/SkCompressedDataUtils.cpp",
+ "src/core/SkContourMeasure.cpp",
+ "src/core/SkConvertPixels.cpp",
+ "src/core/SkCpu.cpp",
+ "src/core/SkCubicClipper.cpp",
+ "src/core/SkCubicMap.cpp",
+ "src/core/SkData.cpp",
+ "src/core/SkDataTable.cpp",
+ "src/core/SkDebug.cpp",
+ "src/core/SkDeferredDisplayList.cpp",
+ "src/core/SkDeferredDisplayListRecorder.cpp",
+ "src/core/SkDeque.cpp",
+ "src/core/SkDescriptor.cpp",
+ "src/core/SkDevice.cpp",
+ "src/core/SkDistanceFieldGen.cpp",
+ "src/core/SkDocument.cpp",
+ "src/core/SkDraw.cpp",
+ "src/core/SkDrawLooper.cpp",
+ "src/core/SkDrawShadowInfo.cpp",
+ "src/core/SkDraw_atlas.cpp",
+ "src/core/SkDraw_text.cpp",
+ "src/core/SkDraw_vertices.cpp",
+ "src/core/SkDrawable.cpp",
+ "src/core/SkEdge.cpp",
+ "src/core/SkEdgeBuilder.cpp",
+ "src/core/SkEdgeClipper.cpp",
+ "src/core/SkExecutor.cpp",
+ "src/core/SkFlattenable.cpp",
+ "src/core/SkFont.cpp",
+ "src/core/SkFontDescriptor.cpp",
+ "src/core/SkFontMgr.cpp",
+ "src/core/SkFontStream.cpp",
+ "src/core/SkFont_serial.cpp",
+ "src/core/SkGaussFilter.cpp",
+ "src/core/SkGeometry.cpp",
+ "src/core/SkGlobalInitialization_core.cpp",
+ "src/core/SkGlyph.cpp",
+ "src/core/SkGlyphBuffer.cpp",
+ "src/core/SkGlyphRun.cpp",
+ "src/core/SkGlyphRunPainter.cpp",
+ "src/core/SkGpuBlurUtils.cpp",
+ "src/core/SkGraphics.cpp",
+ "src/core/SkHalf.cpp",
+ "src/core/SkICC.cpp",
+ "src/core/SkIDChangeListener.cpp",
+ "src/core/SkImageFilter.cpp",
+ "src/core/SkImageFilterCache.cpp",
+ "src/core/SkImageFilterTypes.cpp",
+ "src/core/SkImageGenerator.cpp",
+ "src/core/SkImageInfo.cpp",
+ "src/core/SkLatticeIter.cpp",
+ "src/core/SkLineClipper.cpp",
+ "src/core/SkLocalMatrixImageFilter.cpp",
+ "src/core/SkM44.cpp",
+ "src/core/SkMD5.cpp",
+ "src/core/SkMalloc.cpp",
+ "src/core/SkMallocPixelRef.cpp",
+ "src/core/SkMarkerStack.cpp",
+ "src/core/SkMask.cpp",
+ "src/core/SkMaskBlurFilter.cpp",
+ "src/core/SkMaskCache.cpp",
+ "src/core/SkMaskFilter.cpp",
+ "src/core/SkMaskGamma.cpp",
+ "src/core/SkMath.cpp",
+ "src/core/SkMatrix.cpp",
+ "src/core/SkMatrix44.cpp",
+ "src/core/SkMatrixImageFilter.cpp",
+ "src/core/SkMiniRecorder.cpp",
+ "src/core/SkMipmap.cpp",
+ "src/core/SkMipmapAccessor.cpp",
+ "src/core/SkModeColorFilter.cpp",
+ "src/core/SkOpts.cpp",
+ "src/core/SkOpts_erms.cpp",
+ "src/core/SkOverdrawCanvas.cpp",
+ "src/core/SkPaint.cpp",
+ "src/core/SkPaintPriv.cpp",
+ "src/core/SkPath.cpp",
+ "src/core/SkPathBuilder.cpp",
+ "src/core/SkPathEffect.cpp",
+ "src/core/SkPathMeasure.cpp",
+ "src/core/SkPathRef.cpp",
+ "src/core/SkPath_serial.cpp",
+ "src/core/SkPicture.cpp",
+ "src/core/SkPictureData.cpp",
+ "src/core/SkPictureFlat.cpp",
+ "src/core/SkPictureImageGenerator.cpp",
+ "src/core/SkPicturePlayback.cpp",
+ "src/core/SkPictureRecord.cpp",
+ "src/core/SkPictureRecorder.cpp",
+ "src/core/SkPixelRef.cpp",
+ "src/core/SkPixmap.cpp",
+ "src/core/SkPoint.cpp",
+ "src/core/SkPoint3.cpp",
+ "src/core/SkPromiseImageTexture.cpp",
+ "src/core/SkPtrRecorder.cpp",
+ "src/core/SkQuadClipper.cpp",
+ "src/core/SkRRect.cpp",
+ "src/core/SkRTree.cpp",
+ "src/core/SkRasterClip.cpp",
+ "src/core/SkRasterPipeline.cpp",
+ "src/core/SkRasterPipelineBlitter.cpp",
+ "src/core/SkReadBuffer.cpp",
+ "src/core/SkRecord.cpp",
+ "src/core/SkRecordDraw.cpp",
+ "src/core/SkRecordOpts.cpp",
+ "src/core/SkRecordedDrawable.cpp",
+ "src/core/SkRecorder.cpp",
+ "src/core/SkRecords.cpp",
+ "src/core/SkRect.cpp",
+ "src/core/SkRegion.cpp",
+ "src/core/SkRegion_path.cpp",
+ "src/core/SkRemoteGlyphCache.cpp",
+ "src/core/SkResourceCache.cpp",
+ "src/core/SkRuntimeEffect.cpp",
+ "src/core/SkScalar.cpp",
+ "src/core/SkScalerCache.cpp",
+ "src/core/SkScalerContext.cpp",
+ "src/core/SkScan.cpp",
+ "src/core/SkScan_AAAPath.cpp",
+ "src/core/SkScan_AntiPath.cpp",
+ "src/core/SkScan_Antihair.cpp",
+ "src/core/SkScan_Hairline.cpp",
+ "src/core/SkScan_Path.cpp",
+ "src/core/SkSemaphore.cpp",
+ "src/core/SkSharedMutex.cpp",
+ "src/core/SkSpecialImage.cpp",
+ "src/core/SkSpecialSurface.cpp",
+ "src/core/SkSpinlock.cpp",
+ "src/core/SkSpriteBlitter_ARGB32.cpp",
+ "src/core/SkSpriteBlitter_RGB565.cpp",
+ "src/core/SkStream.cpp",
+ "src/core/SkStrikeCache.cpp",
+ "src/core/SkStrikeForGPU.cpp",
+ "src/core/SkStrikeSpec.cpp",
+ "src/core/SkString.cpp",
+ "src/core/SkStringUtils.cpp",
+ "src/core/SkStroke.cpp",
+ "src/core/SkStrokeRec.cpp",
+ "src/core/SkStrokerPriv.cpp",
+ "src/core/SkSurfaceCharacterization.cpp",
+ "src/core/SkSwizzle.cpp",
+ "src/core/SkTSearch.cpp",
+ "src/core/SkTaskGroup.cpp",
+ "src/core/SkTextBlob.cpp",
+ "src/core/SkTextBlobTrace.cpp",
+ "src/core/SkThreadID.cpp",
+ "src/core/SkTime.cpp",
+ "src/core/SkTypeface.cpp",
+ "src/core/SkTypefaceCache.cpp",
+ "src/core/SkTypeface_remote.cpp",
+ "src/core/SkUnPreMultiply.cpp",
+ "src/core/SkUtils.cpp",
+ "src/core/SkVM.cpp",
+ "src/core/SkVMBlitter.cpp",
+ "src/core/SkVertState.cpp",
+ "src/core/SkVertices.cpp",
+ "src/core/SkWriteBuffer.cpp",
+ "src/core/SkWriter32.cpp",
+ "src/core/SkXfermode.cpp",
+ "src/core/SkXfermodeInterpretation.cpp",
+ "src/core/SkYUVAInfo.cpp",
+ "src/core/SkYUVAPixmaps.cpp",
+ "src/core/SkYUVMath.cpp",
+ "src/core/SkYUVPlanesCache.cpp",
+ "src/effects/Sk1DPathEffect.cpp",
+ "src/effects/Sk2DPathEffect.cpp",
+ "src/effects/SkColorMatrix.cpp",
+ "src/effects/SkColorMatrixFilter.cpp",
+ "src/effects/SkCornerPathEffect.cpp",
+ "src/effects/SkDashPathEffect.cpp",
+ "src/effects/SkDiscretePathEffect.cpp",
+ "src/effects/SkEmbossMask.cpp",
+ "src/effects/SkEmbossMaskFilter.cpp",
+ "src/effects/SkHighContrastFilter.cpp",
+ "src/effects/SkLayerDrawLooper.cpp",
+ "src/effects/SkLumaColorFilter.cpp",
+ "src/effects/SkOpPathEffect.cpp",
+ "src/effects/SkOverdrawColorFilter.cpp",
+ "src/effects/SkShaderMaskFilter.cpp",
+ "src/effects/SkTableColorFilter.cpp",
+ "src/effects/SkTableMaskFilter.cpp",
+ "src/effects/SkTrimPathEffect.cpp",
+ "src/effects/imagefilters/SkAlphaThresholdImageFilter.cpp",
+ "src/effects/imagefilters/SkArithmeticImageFilter.cpp",
+ "src/effects/imagefilters/SkBlendImageFilter.cpp",
+ "src/effects/imagefilters/SkBlurImageFilter.cpp",
+ "src/effects/imagefilters/SkColorFilterImageFilter.cpp",
+ "src/effects/imagefilters/SkComposeImageFilter.cpp",
+ "src/effects/imagefilters/SkDisplacementMapImageFilter.cpp",
+ "src/effects/imagefilters/SkDropShadowImageFilter.cpp",
+ "src/effects/imagefilters/SkImageImageFilter.cpp",
+ "src/effects/imagefilters/SkLightingImageFilter.cpp",
+ "src/effects/imagefilters/SkMagnifierImageFilter.cpp",
+ "src/effects/imagefilters/SkMatrixConvolutionImageFilter.cpp",
+ "src/effects/imagefilters/SkMergeImageFilter.cpp",
+ "src/effects/imagefilters/SkMorphologyImageFilter.cpp",
+ "src/effects/imagefilters/SkOffsetImageFilter.cpp",
+ "src/effects/imagefilters/SkPictureImageFilter.cpp",
+ "src/effects/imagefilters/SkShaderImageFilter.cpp",
+ "src/effects/imagefilters/SkTileImageFilter.cpp",
+ "src/image/SkImage.cpp",
+ "src/image/SkImage_Lazy.cpp",
+ "src/image/SkImage_Raster.cpp",
+ "src/image/SkRescaleAndReadPixels.cpp",
+ "src/image/SkSurface.cpp",
+ "src/image/SkSurface_Raster.cpp",
+ "src/images/SkImageEncoder.cpp",
+ "src/images/SkJPEGWriteUtility.cpp",
+ "src/images/SkJpegEncoder.cpp",
+ "src/images/SkPngEncoder.cpp",
+ "src/images/SkWebpEncoder.cpp",
+ "src/lazy/SkDiscardableMemoryPool.cpp",
+ "src/pathops/SkAddIntersections.cpp",
+ "src/pathops/SkDConicLineIntersection.cpp",
+ "src/pathops/SkDCubicLineIntersection.cpp",
+ "src/pathops/SkDCubicToQuads.cpp",
+ "src/pathops/SkDLineIntersection.cpp",
+ "src/pathops/SkDQuadLineIntersection.cpp",
+ "src/pathops/SkIntersections.cpp",
+ "src/pathops/SkOpAngle.cpp",
+ "src/pathops/SkOpBuilder.cpp",
+ "src/pathops/SkOpCoincidence.cpp",
+ "src/pathops/SkOpContour.cpp",
+ "src/pathops/SkOpCubicHull.cpp",
+ "src/pathops/SkOpEdgeBuilder.cpp",
+ "src/pathops/SkOpSegment.cpp",
+ "src/pathops/SkOpSpan.cpp",
+ "src/pathops/SkPathOpsAsWinding.cpp",
+ "src/pathops/SkPathOpsCommon.cpp",
+ "src/pathops/SkPathOpsConic.cpp",
+ "src/pathops/SkPathOpsCubic.cpp",
+ "src/pathops/SkPathOpsCurve.cpp",
+ "src/pathops/SkPathOpsDebug.cpp",
+ "src/pathops/SkPathOpsLine.cpp",
+ "src/pathops/SkPathOpsOp.cpp",
+ "src/pathops/SkPathOpsQuad.cpp",
+ "src/pathops/SkPathOpsRect.cpp",
+ "src/pathops/SkPathOpsSimplify.cpp",
+ "src/pathops/SkPathOpsTSect.cpp",
+ "src/pathops/SkPathOpsTightBounds.cpp",
+ "src/pathops/SkPathOpsTypes.cpp",
+ "src/pathops/SkPathOpsWinding.cpp",
+ "src/pathops/SkPathWriter.cpp",
+ "src/pathops/SkReduceOrder.cpp",
+ "src/pdf/SkClusterator.cpp",
+ "src/pdf/SkDeflate.cpp",
+ "src/pdf/SkJpegInfo.cpp",
+ "src/pdf/SkKeyedImage.cpp",
+ "src/pdf/SkPDFBitmap.cpp",
+ "src/pdf/SkPDFDevice.cpp",
+ "src/pdf/SkPDFDocument.cpp",
+ "src/pdf/SkPDFFont.cpp",
+ "src/pdf/SkPDFFormXObject.cpp",
+ "src/pdf/SkPDFGradientShader.cpp",
+ "src/pdf/SkPDFGraphicStackState.cpp",
+ "src/pdf/SkPDFGraphicState.cpp",
+ "src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp",
+ "src/pdf/SkPDFMakeToUnicodeCmap.cpp",
+ "src/pdf/SkPDFMetadata.cpp",
+ "src/pdf/SkPDFResourceDict.cpp",
+ "src/pdf/SkPDFShader.cpp",
+ "src/pdf/SkPDFSubsetFont.cpp",
+ "src/pdf/SkPDFTag.cpp",
+ "src/pdf/SkPDFType1Font.cpp",
+ "src/pdf/SkPDFTypes.cpp",
+ "src/pdf/SkPDFUtils.cpp",
+ "src/ports/SkDiscardableMemory_none.cpp",
+ "src/ports/SkFontHost_FreeType.cpp",
+ "src/ports/SkFontHost_FreeType_common.cpp",
+ "src/ports/SkFontMgr_custom.cpp",
+ "src/ports/SkFontMgr_custom_empty.cpp",
+ "src/ports/SkFontMgr_custom_empty_factory.cpp",
+ "src/ports/SkGlobalInitialization_default.cpp",
+ "src/ports/SkImageGenerator_skia.cpp",
+ "src/ports/SkMemory_malloc.cpp",
+ "src/ports/SkOSFile_stdio.cpp",
+ "src/sfnt/SkOTTable_name.cpp",
+ "src/sfnt/SkOTUtils.cpp",
+ "src/shaders/SkBitmapProcShader.cpp",
+ "src/shaders/SkColorFilterShader.cpp",
+ "src/shaders/SkColorShader.cpp",
+ "src/shaders/SkComposeShader.cpp",
+ "src/shaders/SkImageShader.cpp",
+ "src/shaders/SkLocalMatrixShader.cpp",
+ "src/shaders/SkPerlinNoiseShader.cpp",
+ "src/shaders/SkPictureShader.cpp",
+ "src/shaders/SkShader.cpp",
+ "src/shaders/gradients/Sk4fGradientBase.cpp",
+ "src/shaders/gradients/Sk4fLinearGradient.cpp",
+ "src/shaders/gradients/SkGradientShader.cpp",
+ "src/shaders/gradients/SkLinearGradient.cpp",
+ "src/shaders/gradients/SkRadialGradient.cpp",
+ "src/shaders/gradients/SkSweepGradient.cpp",
+ "src/shaders/gradients/SkTwoPointConicalGradient.cpp",
+ "src/sksl/SkSLASTNode.cpp",
+ "src/sksl/SkSLAnalysis.cpp",
+ "src/sksl/SkSLBuiltinTypes.cpp",
+ "src/sksl/SkSLCompiler.cpp",
+ "src/sksl/SkSLConstantFolder.cpp",
+ "src/sksl/SkSLContext.cpp",
+ "src/sksl/SkSLDehydrator.cpp",
+ "src/sksl/SkSLIRGenerator.cpp",
+ "src/sksl/SkSLInliner.cpp",
+ "src/sksl/SkSLLexer.cpp",
+ "src/sksl/SkSLMangler.cpp",
+ "src/sksl/SkSLOperators.cpp",
+ "src/sksl/SkSLOutputStream.cpp",
+ "src/sksl/SkSLParser.cpp",
+ "src/sksl/SkSLPool.cpp",
+ "src/sksl/SkSLRehydrator.cpp",
+ "src/sksl/SkSLSampleUsage.cpp",
+ "src/sksl/SkSLSectionAndParameterHelper.cpp",
+ "src/sksl/SkSLString.cpp",
+ "src/sksl/SkSLUtil.cpp",
+ "src/sksl/codegen/SkSLVMCodeGenerator.cpp",
+ "src/sksl/dsl/DSLBlock.cpp",
+ "src/sksl/dsl/DSLCase.cpp",
+ "src/sksl/dsl/DSLCore.cpp",
+ "src/sksl/dsl/DSLExpression.cpp",
+ "src/sksl/dsl/DSLFunction.cpp",
+ "src/sksl/dsl/DSLLayout.cpp",
+ "src/sksl/dsl/DSLRuntimeEffects.cpp",
+ "src/sksl/dsl/DSLStatement.cpp",
+ "src/sksl/dsl/DSLType.cpp",
+ "src/sksl/dsl/DSLVar.cpp",
+ "src/sksl/dsl/priv/DSLFPs.cpp",
+ "src/sksl/dsl/priv/DSLWriter.cpp",
+ "src/sksl/ir/SkSLBinaryExpression.cpp",
+ "src/sksl/ir/SkSLBlock.cpp",
+ "src/sksl/ir/SkSLConstructor.cpp",
+ "src/sksl/ir/SkSLConstructorArray.cpp",
+ "src/sksl/ir/SkSLConstructorCompound.cpp",
+ "src/sksl/ir/SkSLConstructorCompoundCast.cpp",
+ "src/sksl/ir/SkSLConstructorDiagonalMatrix.cpp",
+ "src/sksl/ir/SkSLConstructorMatrixResize.cpp",
+ "src/sksl/ir/SkSLConstructorScalarCast.cpp",
+ "src/sksl/ir/SkSLConstructorSplat.cpp",
+ "src/sksl/ir/SkSLConstructorStruct.cpp",
+ "src/sksl/ir/SkSLDoStatement.cpp",
+ "src/sksl/ir/SkSLExpressionStatement.cpp",
+ "src/sksl/ir/SkSLFieldAccess.cpp",
+ "src/sksl/ir/SkSLForStatement.cpp",
+ "src/sksl/ir/SkSLFunctionCall.cpp",
+ "src/sksl/ir/SkSLFunctionDeclaration.cpp",
+ "src/sksl/ir/SkSLIfStatement.cpp",
+ "src/sksl/ir/SkSLIndexExpression.cpp",
+ "src/sksl/ir/SkSLPostfixExpression.cpp",
+ "src/sksl/ir/SkSLPrefixExpression.cpp",
+ "src/sksl/ir/SkSLSetting.cpp",
+ "src/sksl/ir/SkSLSwitchStatement.cpp",
+ "src/sksl/ir/SkSLSwizzle.cpp",
+ "src/sksl/ir/SkSLSymbolTable.cpp",
+ "src/sksl/ir/SkSLTernaryExpression.cpp",
+ "src/sksl/ir/SkSLType.cpp",
+ "src/sksl/ir/SkSLVarDeclarations.cpp",
+ "src/sksl/ir/SkSLVariable.cpp",
+ "src/sksl/ir/SkSLVariableReference.cpp",
+ "src/svg/SkSVGCanvas.cpp",
+ "src/svg/SkSVGDevice.cpp",
+ "src/utils/SkAnimCodecPlayer.cpp",
+ "src/utils/SkBase64.cpp",
+ "src/utils/SkCamera.cpp",
+ "src/utils/SkCanvasStack.cpp",
+ "src/utils/SkCanvasStateUtils.cpp",
+ "src/utils/SkCharToGlyphCache.cpp",
+ "src/utils/SkClipStackUtils.cpp",
+ "src/utils/SkCustomTypeface.cpp",
+ "src/utils/SkDashPath.cpp",
+ "src/utils/SkEventTracer.cpp",
+ "src/utils/SkFloatToDecimal.cpp",
+ "src/utils/SkJSON.cpp",
+ "src/utils/SkJSONWriter.cpp",
+ "src/utils/SkMatrix22.cpp",
+ "src/utils/SkMultiPictureDocument.cpp",
+ "src/utils/SkNWayCanvas.cpp",
+ "src/utils/SkNullCanvas.cpp",
+ "src/utils/SkOSPath.cpp",
+ "src/utils/SkOrderedFontMgr.cpp",
+ "src/utils/SkPaintFilterCanvas.cpp",
+ "src/utils/SkParse.cpp",
+ "src/utils/SkParseColor.cpp",
+ "src/utils/SkParsePath.cpp",
+ "src/utils/SkPatchUtils.cpp",
+ "src/utils/SkPolyUtils.cpp",
+ "src/utils/SkShadowTessellator.cpp",
+ "src/utils/SkShadowUtils.cpp",
+ "src/utils/SkShaperJSONWriter.cpp",
+ "src/utils/SkTextUtils.cpp",
+ "src/utils/SkThreadUtils_pthread.cpp",
+ "src/utils/SkThreadUtils_win.cpp",
+ "src/utils/SkUTF.cpp",
+ "src/utils/mac/SkCTFont.cpp",
+ "src/utils/mac/SkCreateCGImageRef.cpp",
+ "src/utils/win/SkAutoCoInitialize.cpp",
+ "src/utils/win/SkDWrite.cpp",
+ "src/utils/win/SkDWriteFontFileStream.cpp",
+ "src/utils/win/SkDWriteGeometrySink.cpp",
+ "src/utils/win/SkHRESULT.cpp",
+ "src/utils/win/SkIStream.cpp",
+ "src/utils/win/SkWGL_win.cpp",
+ "src/xml/SkDOM.cpp",
+ "src/xml/SkXMLParser.cpp",
+ "src/xml/SkXMLWriter.cpp",
+ "third_party/libgifcodec/SkGifImageReader.cpp",
+ "third_party/libgifcodec/SkLibGifCodec.cpp",
+ "third_party/skcms/skcms.cc",
+ ],
+
+ target: {
+ android: {
+ srcs: [
+ "src/codec/SkHeifCodec.cpp",
+ "src/codec/SkRawCodec.cpp",
+ "src/gpu/GrAATriangulator.cpp",
+ "src/gpu/GrAHardwareBufferImageGenerator.cpp",
+ "src/gpu/GrAHardwareBufferUtils.cpp",
+ "src/gpu/GrAttachment.cpp",
+ "src/gpu/GrAuditTrail.cpp",
+ "src/gpu/GrBackendSemaphore.cpp",
+ "src/gpu/GrBackendSurface.cpp",
+ "src/gpu/GrBackendSurfaceMutableState.cpp",
+ "src/gpu/GrBackendTextureImageGenerator.cpp",
+ "src/gpu/GrBackendUtils.cpp",
+ "src/gpu/GrBlockAllocator.cpp",
+ "src/gpu/GrBlurUtils.cpp",
+ "src/gpu/GrBufferAllocPool.cpp",
+ "src/gpu/GrCaps.cpp",
+ "src/gpu/GrClientMappedBufferManager.cpp",
+ "src/gpu/GrClipStack.cpp",
+ "src/gpu/GrClipStackClip.cpp",
+ "src/gpu/GrColorInfo.cpp",
+ "src/gpu/GrColorSpaceXform.cpp",
+ "src/gpu/GrContextThreadSafeProxy.cpp",
+ "src/gpu/GrContext_Base.cpp",
+ "src/gpu/GrCopyRenderTask.cpp",
+ "src/gpu/GrDDLContext.cpp",
+ "src/gpu/GrDDLTask.cpp",
+ "src/gpu/GrDataUtils.cpp",
+ "src/gpu/GrDefaultGeoProcFactory.cpp",
+ "src/gpu/GrDirectContext.cpp",
+ "src/gpu/GrDirectContextPriv.cpp",
+ "src/gpu/GrDistanceFieldGenFromVector.cpp",
+ "src/gpu/GrDrawOpAtlas.cpp",
+ "src/gpu/GrDrawOpTest.cpp",
+ "src/gpu/GrDrawingManager.cpp",
+ "src/gpu/GrDriverBugWorkarounds.cpp",
+ "src/gpu/GrDynamicAtlas.cpp",
+ "src/gpu/GrFinishCallbacks.cpp",
+ "src/gpu/GrFixedClip.cpp",
+ "src/gpu/GrFragmentProcessor.cpp",
+ "src/gpu/GrGeometryProcessor.cpp",
+ "src/gpu/GrGpu.cpp",
+ "src/gpu/GrGpuBuffer.cpp",
+ "src/gpu/GrGpuResource.cpp",
+ "src/gpu/GrImageContext.cpp",
+ "src/gpu/GrManagedResource.cpp",
+ "src/gpu/GrMemoryPool.cpp",
+ "src/gpu/GrOnFlushResourceProvider.cpp",
+ "src/gpu/GrOpFlushState.cpp",
+ "src/gpu/GrOpsRenderPass.cpp",
+ "src/gpu/GrOpsTask.cpp",
+ "src/gpu/GrPaint.cpp",
+ "src/gpu/GrPathRenderer.cpp",
+ "src/gpu/GrPathRendererChain.cpp",
+ "src/gpu/GrPersistentCacheUtils.cpp",
+ "src/gpu/GrPipeline.cpp",
+ "src/gpu/GrProcessor.cpp",
+ "src/gpu/GrProcessorAnalysis.cpp",
+ "src/gpu/GrProcessorSet.cpp",
+ "src/gpu/GrProcessorUnitTest.cpp",
+ "src/gpu/GrProgramDesc.cpp",
+ "src/gpu/GrProgramInfo.cpp",
+ "src/gpu/GrProxyProvider.cpp",
+ "src/gpu/GrRecordingContext.cpp",
+ "src/gpu/GrRecordingContextPriv.cpp",
+ "src/gpu/GrRectanizerPow2.cpp",
+ "src/gpu/GrRectanizerSkyline.cpp",
+ "src/gpu/GrReducedClip.cpp",
+ "src/gpu/GrRenderTarget.cpp",
+ "src/gpu/GrRenderTargetProxy.cpp",
+ "src/gpu/GrRenderTask.cpp",
+ "src/gpu/GrRenderTaskCluster.cpp",
+ "src/gpu/GrResourceAllocator.cpp",
+ "src/gpu/GrResourceCache.cpp",
+ "src/gpu/GrResourceProvider.cpp",
+ "src/gpu/GrRingBuffer.cpp",
+ "src/gpu/GrSPIRVUniformHandler.cpp",
+ "src/gpu/GrSPIRVVaryingHandler.cpp",
+ "src/gpu/GrSWMaskHelper.cpp",
+ "src/gpu/GrShaderCaps.cpp",
+ "src/gpu/GrShaderUtils.cpp",
+ "src/gpu/GrShaderVar.cpp",
+ "src/gpu/GrSoftwarePathRenderer.cpp",
+ "src/gpu/GrStagingBufferManager.cpp",
+ "src/gpu/GrStencilMaskHelper.cpp",
+ "src/gpu/GrStencilSettings.cpp",
+ "src/gpu/GrStyle.cpp",
+ "src/gpu/GrSubRunAllocator.cpp",
+ "src/gpu/GrSurface.cpp",
+ "src/gpu/GrSurfaceContext.cpp",
+ "src/gpu/GrSurfaceDrawContext.cpp",
+ "src/gpu/GrSurfaceFillContext.cpp",
+ "src/gpu/GrSurfaceProxy.cpp",
+ "src/gpu/GrSwizzle.cpp",
+ "src/gpu/GrTestUtils.cpp",
+ "src/gpu/GrTexture.cpp",
+ "src/gpu/GrTextureProxy.cpp",
+ "src/gpu/GrTextureRenderTargetProxy.cpp",
+ "src/gpu/GrTextureResolveRenderTask.cpp",
+ "src/gpu/GrThreadSafeCache.cpp",
+ "src/gpu/GrThreadSafePipelineBuilder.cpp",
+ "src/gpu/GrTransferFromRenderTask.cpp",
+ "src/gpu/GrTriangulator.cpp",
+ "src/gpu/GrUniformDataManager.cpp",
+ "src/gpu/GrUtil.cpp",
+ "src/gpu/GrWaitRenderTask.cpp",
+ "src/gpu/GrWritePixelsRenderTask.cpp",
+ "src/gpu/GrXferProcessor.cpp",
+ "src/gpu/GrYUVABackendTextures.cpp",
+ "src/gpu/GrYUVATextureProxies.cpp",
+ "src/gpu/SkGpuDevice.cpp",
+ "src/gpu/SkGpuDevice_drawTexture.cpp",
+ "src/gpu/SkGr.cpp",
+ "src/gpu/ccpr/GrCCAtlas.cpp",
+ "src/gpu/ccpr/GrCCClipPath.cpp",
+ "src/gpu/ccpr/GrCCClipProcessor.cpp",
+ "src/gpu/ccpr/GrCCPerFlushResources.cpp",
+ "src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp",
+ "src/gpu/effects/GrBezierEffect.cpp",
+ "src/gpu/effects/GrBicubicEffect.cpp",
+ "src/gpu/effects/GrBitmapTextGeoProc.cpp",
+ "src/gpu/effects/GrBlendFragmentProcessor.cpp",
+ "src/gpu/effects/GrConvexPolyEffect.cpp",
+ "src/gpu/effects/GrCoverageSetOpXP.cpp",
+ "src/gpu/effects/GrCustomXfermode.cpp",
+ "src/gpu/effects/GrDisableColorXP.cpp",
+ "src/gpu/effects/GrDistanceFieldGeoProc.cpp",
+ "src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp",
+ "src/gpu/effects/GrMatrixConvolutionEffect.cpp",
+ "src/gpu/effects/GrMatrixEffect.cpp",
+ "src/gpu/effects/GrOvalEffect.cpp",
+ "src/gpu/effects/GrPorterDuffXferProcessor.cpp",
+ "src/gpu/effects/GrRRectEffect.cpp",
+ "src/gpu/effects/GrShadowGeoProc.cpp",
+ "src/gpu/effects/GrSkSLFP.cpp",
+ "src/gpu/effects/GrTextureEffect.cpp",
+ "src/gpu/effects/GrYUVtoRGBEffect.cpp",
+ "src/gpu/effects/generated/GrAARectEffect.cpp",
+ "src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.cpp",
+ "src/gpu/effects/generated/GrArithmeticProcessor.cpp",
+ "src/gpu/effects/generated/GrBlurredEdgeFragmentProcessor.cpp",
+ "src/gpu/effects/generated/GrCircleBlurFragmentProcessor.cpp",
+ "src/gpu/effects/generated/GrCircleEffect.cpp",
+ "src/gpu/effects/generated/GrClampFragmentProcessor.cpp",
+ "src/gpu/effects/generated/GrColorMatrixFragmentProcessor.cpp",
+ "src/gpu/effects/generated/GrConfigConversionEffect.cpp",
+ "src/gpu/effects/generated/GrDeviceSpaceEffect.cpp",
+ "src/gpu/effects/generated/GrDitherEffect.cpp",
+ "src/gpu/effects/generated/GrEllipseEffect.cpp",
+ "src/gpu/effects/generated/GrHSLToRGBFilterEffect.cpp",
+ "src/gpu/effects/generated/GrMagnifierEffect.cpp",
+ "src/gpu/effects/generated/GrOverrideInputFragmentProcessor.cpp",
+ "src/gpu/effects/generated/GrRGBToHSLFilterEffect.cpp",
+ "src/gpu/effects/generated/GrRRectBlurEffect.cpp",
+ "src/gpu/effects/generated/GrRectBlurEffect.cpp",
+ "src/gpu/geometry/GrPathUtils.cpp",
+ "src/gpu/geometry/GrQuad.cpp",
+ "src/gpu/geometry/GrQuadUtils.cpp",
+ "src/gpu/geometry/GrShape.cpp",
+ "src/gpu/geometry/GrStyledShape.cpp",
+ "src/gpu/gl/GrGLAssembleGLESInterfaceAutogen.cpp",
+ "src/gpu/gl/GrGLAssembleGLInterfaceAutogen.cpp",
+ "src/gpu/gl/GrGLAssembleHelpers.cpp",
+ "src/gpu/gl/GrGLAssembleInterface.cpp",
+ "src/gpu/gl/GrGLAssembleWebGLInterfaceAutogen.cpp",
+ "src/gpu/gl/GrGLAttachment.cpp",
+ "src/gpu/gl/GrGLBuffer.cpp",
+ "src/gpu/gl/GrGLCaps.cpp",
+ "src/gpu/gl/GrGLContext.cpp",
+ "src/gpu/gl/GrGLExtensions.cpp",
+ "src/gpu/gl/GrGLGLSL.cpp",
+ "src/gpu/gl/GrGLGpu.cpp",
+ "src/gpu/gl/GrGLGpuProgramCache.cpp",
+ "src/gpu/gl/GrGLInterfaceAutogen.cpp",
+ "src/gpu/gl/GrGLOpsRenderPass.cpp",
+ "src/gpu/gl/GrGLProgram.cpp",
+ "src/gpu/gl/GrGLProgramDataManager.cpp",
+ "src/gpu/gl/GrGLRenderTarget.cpp",
+ "src/gpu/gl/GrGLSemaphore.cpp",
+ "src/gpu/gl/GrGLTexture.cpp",
+ "src/gpu/gl/GrGLTextureRenderTarget.cpp",
+ "src/gpu/gl/GrGLTypesPriv.cpp",
+ "src/gpu/gl/GrGLUniformHandler.cpp",
+ "src/gpu/gl/GrGLUtil.cpp",
+ "src/gpu/gl/GrGLVertexArray.cpp",
+ "src/gpu/gl/builders/GrGLProgramBuilder.cpp",
+ "src/gpu/gl/builders/GrGLShaderStringBuilder.cpp",
+ "src/gpu/gl/egl/GrGLMakeEGLInterface.cpp",
+ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp",
+ "src/gpu/glsl/GrGLSL.cpp",
+ "src/gpu/glsl/GrGLSLBlend.cpp",
+ "src/gpu/glsl/GrGLSLFragmentProcessor.cpp",
+ "src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp",
+ "src/gpu/glsl/GrGLSLGeometryProcessor.cpp",
+ "src/gpu/glsl/GrGLSLProgramBuilder.cpp",
+ "src/gpu/glsl/GrGLSLProgramDataManager.cpp",
+ "src/gpu/glsl/GrGLSLShaderBuilder.cpp",
+ "src/gpu/glsl/GrGLSLUniformHandler.cpp",
+ "src/gpu/glsl/GrGLSLVarying.cpp",
+ "src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp",
+ "src/gpu/glsl/GrGLSLXferProcessor.cpp",
+ "src/gpu/gradients/GrGradientBitmapCache.cpp",
+ "src/gpu/gradients/GrGradientShader.cpp",
+ "src/gpu/gradients/generated/GrClampedGradientEffect.cpp",
+ "src/gpu/gradients/generated/GrDualIntervalGradientColorizer.cpp",
+ "src/gpu/gradients/generated/GrLinearGradientLayout.cpp",
+ "src/gpu/gradients/generated/GrRadialGradientLayout.cpp",
+ "src/gpu/gradients/generated/GrSingleIntervalGradientColorizer.cpp",
+ "src/gpu/gradients/generated/GrSweepGradientLayout.cpp",
+ "src/gpu/gradients/generated/GrTiledGradientEffect.cpp",
+ "src/gpu/gradients/generated/GrTwoPointConicalGradientLayout.cpp",
+ "src/gpu/gradients/generated/GrUnrolledBinaryGradientColorizer.cpp",
+ "src/gpu/mock/GrMockCaps.cpp",
+ "src/gpu/mock/GrMockGpu.cpp",
+ "src/gpu/mock/GrMockTypes.cpp",
+ "src/gpu/ops/GrAAConvexPathRenderer.cpp",
+ "src/gpu/ops/GrAAConvexTessellator.cpp",
+ "src/gpu/ops/GrAAHairLinePathRenderer.cpp",
+ "src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp",
+ "src/gpu/ops/GrAtlasTextOp.cpp",
+ "src/gpu/ops/GrClearOp.cpp",
+ "src/gpu/ops/GrDashLinePathRenderer.cpp",
+ "src/gpu/ops/GrDashOp.cpp",
+ "src/gpu/ops/GrDefaultPathRenderer.cpp",
+ "src/gpu/ops/GrDrawAtlasOp.cpp",
+ "src/gpu/ops/GrDrawVerticesOp.cpp",
+ "src/gpu/ops/GrDrawableOp.cpp",
+ "src/gpu/ops/GrFillRRectOp.cpp",
+ "src/gpu/ops/GrFillRectOp.cpp",
+ "src/gpu/ops/GrLatticeOp.cpp",
+ "src/gpu/ops/GrMeshDrawOp.cpp",
+ "src/gpu/ops/GrOp.cpp",
+ "src/gpu/ops/GrOvalOpFactory.cpp",
+ "src/gpu/ops/GrQuadPerEdgeAA.cpp",
+ "src/gpu/ops/GrRegionOp.cpp",
+ "src/gpu/ops/GrShadowRRectOp.cpp",
+ "src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp",
+ "src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.cpp",
+ "src/gpu/ops/GrSmallPathAtlasMgr.cpp",
+ "src/gpu/ops/GrSmallPathRenderer.cpp",
+ "src/gpu/ops/GrSmallPathShapeData.cpp",
+ "src/gpu/ops/GrStrokeRectOp.cpp",
+ "src/gpu/ops/GrTextureOp.cpp",
+ "src/gpu/ops/GrTriangulatingPathRenderer.cpp",
+ "src/gpu/tessellate/GrDrawAtlasPathOp.cpp",
+ "src/gpu/tessellate/GrFillPathShader.cpp",
+ "src/gpu/tessellate/GrPathInnerTriangulateOp.cpp",
+ "src/gpu/tessellate/GrPathStencilFillOp.cpp",
+ "src/gpu/tessellate/GrPathTessellator.cpp",
+ "src/gpu/tessellate/GrStencilPathShader.cpp",
+ "src/gpu/tessellate/GrStrokeFixedCountTessellator.cpp",
+ "src/gpu/tessellate/GrStrokeHardwareTessellator.cpp",
+ "src/gpu/tessellate/GrStrokeIndirectTessellator.cpp",
+ "src/gpu/tessellate/GrStrokeTessellateOp.cpp",
+ "src/gpu/tessellate/GrStrokeTessellateShader.cpp",
+ "src/gpu/tessellate/GrTessellationPathRenderer.cpp",
+ "src/gpu/text/GrAtlasManager.cpp",
+ "src/gpu/text/GrDistanceFieldAdjustTable.cpp",
+ "src/gpu/text/GrSDFMaskFilter.cpp",
+ "src/gpu/text/GrSDFTControl.cpp",
+ "src/gpu/text/GrStrikeCache.cpp",
+ "src/gpu/text/GrTextBlob.cpp",
+ "src/gpu/text/GrTextBlobCache.cpp",
+ "src/gpu/vk/GrVkAMDMemoryAllocator.cpp",
+ "src/gpu/vk/GrVkAttachment.cpp",
+ "src/gpu/vk/GrVkBuffer.cpp",
+ "src/gpu/vk/GrVkCaps.cpp",
+ "src/gpu/vk/GrVkCommandBuffer.cpp",
+ "src/gpu/vk/GrVkCommandPool.cpp",
+ "src/gpu/vk/GrVkDescriptorPool.cpp",
+ "src/gpu/vk/GrVkDescriptorSet.cpp",
+ "src/gpu/vk/GrVkDescriptorSetManager.cpp",
+ "src/gpu/vk/GrVkExtensions.cpp",
+ "src/gpu/vk/GrVkFramebuffer.cpp",
+ "src/gpu/vk/GrVkGpu.cpp",
+ "src/gpu/vk/GrVkImage.cpp",
+ "src/gpu/vk/GrVkImageView.cpp",
+ "src/gpu/vk/GrVkInterface.cpp",
+ "src/gpu/vk/GrVkMSAALoadManager.cpp",
+ "src/gpu/vk/GrVkMemory.cpp",
+ "src/gpu/vk/GrVkOpsRenderPass.cpp",
+ "src/gpu/vk/GrVkPipeline.cpp",
+ "src/gpu/vk/GrVkPipelineState.cpp",
+ "src/gpu/vk/GrVkPipelineStateBuilder.cpp",
+ "src/gpu/vk/GrVkPipelineStateCache.cpp",
+ "src/gpu/vk/GrVkPipelineStateDataManager.cpp",
+ "src/gpu/vk/GrVkRenderPass.cpp",
+ "src/gpu/vk/GrVkRenderTarget.cpp",
+ "src/gpu/vk/GrVkResourceProvider.cpp",
+ "src/gpu/vk/GrVkSampler.cpp",
+ "src/gpu/vk/GrVkSamplerYcbcrConversion.cpp",
+ "src/gpu/vk/GrVkSecondaryCBDrawContext.cpp",
+ "src/gpu/vk/GrVkSemaphore.cpp",
+ "src/gpu/vk/GrVkTexture.cpp",
+ "src/gpu/vk/GrVkTextureRenderTarget.cpp",
+ "src/gpu/vk/GrVkTypesPriv.cpp",
+ "src/gpu/vk/GrVkUniformHandler.cpp",
+ "src/gpu/vk/GrVkUtil.cpp",
+ "src/gpu/vk/GrVkVaryingHandler.cpp",
+ "src/image/SkImage_Gpu.cpp",
+ "src/image/SkImage_GpuBase.cpp",
+ "src/image/SkImage_GpuYUVA.cpp",
+ "src/image/SkSurface_Gpu.cpp",
+ "src/ports/SkDebug_android.cpp",
+ "src/ports/SkOSFile_posix.cpp",
+ "src/ports/SkOSLibrary_posix.cpp",
+ "src/sksl/SkSLCPPUniformCTypes.cpp",
+ "src/sksl/codegen/SkSLCPPCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLDSLCPPCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLGLSLCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLHCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLMetalCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLPipelineStageCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp",
+ "src/sksl/codegen/SkSLSPIRVtoHLSL.cpp",
+ "tools/SkSharingProc.cpp",
+ ],
+ local_include_dirs: [
+ "android",
+ ],
+ export_include_dirs: [
+ "android",
+ ],
+ },
+ linux_glibc: {
+ cflags: [
+ "-mssse3",
+ ],
+ srcs: [
+ "src/codec/SkRawCodec.cpp",
+ "src/ports/SkDebug_stdio.cpp",
+ "src/ports/SkOSFile_posix.cpp",
+ "src/ports/SkOSLibrary_posix.cpp",
+ ],
+ local_include_dirs: [
+ "linux",
+ ],
+ export_include_dirs: [
+ "linux",
+ ],
+ },
+ darwin: {
+ cflags: [
+ "-mssse3",
+ ],
+ srcs: [
+ "src/codec/SkRawCodec.cpp",
+ "src/ports/SkDebug_stdio.cpp",
+ "src/ports/SkImageEncoder_CG.cpp",
+ "src/ports/SkImageGeneratorCG.cpp",
+ "src/ports/SkOSFile_posix.cpp",
+ "src/ports/SkOSLibrary_posix.cpp",
+ ],
+ local_include_dirs: [
+ "mac",
+ ],
+ export_include_dirs: [
+ "mac",
+ ],
+ },
+ windows: {
+ enabled: true,
+ cflags: [
+ "-mssse3",
+ "-Wno-unknown-pragmas",
+ ],
+ srcs: [
+ "src/ports/SkDebug_win.cpp",
+ "src/ports/SkImageEncoder_WIC.cpp",
+ "src/ports/SkImageGeneratorWIC.cpp",
+ "src/ports/SkOSFile_win.cpp",
+ "src/ports/SkOSLibrary_win.cpp",
+ ],
+ local_include_dirs: [
+ "win",
+ ],
+ export_include_dirs: [
+ "win",
+ ],
+ },
+ },
+
+ defaults: ["skia_deps",
+ "skia_pgo",
+ "skia_defaults",
+ ],
+}
+
+// Build libskia with PGO by default.
+// Location of PGO profile data is defined in build/soong/cc/pgo.go
+// and is separate from skia.
+// To turn it off, set ANDROID_PGO_NO_PROFILE_USE environment variable
+// or set enable_profile_use property to false.
+cc_defaults {
+ name: "skia_pgo",
+ pgo: {
+ instrumentation: true,
+ profile_file: "hwui/hwui.profdata",
+ benchmarks: ["hwui", "skia"],
+ enable_profile_use: true,
+ },
+}
+
+// "defaults" property to disable profile use for Skia tools and benchmarks.
+cc_defaults {
+ name: "skia_pgo_no_profile_use",
+ defaults: [
+ "skia_pgo",
+ ],
+ pgo: {
+ enable_profile_use: false,
+ },
+}
+
+cc_defaults {
+ // Subset of the larger "skia_deps", which includes only the dependencies
+ // needed for libskia_renderengine. Note that it includes libpng and libz
+ // for the purposes of MSKP captures, but we could instead leave it up to
+ // RenderEngine to provide its own SkSerializerProcs if another client
+ // wants an even smaller version of libskia.
+ name: "skia_renderengine_deps",
+ shared_libs: [
+ "libcutils",
+ "liblog",
+ "libpng",
+ "libz",
+ ],
+ static_libs: [
+ "libarect",
+ ],
+ group_static_libs: true,
+ target: {
+ android: {
+ shared_libs: [
+ "libEGL",
+ "libGLESv2",
+ "libvulkan",
+ "libnativewindow",
+ ],
+ export_shared_lib_headers: [
+ "libvulkan",
+ ],
+ },
+ },
+}
+
+cc_defaults {
+ name: "skia_deps",
+ defaults: ["skia_renderengine_deps"],
+ shared_libs: [
+ "libdng_sdk",
+ "libjpeg",
+ "libpiex",
+ "libexpat",
+ "libft2",
+ ],
+ static_libs: [
+ "libwebp-decode",
+ "libwebp-encode",
+ "libsfntly",
+ ],
+ target: {
+ android: {
+ shared_libs: [
+ "libheif",
+ ],
+ },
+ darwin: {
+ host_ldlibs: [
+ "-framework AppKit",
+ ],
+ },
+ windows: {
+ host_ldlibs: [
+ "-lgdi32",
+ "-loleaut32",
+ "-lole32",
+ "-lopengl32",
+ "-luuid",
+ "-lwindowscodecs",
+ ],
+ },
+ },
+}
+
+cc_defaults {
+ name: "skia_tool_deps",
+ defaults: [
+ "skia_deps",
+ "skia_pgo_no_profile_use"
+ ],
+ shared_libs: [
+ "libicu",
+ "libharfbuzz_ng",
+ ],
+ static_libs: [
+ "libskia",
+ ],
+ cflags: [
+ "-DSK_SHAPER_HARFBUZZ_AVAILABLE",
+ "-DSK_UNICODE_AVAILABLE",
+ "-Wno-implicit-fallthrough",
+ "-Wno-unused-parameter",
+ "-Wno-unused-variable",
+ ],
+ target: {
+ windows: {
+ enabled: true,
+ },
+ },
+}
+
+cc_test {
+ name: "skia_dm",
+
+ defaults: [
+ "skia_tool_deps"
+ ],
+
+ local_include_dirs: [
+ "",
+ "experimental/skrive/include/",
+ "include/third_party/skcms",
+ "include/third_party/vulkan/",
+ "modules/skottie/include/",
+ "modules/skottie/utils/",
+ "modules/svg/include/",
+ "third_party/libgifcodec/",
+ ],
+
+ srcs: [
+ "dm/DM.cpp",
+ "dm/DMGpuTestProcs.cpp",
+ "dm/DMJsonWriter.cpp",
+ "dm/DMSrcSink.cpp",
+ "experimental/skrive/src/Artboard.cpp",
+ "experimental/skrive/src/Color.cpp",
+ "experimental/skrive/src/Component.cpp",
+ "experimental/skrive/src/Drawable.cpp",
+ "experimental/skrive/src/Ellipse.cpp",
+ "experimental/skrive/src/Node.cpp",
+ "experimental/skrive/src/Paint.cpp",
+ "experimental/skrive/src/Rectangle.cpp",
+ "experimental/skrive/src/Shape.cpp",
+ "experimental/skrive/src/SkRive.cpp",
+ "experimental/skrive/src/reader/BinaryReader.cpp",
+ "experimental/skrive/src/reader/JsonReader.cpp",
+ "experimental/skrive/src/reader/StreamReader.cpp",
+ "experimental/skrive/tests/BinaryReader.cpp",
+ "experimental/skrive/tests/DomTypes.cpp",
+ "experimental/skrive/tests/JsonReader.cpp",
+ "gm/3d.cpp",
+ "gm/aaa.cpp",
+ "gm/aaclip.cpp",
+ "gm/aarecteffect.cpp",
+ "gm/aarectmodes.cpp",
+ "gm/aaxfermodes.cpp",
+ "gm/addarc.cpp",
+ "gm/all_bitmap_configs.cpp",
+ "gm/alpha_image.cpp",
+ "gm/alphagradients.cpp",
+ "gm/analytic_gradients.cpp",
+ "gm/androidblendmodes.cpp",
+ "gm/animated_gif.cpp",
+ "gm/animated_image_orientation.cpp",
+ "gm/animatedimageblurs.cpp",
+ "gm/anisotropic.cpp",
+ "gm/annotated_text.cpp",
+ "gm/arcofzorro.cpp",
+ "gm/arcto.cpp",
+ "gm/arithmode.cpp",
+ "gm/asyncrescaleandread.cpp",
+ "gm/b_119394958.cpp",
+ "gm/backdrop.cpp",
+ "gm/backdrop_imagefilter_croprect.cpp",
+ "gm/badpaint.cpp",
+ "gm/bc1_transparency.cpp",
+ "gm/beziereffects.cpp",
+ "gm/beziers.cpp",
+ "gm/bicubic.cpp",
+ "gm/bigblurs.cpp",
+ "gm/bigmatrix.cpp",
+ "gm/bigrect.cpp",
+ "gm/bigrrectaaeffect.cpp",
+ "gm/bigtext.cpp",
+ "gm/bigtileimagefilter.cpp",
+ "gm/bitmapcopy.cpp",
+ "gm/bitmapfilters.cpp",
+ "gm/bitmapimage.cpp",
+ "gm/bitmappremul.cpp",
+ "gm/bitmaprect.cpp",
+ "gm/bitmaprecttest.cpp",
+ "gm/bitmapshader.cpp",
+ "gm/bitmaptiled.cpp",
+ "gm/bleed.cpp",
+ "gm/blend.cpp",
+ "gm/blurcircles.cpp",
+ "gm/blurcircles2.cpp",
+ "gm/blurignorexform.cpp",
+ "gm/blurimagevmask.cpp",
+ "gm/blurpositioning.cpp",
+ "gm/blurquickreject.cpp",
+ "gm/blurrect.cpp",
+ "gm/blurredclippedcircle.cpp",
+ "gm/blurroundrect.cpp",
+ "gm/blurs.cpp",
+ "gm/blurtextsmallradii.cpp",
+ "gm/bmpfilterqualityrepeat.cpp",
+ "gm/bug5252.cpp",
+ "gm/bug530095.cpp",
+ "gm/bug615686.cpp",
+ "gm/bug6643.cpp",
+ "gm/bug6783.cpp",
+ "gm/bug9331.cpp",
+ "gm/cgm.c",
+ "gm/cgms.cpp",
+ "gm/circle_sizes.cpp",
+ "gm/circulararcs.cpp",
+ "gm/circularclips.cpp",
+ "gm/clear_swizzle.cpp",
+ "gm/clip_error.cpp",
+ "gm/clip_sierpinski_region.cpp",
+ "gm/clip_strokerect.cpp",
+ "gm/clipdrawdraw.cpp",
+ "gm/clippedbitmapshaders.cpp",
+ "gm/clockwise.cpp",
+ "gm/collapsepaths.cpp",
+ "gm/color4f.cpp",
+ "gm/coloremoji.cpp",
+ "gm/coloremoji_blendmodes.cpp",
+ "gm/colorfilteralpha8.cpp",
+ "gm/colorfilterimagefilter.cpp",
+ "gm/colorfilters.cpp",
+ "gm/colormatrix.cpp",
+ "gm/colorspace.cpp",
+ "gm/colorwheel.cpp",
+ "gm/colrv1.cpp",
+ "gm/complexclip.cpp",
+ "gm/complexclip2.cpp",
+ "gm/complexclip3.cpp",
+ "gm/complexclip4.cpp",
+ "gm/complexclip_blur_tiled.cpp",
+ "gm/composecolorfilter.cpp",
+ "gm/composeshader.cpp",
+ "gm/compositor_quads.cpp",
+ "gm/compressed_textures.cpp",
+ "gm/concavepaths.cpp",
+ "gm/conicpaths.cpp",
+ "gm/constcolorprocessor.cpp",
+ "gm/convex_all_line_paths.cpp",
+ "gm/convexpaths.cpp",
+ "gm/convexpolyclip.cpp",
+ "gm/convexpolyeffect.cpp",
+ "gm/copy_to_4444.cpp",
+ "gm/crbug_1041204.cpp",
+ "gm/crbug_1073670.cpp",
+ "gm/crbug_1086705.cpp",
+ "gm/crbug_1113794.cpp",
+ "gm/crbug_1139750.cpp",
+ "gm/crbug_1156804.cpp",
+ "gm/crbug_1162942.cpp",
+ "gm/crbug_1167277.cpp",
+ "gm/crbug_1174186.cpp",
+ "gm/crbug_1174354.cpp",
+ "gm/crbug_1177833.cpp",
+ "gm/crbug_224618.cpp",
+ "gm/crbug_691386.cpp",
+ "gm/crbug_788500.cpp",
+ "gm/crbug_847759.cpp",
+ "gm/crbug_884166.cpp",
+ "gm/crbug_887103.cpp",
+ "gm/crbug_892988.cpp",
+ "gm/crbug_899512.cpp",
+ "gm/crbug_905548.cpp",
+ "gm/crbug_908646.cpp",
+ "gm/crbug_913349.cpp",
+ "gm/crbug_918512.cpp",
+ "gm/crbug_938592.cpp",
+ "gm/crbug_946965.cpp",
+ "gm/crbug_947055.cpp",
+ "gm/crbug_996140.cpp",
+ "gm/croppedrects.cpp",
+ "gm/crosscontextimage.cpp",
+ "gm/cubicpaths.cpp",
+ "gm/daa.cpp",
+ "gm/dashcircle.cpp",
+ "gm/dashcubics.cpp",
+ "gm/dashing.cpp",
+ "gm/degeneratesegments.cpp",
+ "gm/dftext.cpp",
+ "gm/dftext_blob_persp.cpp",
+ "gm/discard.cpp",
+ "gm/displacement.cpp",
+ "gm/distantclip.cpp",
+ "gm/draw_bitmap_rect_skbug4374.cpp",
+ "gm/drawable.cpp",
+ "gm/drawatlas.cpp",
+ "gm/drawatlascolor.cpp",
+ "gm/drawbitmaprect.cpp",
+ "gm/drawglyphs.cpp",
+ "gm/drawimageset.cpp",
+ "gm/drawminibitmaprect.cpp",
+ "gm/drawquadset.cpp",
+ "gm/drawregion.cpp",
+ "gm/drawregionmodes.cpp",
+ "gm/dropshadowimagefilter.cpp",
+ "gm/drrect.cpp",
+ "gm/drrect_small_inner.cpp",
+ "gm/dsl_processor_test.cpp",
+ "gm/dstreadshuffle.cpp",
+ "gm/ducky_yuv_blend.cpp",
+ "gm/emboss.cpp",
+ "gm/emptypath.cpp",
+ "gm/encode.cpp",
+ "gm/encode_alpha_jpeg.cpp",
+ "gm/encode_color_types.cpp",
+ "gm/encode_platform.cpp",
+ "gm/encode_srgb.cpp",
+ "gm/exoticformats.cpp",
+ "gm/fadefilter.cpp",
+ "gm/fatpathfill.cpp",
+ "gm/filltypes.cpp",
+ "gm/filltypespersp.cpp",
+ "gm/filterbug.cpp",
+ "gm/filterfastbounds.cpp",
+ "gm/filterindiabox.cpp",
+ "gm/flippity.cpp",
+ "gm/fontcache.cpp",
+ "gm/fontmgr.cpp",
+ "gm/fontregen.cpp",
+ "gm/fontscaler.cpp",
+ "gm/fontscalerdistortable.cpp",
+ "gm/fp_sample_chaining.cpp",
+ "gm/fpcoordinateoverride.cpp",
+ "gm/fwidth_squircle.cpp",
+ "gm/gammatext.cpp",
+ "gm/getpostextpath.cpp",
+ "gm/giantbitmap.cpp",
+ "gm/glyph_pos.cpp",
+ "gm/gm.cpp",
+ "gm/gpu_blur_utils.cpp",
+ "gm/gradient_dirty_laundry.cpp",
+ "gm/gradient_matrix.cpp",
+ "gm/gradients.cpp",
+ "gm/gradients_2pt_conical.cpp",
+ "gm/gradients_degenerate.cpp",
+ "gm/gradients_no_texture.cpp",
+ "gm/gradtext.cpp",
+ "gm/grayscalejpg.cpp",
+ "gm/hairlines.cpp",
+ "gm/hairmodes.cpp",
+ "gm/hardstop_gradients.cpp",
+ "gm/highcontrastfilter.cpp",
+ "gm/hittestpath.cpp",
+ "gm/hsl.cpp",
+ "gm/hugepath.cpp",
+ "gm/image.cpp",
+ "gm/image_pict.cpp",
+ "gm/image_shader.cpp",
+ "gm/imagealphathreshold.cpp",
+ "gm/imageblur.cpp",
+ "gm/imageblur2.cpp",
+ "gm/imageblurclampmode.cpp",
+ "gm/imageblurrepeatmode.cpp",
+ "gm/imageblurtiled.cpp",
+ "gm/imagefilters.cpp",
+ "gm/imagefiltersbase.cpp",
+ "gm/imagefiltersclipped.cpp",
+ "gm/imagefilterscropexpand.cpp",
+ "gm/imagefilterscropped.cpp",
+ "gm/imagefiltersgraph.cpp",
+ "gm/imagefiltersscaled.cpp",
+ "gm/imagefiltersstroked.cpp",
+ "gm/imagefilterstransformed.cpp",
+ "gm/imagefromyuvtextures.cpp",
+ "gm/imagemagnifier.cpp",
+ "gm/imagemakewithfilter.cpp",
+ "gm/imagemasksubset.cpp",
+ "gm/imageresizetiled.cpp",
+ "gm/imagescalealigned.cpp",
+ "gm/imagesource.cpp",
+ "gm/imagesource2.cpp",
+ "gm/internal_links.cpp",
+ "gm/inverseclip.cpp",
+ "gm/inversepaths.cpp",
+ "gm/jpg_color_cube.cpp",
+ "gm/labyrinth.cpp",
+ "gm/largeclippedpath.cpp",
+ "gm/largeglyphblur.cpp",
+ "gm/lattice.cpp",
+ "gm/lazytiling.cpp",
+ "gm/lcdblendmodes.cpp",
+ "gm/lcdoverlap.cpp",
+ "gm/lcdtext.cpp",
+ "gm/lighting.cpp",
+ "gm/linepaths.cpp",
+ "gm/localmatriximagefilter.cpp",
+ "gm/localmatriximageshader.cpp",
+ "gm/localmatrixshader.cpp",
+ "gm/lumafilter.cpp",
+ "gm/mac_aa_explorer.cpp",
+ "gm/make_raster_image.cpp",
+ "gm/makecolorspace.cpp",
+ "gm/mandoline.cpp",
+ "gm/manypaths.cpp",
+ "gm/matrixconvolution.cpp",
+ "gm/matriximagefilter.cpp",
+ "gm/mipmap.cpp",
+ "gm/mixedtextblobs.cpp",
+ "gm/mixercolorfilter.cpp",
+ "gm/modecolorfilters.cpp",
+ "gm/morphology.cpp",
+ "gm/nested.cpp",
+ "gm/ninepatchstretch.cpp",
+ "gm/nonclosedpaths.cpp",
+ "gm/offsetimagefilter.cpp",
+ "gm/orientation.cpp",
+ "gm/ovals.cpp",
+ "gm/overdrawcanvas.cpp",
+ "gm/overdrawcolorfilter.cpp",
+ "gm/overstroke.cpp",
+ "gm/p3.cpp",
+ "gm/particles.cpp",
+ "gm/patch.cpp",
+ "gm/path_stroke_with_zero_length.cpp",
+ "gm/patharcto.cpp",
+ "gm/pathcontourstart.cpp",
+ "gm/patheffects.cpp",
+ "gm/pathfill.cpp",
+ "gm/pathinterior.cpp",
+ "gm/pathmaskcache.cpp",
+ "gm/pathmeasure.cpp",
+ "gm/pathopsinverse.cpp",
+ "gm/pathreverse.cpp",
+ "gm/pdf_never_embed.cpp",
+ "gm/perlinnoise.cpp",
+ "gm/perspimages.cpp",
+ "gm/perspshaders.cpp",
+ "gm/picture.cpp",
+ "gm/pictureimagefilter.cpp",
+ "gm/pictureimagegenerator.cpp",
+ "gm/pictureshader.cpp",
+ "gm/pictureshadercache.cpp",
+ "gm/pictureshadertile.cpp",
+ "gm/pixelsnap.cpp",
+ "gm/plus.cpp",
+ "gm/points.cpp",
+ "gm/poly2poly.cpp",
+ "gm/polygonoffset.cpp",
+ "gm/polygons.cpp",
+ "gm/postercircle.cpp",
+ "gm/preservefillrule.cpp",
+ "gm/quadpaths.cpp",
+ "gm/radial_gradient_precision.cpp",
+ "gm/rasterhandleallocator.cpp",
+ "gm/readpixels.cpp",
+ "gm/recordopts.cpp",
+ "gm/rectangletexture.cpp",
+ "gm/repeated_bitmap.cpp",
+ "gm/resizeimagefilter.cpp",
+ "gm/roundrects.cpp",
+ "gm/rrect.cpp",
+ "gm/rrectclipdrawpaint.cpp",
+ "gm/rrects.cpp",
+ "gm/rsxtext.cpp",
+ "gm/runtimecolorfilter.cpp",
+ "gm/runtimeeffectimage.cpp",
+ "gm/runtimefunctions.cpp",
+ "gm/runtimeintrinsics.cpp",
+ "gm/runtimeshader.cpp",
+ "gm/sample_matrix_constant.cpp",
+ "gm/samplerstress.cpp",
+ "gm/savelayer.cpp",
+ "gm/scaledemoji.cpp",
+ "gm/scaledemoji_rendering.cpp",
+ "gm/scaledstrokes.cpp",
+ "gm/shadermaskfilter.cpp",
+ "gm/shadertext3.cpp",
+ "gm/shadowutils.cpp",
+ "gm/shallowgradient.cpp",
+ "gm/shapes.cpp",
+ "gm/sharedcorners.cpp",
+ "gm/showmiplevels.cpp",
+ "gm/simple_magnification.cpp",
+ "gm/simpleaaclip.cpp",
+ "gm/simplerect.cpp",
+ "gm/skbug1719.cpp",
+ "gm/skbug_257.cpp",
+ "gm/skbug_4868.cpp",
+ "gm/skbug_5321.cpp",
+ "gm/skbug_8664.cpp",
+ "gm/skbug_8955.cpp",
+ "gm/skbug_9319.cpp",
+ "gm/skbug_9819.cpp",
+ "gm/smallarc.cpp",
+ "gm/smallpaths.cpp",
+ "gm/spritebitmap.cpp",
+ "gm/srcmode.cpp",
+ "gm/srgb.cpp",
+ "gm/stlouisarch.cpp",
+ "gm/stringart.cpp",
+ "gm/stroke_rect_shader.cpp",
+ "gm/strokedlines.cpp",
+ "gm/strokefill.cpp",
+ "gm/strokerect.cpp",
+ "gm/strokerect_anisotropic.cpp",
+ "gm/strokerects.cpp",
+ "gm/strokes.cpp",
+ "gm/stroketext.cpp",
+ "gm/subsetshader.cpp",
+ "gm/surface.cpp",
+ "gm/swizzle.cpp",
+ "gm/tablecolorfilter.cpp",
+ "gm/tallstretchedbitmaps.cpp",
+ "gm/tessellation.cpp",
+ "gm/testgradient.cpp",
+ "gm/texelsubset.cpp",
+ "gm/text_scale_skew.cpp",
+ "gm/textblob.cpp",
+ "gm/textblobblockreordering.cpp",
+ "gm/textblobcolortrans.cpp",
+ "gm/textblobgeometrychange.cpp",
+ "gm/textblobmixedsizes.cpp",
+ "gm/textblobrandomfont.cpp",
+ "gm/textblobshader.cpp",
+ "gm/textblobtransforms.cpp",
+ "gm/textblobuseaftergpufree.cpp",
+ "gm/texteffects.cpp",
+ "gm/thinconcavepaths.cpp",
+ "gm/thinrects.cpp",
+ "gm/thinstrokedrects.cpp",
+ "gm/tiledscaledbitmap.cpp",
+ "gm/tileimagefilter.cpp",
+ "gm/tilemodes.cpp",
+ "gm/tilemodes_alpha.cpp",
+ "gm/tilemodes_scaled.cpp",
+ "gm/tinybitmap.cpp",
+ "gm/transparency.cpp",
+ "gm/trickycubicstrokes.cpp",
+ "gm/typeface.cpp",
+ "gm/unpremul.cpp",
+ "gm/userfont.cpp",
+ "gm/variedtext.cpp",
+ "gm/verifiers/gmverifier.cpp",
+ "gm/vertices.cpp",
+ "gm/verylargebitmap.cpp",
+ "gm/wacky_yuv_formats.cpp",
+ "gm/widebuttcaps.cpp",
+ "gm/windowrectangles.cpp",
+ "gm/xfermodeimagefilter.cpp",
+ "gm/xfermodes.cpp",
+ "gm/xfermodes2.cpp",
+ "gm/xfermodes3.cpp",
+ "gm/ycbcrimage.cpp",
+ "gm/yuv420_odd_dim.cpp",
+ "gm/yuvtorgbsubset.cpp",
+ "modules/particles/src/SkParticleBinding.cpp",
+ "modules/particles/src/SkParticleDrawable.cpp",
+ "modules/particles/src/SkParticleEffect.cpp",
+ "modules/particles/src/SkReflected.cpp",
+ "modules/skottie/gm/ExternalProperties.cpp",
+ "modules/skottie/gm/SkottieGM.cpp",
+ "modules/skottie/src/Camera.cpp",
+ "modules/skottie/src/Composition.cpp",
+ "modules/skottie/src/Layer.cpp",
+ "modules/skottie/src/Path.cpp",
+ "modules/skottie/src/Skottie.cpp",
+ "modules/skottie/src/SkottieJson.cpp",
+ "modules/skottie/src/SkottieProperty.cpp",
+ "modules/skottie/src/SkottieTest.cpp",
+ "modules/skottie/src/Transform.cpp",
+ "modules/skottie/src/animator/Animator.cpp",
+ "modules/skottie/src/animator/KeyframeAnimator.cpp",
+ "modules/skottie/src/animator/ScalarKeyframeAnimator.cpp",
+ "modules/skottie/src/animator/ShapeKeyframeAnimator.cpp",
+ "modules/skottie/src/animator/TextKeyframeAnimator.cpp",
+ "modules/skottie/src/animator/Vec2KeyframeAnimator.cpp",
+ "modules/skottie/src/animator/VectorKeyframeAnimator.cpp",
+ "modules/skottie/src/effects/BlackAndWhiteEffect.cpp",
+ "modules/skottie/src/effects/BrightnessContrastEffect.cpp",
+ "modules/skottie/src/effects/CornerPinEffect.cpp",
+ "modules/skottie/src/effects/DisplacementMapEffect.cpp",
+ "modules/skottie/src/effects/DropShadowEffect.cpp",
+ "modules/skottie/src/effects/Effects.cpp",
+ "modules/skottie/src/effects/FillEffect.cpp",
+ "modules/skottie/src/effects/FractalNoiseEffect.cpp",
+ "modules/skottie/src/effects/GaussianBlurEffect.cpp",
+ "modules/skottie/src/effects/GlowStyles.cpp",
+ "modules/skottie/src/effects/GradientEffect.cpp",
+ "modules/skottie/src/effects/HueSaturationEffect.cpp",
+ "modules/skottie/src/effects/InvertEffect.cpp",
+ "modules/skottie/src/effects/LevelsEffect.cpp",
+ "modules/skottie/src/effects/LinearWipeEffect.cpp",
+ "modules/skottie/src/effects/MotionBlurEffect.cpp",
+ "modules/skottie/src/effects/MotionTileEffect.cpp",
+ "modules/skottie/src/effects/RadialWipeEffect.cpp",
+ "modules/skottie/src/effects/ShadowStyles.cpp",
+ "modules/skottie/src/effects/ShiftChannelsEffect.cpp",
+ "modules/skottie/src/effects/SphereEffect.cpp",
+ "modules/skottie/src/effects/ThresholdEffect.cpp",
+ "modules/skottie/src/effects/TintEffect.cpp",
+ "modules/skottie/src/effects/TransformEffect.cpp",
+ "modules/skottie/src/effects/TritoneEffect.cpp",
+ "modules/skottie/src/effects/VenetianBlindsEffect.cpp",
+ "modules/skottie/src/layers/AudioLayer.cpp",
+ "modules/skottie/src/layers/FootageLayer.cpp",
+ "modules/skottie/src/layers/NullLayer.cpp",
+ "modules/skottie/src/layers/PrecompLayer.cpp",
+ "modules/skottie/src/layers/SolidLayer.cpp",
+ "modules/skottie/src/layers/TextLayer.cpp",
+ "modules/skottie/src/layers/shapelayer/Ellipse.cpp",
+ "modules/skottie/src/layers/shapelayer/FillStroke.cpp",
+ "modules/skottie/src/layers/shapelayer/Gradient.cpp",
+ "modules/skottie/src/layers/shapelayer/MergePaths.cpp",
+ "modules/skottie/src/layers/shapelayer/OffsetPaths.cpp",
+ "modules/skottie/src/layers/shapelayer/Polystar.cpp",
+ "modules/skottie/src/layers/shapelayer/PuckerBloat.cpp",
+ "modules/skottie/src/layers/shapelayer/Rectangle.cpp",
+ "modules/skottie/src/layers/shapelayer/Repeater.cpp",
+ "modules/skottie/src/layers/shapelayer/RoundCorners.cpp",
+ "modules/skottie/src/layers/shapelayer/ShapeLayer.cpp",
+ "modules/skottie/src/layers/shapelayer/TrimPaths.cpp",
+ "modules/skottie/src/text/RangeSelector.cpp",
+ "modules/skottie/src/text/SkottieShaper.cpp",
+ "modules/skottie/src/text/TextAdapter.cpp",
+ "modules/skottie/src/text/TextAnimator.cpp",
+ "modules/skottie/src/text/TextValue.cpp",
+ "modules/skottie/tests/AudioLayer.cpp",
+ "modules/skottie/tests/Image.cpp",
+ "modules/skottie/tests/Keyframe.cpp",
+ "modules/skottie/tests/Text.cpp",
+ "modules/skottie/utils/SkottieUtils.cpp",
+ "modules/skparagraph/gm/simple_gm.cpp",
+ "modules/skparagraph/src/Decorations.cpp",
+ "modules/skparagraph/src/FontCollection.cpp",
+ "modules/skparagraph/src/OneLineShaper.cpp",
+ "modules/skparagraph/src/ParagraphBuilderImpl.cpp",
+ "modules/skparagraph/src/ParagraphCache.cpp",
+ "modules/skparagraph/src/ParagraphImpl.cpp",
+ "modules/skparagraph/src/ParagraphStyle.cpp",
+ "modules/skparagraph/src/Run.cpp",
+ "modules/skparagraph/src/TextLine.cpp",
+ "modules/skparagraph/src/TextShadow.cpp",
+ "modules/skparagraph/src/TextStyle.cpp",
+ "modules/skparagraph/src/TextWrapper.cpp",
+ "modules/skparagraph/src/TypefaceFontProvider.cpp",
+ "modules/skparagraph/tests/SkParagraphTest.cpp",
+ "modules/skparagraph/utils/TestFontCollection.cpp",
+ "modules/skresources/src/SkResources.cpp",
+ "modules/sksg/src/SkSGClipEffect.cpp",
+ "modules/sksg/src/SkSGColorFilter.cpp",
+ "modules/sksg/src/SkSGDraw.cpp",
+ "modules/sksg/src/SkSGEffectNode.cpp",
+ "modules/sksg/src/SkSGGeometryEffect.cpp",
+ "modules/sksg/src/SkSGGeometryNode.cpp",
+ "modules/sksg/src/SkSGGradient.cpp",
+ "modules/sksg/src/SkSGGroup.cpp",
+ "modules/sksg/src/SkSGImage.cpp",
+ "modules/sksg/src/SkSGInvalidationController.cpp",
+ "modules/sksg/src/SkSGMaskEffect.cpp",
+ "modules/sksg/src/SkSGMerge.cpp",
+ "modules/sksg/src/SkSGNode.cpp",
+ "modules/sksg/src/SkSGOpacityEffect.cpp",
+ "modules/sksg/src/SkSGPaint.cpp",
+ "modules/sksg/src/SkSGPath.cpp",
+ "modules/sksg/src/SkSGPlane.cpp",
+ "modules/sksg/src/SkSGRect.cpp",
+ "modules/sksg/src/SkSGRenderEffect.cpp",
+ "modules/sksg/src/SkSGRenderNode.cpp",
+ "modules/sksg/src/SkSGScene.cpp",
+ "modules/sksg/src/SkSGText.cpp",
+ "modules/sksg/src/SkSGTransform.cpp",
+ "modules/sksg/tests/SGTest.cpp",
+ "modules/skshaper/src/SkShaper.cpp",
+ "modules/skshaper/src/SkShaper_harfbuzz.cpp",
+ "modules/skshaper/src/SkShaper_primitive.cpp",
+ "modules/skshaper/src/SkUnicode_icu.cpp",
+ "modules/svg/src/SkSVGAttribute.cpp",
+ "modules/svg/src/SkSVGAttributeParser.cpp",
+ "modules/svg/src/SkSVGCircle.cpp",
+ "modules/svg/src/SkSVGClipPath.cpp",
+ "modules/svg/src/SkSVGContainer.cpp",
+ "modules/svg/src/SkSVGDOM.cpp",
+ "modules/svg/src/SkSVGEllipse.cpp",
+ "modules/svg/src/SkSVGFe.cpp",
+ "modules/svg/src/SkSVGFeBlend.cpp",
+ "modules/svg/src/SkSVGFeColorMatrix.cpp",
+ "modules/svg/src/SkSVGFeComposite.cpp",
+ "modules/svg/src/SkSVGFeDisplacementMap.cpp",
+ "modules/svg/src/SkSVGFeFlood.cpp",
+ "modules/svg/src/SkSVGFeGaussianBlur.cpp",
+ "modules/svg/src/SkSVGFeImage.cpp",
+ "modules/svg/src/SkSVGFeLightSource.cpp",
+ "modules/svg/src/SkSVGFeLighting.cpp",
+ "modules/svg/src/SkSVGFeMorphology.cpp",
+ "modules/svg/src/SkSVGFeOffset.cpp",
+ "modules/svg/src/SkSVGFeTurbulence.cpp",
+ "modules/svg/src/SkSVGFilter.cpp",
+ "modules/svg/src/SkSVGFilterContext.cpp",
+ "modules/svg/src/SkSVGGradient.cpp",
+ "modules/svg/src/SkSVGImage.cpp",
+ "modules/svg/src/SkSVGLine.cpp",
+ "modules/svg/src/SkSVGLinearGradient.cpp",
+ "modules/svg/src/SkSVGMask.cpp",
+ "modules/svg/src/SkSVGNode.cpp",
+ "modules/svg/src/SkSVGPath.cpp",
+ "modules/svg/src/SkSVGPattern.cpp",
+ "modules/svg/src/SkSVGPoly.cpp",
+ "modules/svg/src/SkSVGRadialGradient.cpp",
+ "modules/svg/src/SkSVGRect.cpp",
+ "modules/svg/src/SkSVGRenderContext.cpp",
+ "modules/svg/src/SkSVGSVG.cpp",
+ "modules/svg/src/SkSVGShape.cpp",
+ "modules/svg/src/SkSVGStop.cpp",
+ "modules/svg/src/SkSVGText.cpp",
+ "modules/svg/src/SkSVGTransformableNode.cpp",
+ "modules/svg/src/SkSVGUse.cpp",
+ "modules/svg/src/SkSVGValue.cpp",
+ "modules/svg/tests/Filters.cpp",
+ "modules/svg/tests/Text.cpp",
+ "tests/AAClipTest.cpp",
+ "tests/AdvancedBlendTest.cpp",
+ "tests/AndroidCodecTest.cpp",
+ "tests/AnimatedImageTest.cpp",
+ "tests/AnnotationTest.cpp",
+ "tests/ApplyGammaTest.cpp",
+ "tests/ArenaAllocTest.cpp",
+ "tests/AsADashTest.cpp",
+ "tests/BRDTest.cpp",
+ "tests/BackendAllocationTest.cpp",
+ "tests/BackendSurfaceMutableStateTest.cpp",
+ "tests/BadIcoTest.cpp",
+ "tests/BitSetTest.cpp",
+ "tests/BitmapCopyTest.cpp",
+ "tests/BitmapGetColorTest.cpp",
+ "tests/BitmapTest.cpp",
+ "tests/BlendTest.cpp",
+ "tests/BlitMaskClip.cpp",
+ "tests/BlurTest.cpp",
+ "tests/BulkRectTest.cpp",
+ "tests/CTest.cpp",
+ "tests/CachedDataTest.cpp",
+ "tests/CachedDecodingPixelRefTest.cpp",
+ "tests/CanvasStateHelpers.cpp",
+ "tests/CanvasStateTest.cpp",
+ "tests/CanvasTest.cpp",
+ "tests/ChecksumTest.cpp",
+ "tests/ClearTest.cpp",
+ "tests/ClipBoundsTest.cpp",
+ "tests/ClipCubicTest.cpp",
+ "tests/ClipStackTest.cpp",
+ "tests/ClipperTest.cpp",
+ "tests/CodecAnimTest.cpp",
+ "tests/CodecExactReadTest.cpp",
+ "tests/CodecPartialTest.cpp",
+ "tests/CodecRecommendedTypeTest.cpp",
+ "tests/CodecTest.cpp",
+ "tests/ColorFilterTest.cpp",
+ "tests/ColorMatrixTest.cpp",
+ "tests/ColorPrivTest.cpp",
+ "tests/ColorSpaceTest.cpp",
+ "tests/ColorTest.cpp",
+ "tests/CompressedBackendAllocationTest.cpp",
+ "tests/CopySurfaceTest.cpp",
+ "tests/CubicMapTest.cpp",
+ "tests/DSLFPTest.cpp",
+ "tests/DashPathEffectTest.cpp",
+ "tests/DataRefTest.cpp",
+ "tests/DebugLayerManagerTest.cpp",
+ "tests/DefaultPathRendererTest.cpp",
+ "tests/DeferredDisplayListTest.cpp",
+ "tests/DequeTest.cpp",
+ "tests/DescriptorTest.cpp",
+ "tests/DeviceTest.cpp",
+ "tests/DiscardableMemoryPoolTest.cpp",
+ "tests/DiscardableMemoryTest.cpp",
+ "tests/DrawBitmapRectTest.cpp",
+ "tests/DrawOpAtlasTest.cpp",
+ "tests/DrawPathTest.cpp",
+ "tests/DrawTextTest.cpp",
+ "tests/EGLImageTest.cpp",
+ "tests/EmptyPathTest.cpp",
+ "tests/EncodeTest.cpp",
+ "tests/EncodedInfoTest.cpp",
+ "tests/ExifTest.cpp",
+ "tests/ExtendedSkColorTypeTests.cpp",
+ "tests/F16StagesTest.cpp",
+ "tests/FillPathTest.cpp",
+ "tests/FitsInTest.cpp",
+ "tests/FlattenDrawableTest.cpp",
+ "tests/FlattenableFactoryToName.cpp",
+ "tests/FlattenableNameToFactory.cpp",
+ "tests/Float16Test.cpp",
+ "tests/FloatingPointTextureTest.cpp",
+ "tests/FontHostStreamTest.cpp",
+ "tests/FontHostTest.cpp",
+ "tests/FontMgrTest.cpp",
+ "tests/FontNamesTest.cpp",
+ "tests/FontTest.cpp",
+ "tests/FrontBufferedStreamTest.cpp",
+ "tests/GLBackendSurfaceTest.cpp",
+ "tests/GeometryTest.cpp",
+ "tests/GifTest.cpp",
+ "tests/GlyphRunTest.cpp",
+ "tests/GpuDrawPathTest.cpp",
+ "tests/GpuRectanizerTest.cpp",
+ "tests/GrAHardwareBufferTest.cpp",
+ "tests/GrBlockAllocatorTest.cpp",
+ "tests/GrCCPRTest.cpp",
+ "tests/GrClipStackTest.cpp",
+ "tests/GrContextAbandonTest.cpp",
+ "tests/GrContextFactoryTest.cpp",
+ "tests/GrContextOOM.cpp",
+ "tests/GrDDLImageTest.cpp",
+ "tests/GrFinishedFlushTest.cpp",
+ "tests/GrGLExtensionsTest.cpp",
+ "tests/GrMemoryPoolTest.cpp",
+ "tests/GrMeshTest.cpp",
+ "tests/GrMipMappedTest.cpp",
+ "tests/GrOpListFlushTest.cpp",
+ "tests/GrPathUtilsTest.cpp",
+ "tests/GrPipelineDynamicStateTest.cpp",
+ "tests/GrPorterDuffTest.cpp",
+ "tests/GrQuadBufferTest.cpp",
+ "tests/GrQuadCropTest.cpp",
+ "tests/GrRenderTaskClusterTest.cpp",
+ "tests/GrStyledShapeTest.cpp",
+ "tests/GrSubmittedFlushTest.cpp",
+ "tests/GrSurfaceTest.cpp",
+ "tests/GrTBlockListTest.cpp",
+ "tests/GrTextBlobTest.cpp",
+ "tests/GrTextureMipMapInvalidationTest.cpp",
+ "tests/GrThreadSafeCacheTest.cpp",
+ "tests/GrVxTest.cpp",
+ "tests/GradientTest.cpp",
+ "tests/HSVRoundTripTest.cpp",
+ "tests/HashTest.cpp",
+ "tests/HighContrastFilterTest.cpp",
+ "tests/ICCTest.cpp",
+ "tests/ImageBitmapTest.cpp",
+ "tests/ImageCacheTest.cpp",
+ "tests/ImageFilterCacheTest.cpp",
+ "tests/ImageFilterTest.cpp",
+ "tests/ImageFrom565Bitmap.cpp",
+ "tests/ImageGeneratorTest.cpp",
+ "tests/ImageIsOpaqueTest.cpp",
+ "tests/ImageNewShaderTest.cpp",
+ "tests/ImageTest.cpp",
+ "tests/IncrTopoSortTest.cpp",
+ "tests/IndexedPngOverflowTest.cpp",
+ "tests/InfRectTest.cpp",
+ "tests/InsetConvexPolyTest.cpp",
+ "tests/InvalidIndexedPngTest.cpp",
+ "tests/IsClosedSingleContourTest.cpp",
+ "tests/JSONTest.cpp",
+ "tests/LListTest.cpp",
+ "tests/LRUCacheTest.cpp",
+ "tests/LazyProxyTest.cpp",
+ "tests/M44Test.cpp",
+ "tests/MD5Test.cpp",
+ "tests/MallocPixelRefTest.cpp",
+ "tests/MaskCacheTest.cpp",
+ "tests/MathTest.cpp",
+ "tests/Matrix44Test.cpp",
+ "tests/MatrixClipCollapseTest.cpp",
+ "tests/MatrixColorFilterTest.cpp",
+ "tests/MatrixTest.cpp",
+ "tests/MemoryTest.cpp",
+ "tests/MemsetTest.cpp",
+ "tests/MessageBusTest.cpp",
+ "tests/MetaDataTest.cpp",
+ "tests/MipMapTest.cpp",
+ "tests/MultiPictureDocumentTest.cpp",
+ "tests/NdkDecodeTest.cpp",
+ "tests/NdkEncodeTest.cpp",
+ "tests/NonlinearBlendingTest.cpp",
+ "tests/OSPathTest.cpp",
+ "tests/OffsetSimplePolyTest.cpp",
+ "tests/OnFlushCallbackTest.cpp",
+ "tests/OnceTest.cpp",
+ "tests/OpChainTest.cpp",
+ "tests/OverAlignedTest.cpp",
+ "tests/PDFDeflateWStreamTest.cpp",
+ "tests/PDFDocumentTest.cpp",
+ "tests/PDFGlyphsToUnicodeTest.cpp",
+ "tests/PDFJpegEmbedTest.cpp",
+ "tests/PDFMetadataAttributeTest.cpp",
+ "tests/PDFOpaqueSrcModeToSrcOverTest.cpp",
+ "tests/PDFPrimitivesTest.cpp",
+ "tests/PDFTaggedLinkTest.cpp",
+ "tests/PDFTaggedPruningTest.cpp",
+ "tests/PDFTaggedTableTest.cpp",
+ "tests/PDFTaggedTest.cpp",
+ "tests/PaintTest.cpp",
+ "tests/ParametricStageTest.cpp",
+ "tests/ParseColorTest.cpp",
+ "tests/ParsePathTest.cpp",
+ "tests/PathBuilderTest.cpp",
+ "tests/PathCoverageTest.cpp",
+ "tests/PathMeasureTest.cpp",
+ "tests/PathOpsAngleIdeas.cpp",
+ "tests/PathOpsAngleTest.cpp",
+ "tests/PathOpsAsWindingTest.cpp",
+ "tests/PathOpsBattles.cpp",
+ "tests/PathOpsBoundsTest.cpp",
+ "tests/PathOpsBuildUseTest.cpp",
+ "tests/PathOpsBuilderConicTest.cpp",
+ "tests/PathOpsBuilderTest.cpp",
+ "tests/PathOpsChalkboardTest.cpp",
+ "tests/PathOpsConicIntersectionTest.cpp",
+ "tests/PathOpsConicLineIntersectionTest.cpp",
+ "tests/PathOpsConicQuadIntersectionTest.cpp",
+ "tests/PathOpsCubicConicIntersectionTest.cpp",
+ "tests/PathOpsCubicIntersectionTest.cpp",
+ "tests/PathOpsCubicIntersectionTestData.cpp",
+ "tests/PathOpsCubicLineIntersectionIdeas.cpp",
+ "tests/PathOpsCubicLineIntersectionTest.cpp",
+ "tests/PathOpsCubicQuadIntersectionTest.cpp",
+ "tests/PathOpsCubicReduceOrderTest.cpp",
+ "tests/PathOpsDCubicTest.cpp",
+ "tests/PathOpsDLineTest.cpp",
+ "tests/PathOpsDPointTest.cpp",
+ "tests/PathOpsDRectTest.cpp",
+ "tests/PathOpsDVectorTest.cpp",
+ "tests/PathOpsDebug.cpp",
+ "tests/PathOpsExtendedTest.cpp",
+ "tests/PathOpsFuzz763Test.cpp",
+ "tests/PathOpsInverseTest.cpp",
+ "tests/PathOpsIssue3651.cpp",
+ "tests/PathOpsLineIntersectionTest.cpp",
+ "tests/PathOpsLineParametetersTest.cpp",
+ "tests/PathOpsOpCircleThreadedTest.cpp",
+ "tests/PathOpsOpCubicThreadedTest.cpp",
+ "tests/PathOpsOpLoopThreadedTest.cpp",
+ "tests/PathOpsOpRectThreadedTest.cpp",
+ "tests/PathOpsOpTest.cpp",
+ "tests/PathOpsQuadIntersectionTest.cpp",
+ "tests/PathOpsQuadIntersectionTestData.cpp",
+ "tests/PathOpsQuadLineIntersectionTest.cpp",
+ "tests/PathOpsQuadLineIntersectionThreadedTest.cpp",
+ "tests/PathOpsQuadReduceOrderTest.cpp",
+ "tests/PathOpsSimplifyDegenerateThreadedTest.cpp",
+ "tests/PathOpsSimplifyFailTest.cpp",
+ "tests/PathOpsSimplifyQuadThreadedTest.cpp",
+ "tests/PathOpsSimplifyQuadralateralsThreadedTest.cpp",
+ "tests/PathOpsSimplifyRectThreadedTest.cpp",
+ "tests/PathOpsSimplifyTest.cpp",
+ "tests/PathOpsSimplifyTrianglesThreadedTest.cpp",
+ "tests/PathOpsSkpTest.cpp",
+ "tests/PathOpsTestCommon.cpp",
+ "tests/PathOpsThreadedCommon.cpp",
+ "tests/PathOpsThreeWayTest.cpp",
+ "tests/PathOpsTigerTest.cpp",
+ "tests/PathOpsTightBoundsTest.cpp",
+ "tests/PathOpsTypesTest.cpp",
+ "tests/PathRendererCacheTests.cpp",
+ "tests/PathTest.cpp",
+ "tests/PictureBBHTest.cpp",
+ "tests/PictureShaderTest.cpp",
+ "tests/PictureTest.cpp",
+ "tests/PinnedImageTest.cpp",
+ "tests/PixelRefTest.cpp",
+ "tests/Point3Test.cpp",
+ "tests/PointTest.cpp",
+ "tests/PolyUtilsTest.cpp",
+ "tests/PremulAlphaRoundTripTest.cpp",
+ "tests/PrimitiveProcessorTest.cpp",
+ "tests/ProcessorTest.cpp",
+ "tests/ProgramsTest.cpp",
+ "tests/PromiseImageTest.cpp",
+ "tests/ProxyConversionTest.cpp",
+ "tests/ProxyRefTest.cpp",
+ "tests/ProxyTest.cpp",
+ "tests/QuickRejectTest.cpp",
+ "tests/RRectInPathTest.cpp",
+ "tests/RTreeTest.cpp",
+ "tests/RandomTest.cpp",
+ "tests/ReadPixelsTest.cpp",
+ "tests/ReadWritePixelsGpuTest.cpp",
+ "tests/RecordDrawTest.cpp",
+ "tests/RecordOptsTest.cpp",
+ "tests/RecordPatternTest.cpp",
+ "tests/RecordTest.cpp",
+ "tests/RecorderTest.cpp",
+ "tests/RecordingXfermodeTest.cpp",
+ "tests/RectTest.cpp",
+ "tests/RectangleTextureTest.cpp",
+ "tests/RefCntTest.cpp",
+ "tests/RegionTest.cpp",
+ "tests/RenderTargetContextTest.cpp",
+ "tests/RepeatedClippedBlurTest.cpp",
+ "tests/ResourceAllocatorTest.cpp",
+ "tests/ResourceCacheTest.cpp",
+ "tests/RoundRectTest.cpp",
+ "tests/SRGBReadWritePixelsTest.cpp",
+ "tests/SRGBTest.cpp",
+ "tests/SVGDeviceTest.cpp",
+ "tests/SafeMathTest.cpp",
+ "tests/SamplingTest.cpp",
+ "tests/ScalarTest.cpp",
+ "tests/ScaleToSidesTest.cpp",
+ "tests/SerialProcsTest.cpp",
+ "tests/SerializationTest.cpp",
+ "tests/ShaderImageFilterTest.cpp",
+ "tests/ShaderOpacityTest.cpp",
+ "tests/ShaderTest.cpp",
+ "tests/ShadowTest.cpp",
+ "tests/ShaperTest.cpp",
+ "tests/SizeTest.cpp",
+ "tests/SkBase64Test.cpp",
+ "tests/SkColor4fTest.cpp",
+ "tests/SkColorSpaceXformStepsTest.cpp",
+ "tests/SkDOMTest.cpp",
+ "tests/SkDSLRuntimeEffectTest.cpp",
+ "tests/SkFixed15Test.cpp",
+ "tests/SkGaussFilterTest.cpp",
+ "tests/SkGlyphBufferTest.cpp",
+ "tests/SkGlyphTest.cpp",
+ "tests/SkImageTest.cpp",
+ "tests/SkNxTest.cpp",
+ "tests/SkPathRangeIterTest.cpp",
+ "tests/SkRasterPipelineTest.cpp",
+ "tests/SkRemoteGlyphCacheTest.cpp",
+ "tests/SkResourceCacheTest.cpp",
+ "tests/SkRuntimeEffectTest.cpp",
+ "tests/SkSLCross.cpp",
+ "tests/SkSLDSLErrorLineNumbers.cpp",
+ "tests/SkSLDSLOnlyTest.cpp",
+ "tests/SkSLDSLTest.cpp",
+ "tests/SkSLFPTestbed.cpp",
+ "tests/SkSLGLSLTestbed.cpp",
+ "tests/SkSLInterpreterTest.cpp",
+ "tests/SkSLMemoryLayoutTest.cpp",
+ "tests/SkSLMetalTestbed.cpp",
+ "tests/SkSLSPIRVTestbed.cpp",
+ "tests/SkSLTest.cpp",
+ "tests/SkScalerCacheTest.cpp",
+ "tests/SkShaperJSONWriterTest.cpp",
+ "tests/SkSharedMutexTest.cpp",
+ "tests/SkStrikeCacheTest.cpp",
+ "tests/SkUTFTest.cpp",
+ "tests/SkVMTest.cpp",
+ "tests/SkVxTest.cpp",
+ "tests/Skbug5221.cpp",
+ "tests/Skbug6389.cpp",
+ "tests/Skbug6653.cpp",
+ "tests/SortTest.cpp",
+ "tests/SpecialImageTest.cpp",
+ "tests/SpecialSurfaceTest.cpp",
+ "tests/SrcOverTest.cpp",
+ "tests/SrcSrcOverBatchTest.cpp",
+ "tests/StreamBufferTest.cpp",
+ "tests/StreamTest.cpp",
+ "tests/StringTest.cpp",
+ "tests/StrokeIndirectTest.cpp",
+ "tests/StrokeTest.cpp",
+ "tests/StrokerTest.cpp",
+ "tests/SubsetPath.cpp",
+ "tests/SurfaceSemaphoreTest.cpp",
+ "tests/SurfaceTest.cpp",
+ "tests/SwizzlerTest.cpp",
+ "tests/TArrayTest.cpp",
+ "tests/TDPQueueTest.cpp",
+ "tests/TLazyTest.cpp",
+ "tests/TemplatesTest.cpp",
+ "tests/Test.cpp",
+ "tests/TestTest.cpp",
+ "tests/TestUtils.cpp",
+ "tests/TextBlobCacheTest.cpp",
+ "tests/TextBlobTest.cpp",
+ "tests/TextureBindingsResetTest.cpp",
+ "tests/TextureOpTest.cpp",
+ "tests/TextureProxyTest.cpp",
+ "tests/TextureStripAtlasManagerTest.cpp",
+ "tests/Time.cpp",
+ "tests/TopoSortTest.cpp",
+ "tests/TraceMemoryDumpTest.cpp",
+ "tests/TracingTest.cpp",
+ "tests/TransferPixelsTest.cpp",
+ "tests/TriangulatingPathRendererTests.cpp",
+ "tests/TypefaceTest.cpp",
+ "tests/UnicodeTest.cpp",
+ "tests/UtilsTest.cpp",
+ "tests/VerticesTest.cpp",
+ "tests/VkBackendSurfaceTest.cpp",
+ "tests/VkDrawableTest.cpp",
+ "tests/VkHardwareBufferTest.cpp",
+ "tests/VkPriorityExtensionTest.cpp",
+ "tests/VkProtectedContextTest.cpp",
+ "tests/VkWrapTests.cpp",
+ "tests/VkYcbcrSamplerTest.cpp",
+ "tests/VptrTest.cpp",
+ "tests/WangsFormulaTest.cpp",
+ "tests/WebpTest.cpp",
+ "tests/WindowRectanglesTest.cpp",
+ "tests/WrappedSurfaceCopyOnWriteTest.cpp",
+ "tests/WritePixelsTest.cpp",
+ "tests/Writer32Test.cpp",
+ "tests/YUVCacheTest.cpp",
+ "tests/YUVTest.cpp",
+ "tests/sksl/dslfp/GrDSLFPTest_DoStatement.dsl.cpp",
+ "tests/sksl/dslfp/GrDSLFPTest_ForStatement.dsl.cpp",
+ "tests/sksl/dslfp/GrDSLFPTest_IfStatement.dsl.cpp",
+ "tests/sksl/dslfp/GrDSLFPTest_SwitchStatement.dsl.cpp",
+ "tests/sksl/dslfp/GrDSLFPTest_Swizzle.dsl.cpp",
+ "tests/sksl/dslfp/GrDSLFPTest_Ternary.dsl.cpp",
+ "tests/sksl/dslfp/GrDSLFPTest_WhileStatement.dsl.cpp",
+ "third_party/etc1/etc1.cpp",
+ "tools/AndroidSkDebugToStdOut.cpp",
+ "tools/CrashHandler.cpp",
+ "tools/DDLPromiseImageHelper.cpp",
+ "tools/DDLTileHelper.cpp",
+ "tools/HashAndEncode.cpp",
+ "tools/LsanSuppressions.cpp",
+ "tools/MSKPPlayer.cpp",
+ "tools/ProcStats.cpp",
+ "tools/Resources.cpp",
+ "tools/SkMetaData.cpp",
+ "tools/SkSharingProc.cpp",
+ "tools/ToolUtils.cpp",
+ "tools/UrlDataManager.cpp",
+ "tools/debugger/DebugCanvas.cpp",
+ "tools/debugger/DebugLayerManager.cpp",
+ "tools/debugger/DrawCommand.cpp",
+ "tools/debugger/JsonWriteBuffer.cpp",
+ "tools/flags/CommandLineFlags.cpp",
+ "tools/flags/CommonFlagsAA.cpp",
+ "tools/flags/CommonFlagsConfig.cpp",
+ "tools/flags/CommonFlagsGpu.cpp",
+ "tools/flags/CommonFlagsImages.cpp",
+ "tools/fonts/RandomScalerContext.cpp",
+ "tools/fonts/TestFontMgr.cpp",
+ "tools/fonts/TestSVGTypeface.cpp",
+ "tools/fonts/TestTypeface.cpp",
+ "tools/fonts/ToolUtilsFont.cpp",
+ "tools/gpu/BackendSurfaceFactory.cpp",
+ "tools/gpu/BackendTextureImageFactory.cpp",
+ "tools/gpu/FlushFinishTracker.cpp",
+ "tools/gpu/GrContextFactory.cpp",
+ "tools/gpu/GrTest.cpp",
+ "tools/gpu/ManagedBackendTexture.cpp",
+ "tools/gpu/MemoryCache.cpp",
+ "tools/gpu/ProxyUtils.cpp",
+ "tools/gpu/TestContext.cpp",
+ "tools/gpu/TestOps.cpp",
+ "tools/gpu/YUVUtils.cpp",
+ "tools/gpu/gl/GLTestContext.cpp",
+ "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
+ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp",
+ "tools/gpu/mock/MockTestContext.cpp",
+ "tools/gpu/vk/VkTestContext.cpp",
+ "tools/gpu/vk/VkTestHelper.cpp",
+ "tools/gpu/vk/VkTestUtils.cpp",
+ "tools/gpu/vk/VkYcbcrSamplerHelper.cpp",
+ "tools/random_parse_path.cpp",
+ "tools/timer/Timer.cpp",
+ "tools/trace/ChromeTracingTracer.cpp",
+ "tools/trace/EventTracingPriv.cpp",
+ "tools/trace/SkDebugfTracer.cpp",
+ ],
+
+ shared_libs: [
+ "libbinder",
+ "libutils",
+ ],
+}
+
+cc_test {
+ name: "skia_nanobench",
+
+ defaults: [
+ "skia_tool_deps"
+ ],
+
+ local_include_dirs: [
+ "",
+ "include/third_party/vulkan/",
+ "modules/skparagraph/include/",
+ "modules/skparagraph/utils/",
+ "modules/skshaper/include/",
+ "modules/svg/include/",
+ "third_party/libgifcodec/",
+ ],
+
+ srcs: [
+ "bench/AAClipBench.cpp",
+ "bench/AlternatingColorPatternBench.cpp",
+ "bench/AndroidCodecBench.cpp",
+ "bench/BenchLogger.cpp",
+ "bench/Benchmark.cpp",
+ "bench/BezierBench.cpp",
+ "bench/BigPathBench.cpp",
+ "bench/BitmapRegionDecoderBench.cpp",
+ "bench/BlendmodeBench.cpp",
+ "bench/BlurBench.cpp",
+ "bench/BlurImageFilterBench.cpp",
+ "bench/BlurRectBench.cpp",
+ "bench/BlurRectsBench.cpp",
+ "bench/BulkRectBench.cpp",
+ "bench/ChartBench.cpp",
+ "bench/ChecksumBench.cpp",
+ "bench/ChromeBench.cpp",
+ "bench/ClearBench.cpp",
+ "bench/ClipMaskBench.cpp",
+ "bench/ClipStrategyBench.cpp",
+ "bench/CmapBench.cpp",
+ "bench/CodecBench.cpp",
+ "bench/ColorFilterBench.cpp",
+ "bench/ColorPrivBench.cpp",
+ "bench/CompositingImagesBench.cpp",
+ "bench/ControlBench.cpp",
+ "bench/CoverageBench.cpp",
+ "bench/CreateBackendTextureBench.cpp",
+ "bench/CubicMapBench.cpp",
+ "bench/DDLRecorderBench.cpp",
+ "bench/DashBench.cpp",
+ "bench/DisplacementBench.cpp",
+ "bench/DrawBitmapAABench.cpp",
+ "bench/EncodeBench.cpp",
+ "bench/FSRectBench.cpp",
+ "bench/FilteringBench.cpp",
+ "bench/FontCacheBench.cpp",
+ "bench/GMBench.cpp",
+ "bench/GameBench.cpp",
+ "bench/GeometryBench.cpp",
+ "bench/GlyphQuadFillBench.cpp",
+ "bench/GrMemoryPoolBench.cpp",
+ "bench/GrMipmapBench.cpp",
+ "bench/GrPathUtilsBench.cpp",
+ "bench/GrQuadBench.cpp",
+ "bench/GrResourceCacheBench.cpp",
+ "bench/GradientBench.cpp",
+ "bench/HairlinePathBench.cpp",
+ "bench/HardStopGradientBench_ScaleNumColors.cpp",
+ "bench/HardStopGradientBench_ScaleNumHardStops.cpp",
+ "bench/HardStopGradientBench_SpecialHardStops.cpp",
+ "bench/ImageBench.cpp",
+ "bench/ImageCacheBench.cpp",
+ "bench/ImageCacheBudgetBench.cpp",
+ "bench/ImageCycleBench.cpp",
+ "bench/ImageFilterCollapse.cpp",
+ "bench/ImageFilterDAGBench.cpp",
+ "bench/InterpBench.cpp",
+ "bench/JSONBench.cpp",
+ "bench/LightingBench.cpp",
+ "bench/LineBench.cpp",
+ "bench/MSKPBench.cpp",
+ "bench/MathBench.cpp",
+ "bench/Matrix44Bench.cpp",
+ "bench/MatrixBench.cpp",
+ "bench/MatrixConvolutionBench.cpp",
+ "bench/MemsetBench.cpp",
+ "bench/MergeBench.cpp",
+ "bench/MipmapBench.cpp",
+ "bench/MorphologyBench.cpp",
+ "bench/MutexBench.cpp",
+ "bench/PDFBench.cpp",
+ "bench/ParagraphBench.cpp",
+ "bench/PatchBench.cpp",
+ "bench/PathBench.cpp",
+ "bench/PathIterBench.cpp",
+ "bench/PathOpsBench.cpp",
+ "bench/PathTextBench.cpp",
+ "bench/PerlinNoiseBench.cpp",
+ "bench/PictureNestingBench.cpp",
+ "bench/PictureOverheadBench.cpp",
+ "bench/PicturePlaybackBench.cpp",
+ "bench/PolyUtilsBench.cpp",
+ "bench/PremulAndUnpremulAlphaOpsBench.cpp",
+ "bench/QuickRejectBench.cpp",
+ "bench/RTreeBench.cpp",
+ "bench/ReadPixBench.cpp",
+ "bench/RecordingBench.cpp",
+ "bench/RectBench.cpp",
+ "bench/RectanizerBench.cpp",
+ "bench/RefCntBench.cpp",
+ "bench/RegionBench.cpp",
+ "bench/RegionContainBench.cpp",
+ "bench/RepeatTileBench.cpp",
+ "bench/RotatedRectBench.cpp",
+ "bench/SKPAnimationBench.cpp",
+ "bench/SKPBench.cpp",
+ "bench/ScalarBench.cpp",
+ "bench/ShaderMaskFilterBench.cpp",
+ "bench/ShadowBench.cpp",
+ "bench/ShapesBench.cpp",
+ "bench/Sk4fBench.cpp",
+ "bench/SkGlyphCacheBench.cpp",
+ "bench/SkSLBench.cpp",
+ "bench/SortBench.cpp",
+ "bench/StreamBench.cpp",
+ "bench/StrokeBench.cpp",
+ "bench/SwizzleBench.cpp",
+ "bench/TableBench.cpp",
+ "bench/TessellateBench.cpp",
+ "bench/TextBlobBench.cpp",
+ "bench/TileBench.cpp",
+ "bench/TileImageFilterBench.cpp",
+ "bench/TopoSortBench.cpp",
+ "bench/TriangulatorBench.cpp",
+ "bench/TypefaceBench.cpp",
+ "bench/VertBench.cpp",
+ "bench/VertexColorSpaceBench.cpp",
+ "bench/WritePixelsBench.cpp",
+ "bench/WriterBench.cpp",
+ "bench/nanobench.cpp",
+ "gm/3d.cpp",
+ "gm/aaa.cpp",
+ "gm/aaclip.cpp",
+ "gm/aarecteffect.cpp",
+ "gm/aarectmodes.cpp",
+ "gm/aaxfermodes.cpp",
+ "gm/addarc.cpp",
+ "gm/all_bitmap_configs.cpp",
+ "gm/alpha_image.cpp",
+ "gm/alphagradients.cpp",
+ "gm/analytic_gradients.cpp",
+ "gm/androidblendmodes.cpp",
+ "gm/animated_gif.cpp",
+ "gm/animated_image_orientation.cpp",
+ "gm/animatedimageblurs.cpp",
+ "gm/anisotropic.cpp",
+ "gm/annotated_text.cpp",
+ "gm/arcofzorro.cpp",
+ "gm/arcto.cpp",
+ "gm/arithmode.cpp",
+ "gm/asyncrescaleandread.cpp",
+ "gm/b_119394958.cpp",
+ "gm/backdrop.cpp",
+ "gm/backdrop_imagefilter_croprect.cpp",
+ "gm/badpaint.cpp",
+ "gm/bc1_transparency.cpp",
+ "gm/beziereffects.cpp",
+ "gm/beziers.cpp",
+ "gm/bicubic.cpp",
+ "gm/bigblurs.cpp",
+ "gm/bigmatrix.cpp",
+ "gm/bigrect.cpp",
+ "gm/bigrrectaaeffect.cpp",
+ "gm/bigtext.cpp",
+ "gm/bigtileimagefilter.cpp",
+ "gm/bitmapcopy.cpp",
+ "gm/bitmapfilters.cpp",
+ "gm/bitmapimage.cpp",
+ "gm/bitmappremul.cpp",
+ "gm/bitmaprect.cpp",
+ "gm/bitmaprecttest.cpp",
+ "gm/bitmapshader.cpp",
+ "gm/bitmaptiled.cpp",
+ "gm/bleed.cpp",
+ "gm/blend.cpp",
+ "gm/blurcircles.cpp",
+ "gm/blurcircles2.cpp",
+ "gm/blurignorexform.cpp",
+ "gm/blurimagevmask.cpp",
+ "gm/blurpositioning.cpp",
+ "gm/blurquickreject.cpp",
+ "gm/blurrect.cpp",
+ "gm/blurredclippedcircle.cpp",
+ "gm/blurroundrect.cpp",
+ "gm/blurs.cpp",
+ "gm/blurtextsmallradii.cpp",
+ "gm/bmpfilterqualityrepeat.cpp",
+ "gm/bug5252.cpp",
+ "gm/bug530095.cpp",
+ "gm/bug615686.cpp",
+ "gm/bug6643.cpp",
+ "gm/bug6783.cpp",
+ "gm/bug9331.cpp",
+ "gm/cgm.c",
+ "gm/cgms.cpp",
+ "gm/circle_sizes.cpp",
+ "gm/circulararcs.cpp",
+ "gm/circularclips.cpp",
+ "gm/clear_swizzle.cpp",
+ "gm/clip_error.cpp",
+ "gm/clip_sierpinski_region.cpp",
+ "gm/clip_strokerect.cpp",
+ "gm/clipdrawdraw.cpp",
+ "gm/clippedbitmapshaders.cpp",
+ "gm/clockwise.cpp",
+ "gm/collapsepaths.cpp",
+ "gm/color4f.cpp",
+ "gm/coloremoji.cpp",
+ "gm/coloremoji_blendmodes.cpp",
+ "gm/colorfilteralpha8.cpp",
+ "gm/colorfilterimagefilter.cpp",
+ "gm/colorfilters.cpp",
+ "gm/colormatrix.cpp",
+ "gm/colorspace.cpp",
+ "gm/colorwheel.cpp",
+ "gm/colrv1.cpp",
+ "gm/complexclip.cpp",
+ "gm/complexclip2.cpp",
+ "gm/complexclip3.cpp",
+ "gm/complexclip4.cpp",
+ "gm/complexclip_blur_tiled.cpp",
+ "gm/composecolorfilter.cpp",
+ "gm/composeshader.cpp",
+ "gm/compositor_quads.cpp",
+ "gm/compressed_textures.cpp",
+ "gm/concavepaths.cpp",
+ "gm/conicpaths.cpp",
+ "gm/constcolorprocessor.cpp",
+ "gm/convex_all_line_paths.cpp",
+ "gm/convexpaths.cpp",
+ "gm/convexpolyclip.cpp",
+ "gm/convexpolyeffect.cpp",
+ "gm/copy_to_4444.cpp",
+ "gm/crbug_1041204.cpp",
+ "gm/crbug_1073670.cpp",
+ "gm/crbug_1086705.cpp",
+ "gm/crbug_1113794.cpp",
+ "gm/crbug_1139750.cpp",
+ "gm/crbug_1156804.cpp",
+ "gm/crbug_1162942.cpp",
+ "gm/crbug_1167277.cpp",
+ "gm/crbug_1174186.cpp",
+ "gm/crbug_1174354.cpp",
+ "gm/crbug_1177833.cpp",
+ "gm/crbug_224618.cpp",
+ "gm/crbug_691386.cpp",
+ "gm/crbug_788500.cpp",
+ "gm/crbug_847759.cpp",
+ "gm/crbug_884166.cpp",
+ "gm/crbug_887103.cpp",
+ "gm/crbug_892988.cpp",
+ "gm/crbug_899512.cpp",
+ "gm/crbug_905548.cpp",
+ "gm/crbug_908646.cpp",
+ "gm/crbug_913349.cpp",
+ "gm/crbug_918512.cpp",
+ "gm/crbug_938592.cpp",
+ "gm/crbug_946965.cpp",
+ "gm/crbug_947055.cpp",
+ "gm/crbug_996140.cpp",
+ "gm/croppedrects.cpp",
+ "gm/crosscontextimage.cpp",
+ "gm/cubicpaths.cpp",
+ "gm/daa.cpp",
+ "gm/dashcircle.cpp",
+ "gm/dashcubics.cpp",
+ "gm/dashing.cpp",
+ "gm/degeneratesegments.cpp",
+ "gm/dftext.cpp",
+ "gm/dftext_blob_persp.cpp",
+ "gm/discard.cpp",
+ "gm/displacement.cpp",
+ "gm/distantclip.cpp",
+ "gm/draw_bitmap_rect_skbug4374.cpp",
+ "gm/drawable.cpp",
+ "gm/drawatlas.cpp",
+ "gm/drawatlascolor.cpp",
+ "gm/drawbitmaprect.cpp",
+ "gm/drawglyphs.cpp",
+ "gm/drawimageset.cpp",
+ "gm/drawminibitmaprect.cpp",
+ "gm/drawquadset.cpp",
+ "gm/drawregion.cpp",
+ "gm/drawregionmodes.cpp",
+ "gm/dropshadowimagefilter.cpp",
+ "gm/drrect.cpp",
+ "gm/drrect_small_inner.cpp",
+ "gm/dsl_processor_test.cpp",
+ "gm/dstreadshuffle.cpp",
+ "gm/ducky_yuv_blend.cpp",
+ "gm/emboss.cpp",
+ "gm/emptypath.cpp",
+ "gm/encode.cpp",
+ "gm/encode_alpha_jpeg.cpp",
+ "gm/encode_color_types.cpp",
+ "gm/encode_platform.cpp",
+ "gm/encode_srgb.cpp",
+ "gm/exoticformats.cpp",
+ "gm/fadefilter.cpp",
+ "gm/fatpathfill.cpp",
+ "gm/filltypes.cpp",
+ "gm/filltypespersp.cpp",
+ "gm/filterbug.cpp",
+ "gm/filterfastbounds.cpp",
+ "gm/filterindiabox.cpp",
+ "gm/flippity.cpp",
+ "gm/fontcache.cpp",
+ "gm/fontmgr.cpp",
+ "gm/fontregen.cpp",
+ "gm/fontscaler.cpp",
+ "gm/fontscalerdistortable.cpp",
+ "gm/fp_sample_chaining.cpp",
+ "gm/fpcoordinateoverride.cpp",
+ "gm/fwidth_squircle.cpp",
+ "gm/gammatext.cpp",
+ "gm/getpostextpath.cpp",
+ "gm/giantbitmap.cpp",
+ "gm/glyph_pos.cpp",
+ "gm/gm.cpp",
+ "gm/gpu_blur_utils.cpp",
+ "gm/gradient_dirty_laundry.cpp",
+ "gm/gradient_matrix.cpp",
+ "gm/gradients.cpp",
+ "gm/gradients_2pt_conical.cpp",
+ "gm/gradients_degenerate.cpp",
+ "gm/gradients_no_texture.cpp",
+ "gm/gradtext.cpp",
+ "gm/grayscalejpg.cpp",
+ "gm/hairlines.cpp",
+ "gm/hairmodes.cpp",
+ "gm/hardstop_gradients.cpp",
+ "gm/highcontrastfilter.cpp",
+ "gm/hittestpath.cpp",
+ "gm/hsl.cpp",
+ "gm/hugepath.cpp",
+ "gm/image.cpp",
+ "gm/image_pict.cpp",
+ "gm/image_shader.cpp",
+ "gm/imagealphathreshold.cpp",
+ "gm/imageblur.cpp",
+ "gm/imageblur2.cpp",
+ "gm/imageblurclampmode.cpp",
+ "gm/imageblurrepeatmode.cpp",
+ "gm/imageblurtiled.cpp",
+ "gm/imagefilters.cpp",
+ "gm/imagefiltersbase.cpp",
+ "gm/imagefiltersclipped.cpp",
+ "gm/imagefilterscropexpand.cpp",
+ "gm/imagefilterscropped.cpp",
+ "gm/imagefiltersgraph.cpp",
+ "gm/imagefiltersscaled.cpp",
+ "gm/imagefiltersstroked.cpp",
+ "gm/imagefilterstransformed.cpp",
+ "gm/imagefromyuvtextures.cpp",
+ "gm/imagemagnifier.cpp",
+ "gm/imagemakewithfilter.cpp",
+ "gm/imagemasksubset.cpp",
+ "gm/imageresizetiled.cpp",
+ "gm/imagescalealigned.cpp",
+ "gm/imagesource.cpp",
+ "gm/imagesource2.cpp",
+ "gm/internal_links.cpp",
+ "gm/inverseclip.cpp",
+ "gm/inversepaths.cpp",
+ "gm/jpg_color_cube.cpp",
+ "gm/labyrinth.cpp",
+ "gm/largeclippedpath.cpp",
+ "gm/largeglyphblur.cpp",
+ "gm/lattice.cpp",
+ "gm/lazytiling.cpp",
+ "gm/lcdblendmodes.cpp",
+ "gm/lcdoverlap.cpp",
+ "gm/lcdtext.cpp",
+ "gm/lighting.cpp",
+ "gm/linepaths.cpp",
+ "gm/localmatriximagefilter.cpp",
+ "gm/localmatriximageshader.cpp",
+ "gm/localmatrixshader.cpp",
+ "gm/lumafilter.cpp",
+ "gm/mac_aa_explorer.cpp",
+ "gm/make_raster_image.cpp",
+ "gm/makecolorspace.cpp",
+ "gm/mandoline.cpp",
+ "gm/manypaths.cpp",
+ "gm/matrixconvolution.cpp",
+ "gm/matriximagefilter.cpp",
+ "gm/mipmap.cpp",
+ "gm/mixedtextblobs.cpp",
+ "gm/mixercolorfilter.cpp",
+ "gm/modecolorfilters.cpp",
+ "gm/morphology.cpp",
+ "gm/nested.cpp",
+ "gm/ninepatchstretch.cpp",
+ "gm/nonclosedpaths.cpp",
+ "gm/offsetimagefilter.cpp",
+ "gm/orientation.cpp",
+ "gm/ovals.cpp",
+ "gm/overdrawcanvas.cpp",
+ "gm/overdrawcolorfilter.cpp",
+ "gm/overstroke.cpp",
+ "gm/p3.cpp",
+ "gm/particles.cpp",
+ "gm/patch.cpp",
+ "gm/path_stroke_with_zero_length.cpp",
+ "gm/patharcto.cpp",
+ "gm/pathcontourstart.cpp",
+ "gm/patheffects.cpp",
+ "gm/pathfill.cpp",
+ "gm/pathinterior.cpp",
+ "gm/pathmaskcache.cpp",
+ "gm/pathmeasure.cpp",
+ "gm/pathopsinverse.cpp",
+ "gm/pathreverse.cpp",
+ "gm/pdf_never_embed.cpp",
+ "gm/perlinnoise.cpp",
+ "gm/perspimages.cpp",
+ "gm/perspshaders.cpp",
+ "gm/picture.cpp",
+ "gm/pictureimagefilter.cpp",
+ "gm/pictureimagegenerator.cpp",
+ "gm/pictureshader.cpp",
+ "gm/pictureshadercache.cpp",
+ "gm/pictureshadertile.cpp",
+ "gm/pixelsnap.cpp",
+ "gm/plus.cpp",
+ "gm/points.cpp",
+ "gm/poly2poly.cpp",
+ "gm/polygonoffset.cpp",
+ "gm/polygons.cpp",
+ "gm/postercircle.cpp",
+ "gm/preservefillrule.cpp",
+ "gm/quadpaths.cpp",
+ "gm/radial_gradient_precision.cpp",
+ "gm/rasterhandleallocator.cpp",
+ "gm/readpixels.cpp",
+ "gm/recordopts.cpp",
+ "gm/rectangletexture.cpp",
+ "gm/repeated_bitmap.cpp",
+ "gm/resizeimagefilter.cpp",
+ "gm/roundrects.cpp",
+ "gm/rrect.cpp",
+ "gm/rrectclipdrawpaint.cpp",
+ "gm/rrects.cpp",
+ "gm/rsxtext.cpp",
+ "gm/runtimecolorfilter.cpp",
+ "gm/runtimeeffectimage.cpp",
+ "gm/runtimefunctions.cpp",
+ "gm/runtimeintrinsics.cpp",
+ "gm/runtimeshader.cpp",
+ "gm/sample_matrix_constant.cpp",
+ "gm/samplerstress.cpp",
+ "gm/savelayer.cpp",
+ "gm/scaledemoji.cpp",
+ "gm/scaledemoji_rendering.cpp",
+ "gm/scaledstrokes.cpp",
+ "gm/shadermaskfilter.cpp",
+ "gm/shadertext3.cpp",
+ "gm/shadowutils.cpp",
+ "gm/shallowgradient.cpp",
+ "gm/shapes.cpp",
+ "gm/sharedcorners.cpp",
+ "gm/showmiplevels.cpp",
+ "gm/simple_magnification.cpp",
+ "gm/simpleaaclip.cpp",
+ "gm/simplerect.cpp",
+ "gm/skbug1719.cpp",
+ "gm/skbug_257.cpp",
+ "gm/skbug_4868.cpp",
+ "gm/skbug_5321.cpp",
+ "gm/skbug_8664.cpp",
+ "gm/skbug_8955.cpp",
+ "gm/skbug_9319.cpp",
+ "gm/skbug_9819.cpp",
+ "gm/smallarc.cpp",
+ "gm/smallpaths.cpp",
+ "gm/spritebitmap.cpp",
+ "gm/srcmode.cpp",
+ "gm/srgb.cpp",
+ "gm/stlouisarch.cpp",
+ "gm/stringart.cpp",
+ "gm/stroke_rect_shader.cpp",
+ "gm/strokedlines.cpp",
+ "gm/strokefill.cpp",
+ "gm/strokerect.cpp",
+ "gm/strokerect_anisotropic.cpp",
+ "gm/strokerects.cpp",
+ "gm/strokes.cpp",
+ "gm/stroketext.cpp",
+ "gm/subsetshader.cpp",
+ "gm/surface.cpp",
+ "gm/swizzle.cpp",
+ "gm/tablecolorfilter.cpp",
+ "gm/tallstretchedbitmaps.cpp",
+ "gm/tessellation.cpp",
+ "gm/testgradient.cpp",
+ "gm/texelsubset.cpp",
+ "gm/text_scale_skew.cpp",
+ "gm/textblob.cpp",
+ "gm/textblobblockreordering.cpp",
+ "gm/textblobcolortrans.cpp",
+ "gm/textblobgeometrychange.cpp",
+ "gm/textblobmixedsizes.cpp",
+ "gm/textblobrandomfont.cpp",
+ "gm/textblobshader.cpp",
+ "gm/textblobtransforms.cpp",
+ "gm/textblobuseaftergpufree.cpp",
+ "gm/texteffects.cpp",
+ "gm/thinconcavepaths.cpp",
+ "gm/thinrects.cpp",
+ "gm/thinstrokedrects.cpp",
+ "gm/tiledscaledbitmap.cpp",
+ "gm/tileimagefilter.cpp",
+ "gm/tilemodes.cpp",
+ "gm/tilemodes_alpha.cpp",
+ "gm/tilemodes_scaled.cpp",
+ "gm/tinybitmap.cpp",
+ "gm/transparency.cpp",
+ "gm/trickycubicstrokes.cpp",
+ "gm/typeface.cpp",
+ "gm/unpremul.cpp",
+ "gm/userfont.cpp",
+ "gm/variedtext.cpp",
+ "gm/verifiers/gmverifier.cpp",
+ "gm/vertices.cpp",
+ "gm/verylargebitmap.cpp",
+ "gm/wacky_yuv_formats.cpp",
+ "gm/widebuttcaps.cpp",
+ "gm/windowrectangles.cpp",
+ "gm/xfermodeimagefilter.cpp",
+ "gm/xfermodes.cpp",
+ "gm/xfermodes2.cpp",
+ "gm/xfermodes3.cpp",
+ "gm/ycbcrimage.cpp",
+ "gm/yuv420_odd_dim.cpp",
+ "gm/yuvtorgbsubset.cpp",
+ "modules/particles/src/SkParticleBinding.cpp",
+ "modules/particles/src/SkParticleDrawable.cpp",
+ "modules/particles/src/SkParticleEffect.cpp",
+ "modules/particles/src/SkReflected.cpp",
+ "modules/skottie/gm/ExternalProperties.cpp",
+ "modules/skottie/gm/SkottieGM.cpp",
+ "modules/skottie/src/Camera.cpp",
+ "modules/skottie/src/Composition.cpp",
+ "modules/skottie/src/Layer.cpp",
+ "modules/skottie/src/Path.cpp",
+ "modules/skottie/src/Skottie.cpp",
+ "modules/skottie/src/SkottieJson.cpp",
+ "modules/skottie/src/SkottieProperty.cpp",
+ "modules/skottie/src/Transform.cpp",
+ "modules/skottie/src/animator/Animator.cpp",
+ "modules/skottie/src/animator/KeyframeAnimator.cpp",
+ "modules/skottie/src/animator/ScalarKeyframeAnimator.cpp",
+ "modules/skottie/src/animator/ShapeKeyframeAnimator.cpp",
+ "modules/skottie/src/animator/TextKeyframeAnimator.cpp",
+ "modules/skottie/src/animator/Vec2KeyframeAnimator.cpp",
+ "modules/skottie/src/animator/VectorKeyframeAnimator.cpp",
+ "modules/skottie/src/effects/BlackAndWhiteEffect.cpp",
+ "modules/skottie/src/effects/BrightnessContrastEffect.cpp",
+ "modules/skottie/src/effects/CornerPinEffect.cpp",
+ "modules/skottie/src/effects/DisplacementMapEffect.cpp",
+ "modules/skottie/src/effects/DropShadowEffect.cpp",
+ "modules/skottie/src/effects/Effects.cpp",
+ "modules/skottie/src/effects/FillEffect.cpp",
+ "modules/skottie/src/effects/FractalNoiseEffect.cpp",
+ "modules/skottie/src/effects/GaussianBlurEffect.cpp",
+ "modules/skottie/src/effects/GlowStyles.cpp",
+ "modules/skottie/src/effects/GradientEffect.cpp",
+ "modules/skottie/src/effects/HueSaturationEffect.cpp",
+ "modules/skottie/src/effects/InvertEffect.cpp",
+ "modules/skottie/src/effects/LevelsEffect.cpp",
+ "modules/skottie/src/effects/LinearWipeEffect.cpp",
+ "modules/skottie/src/effects/MotionBlurEffect.cpp",
+ "modules/skottie/src/effects/MotionTileEffect.cpp",
+ "modules/skottie/src/effects/RadialWipeEffect.cpp",
+ "modules/skottie/src/effects/ShadowStyles.cpp",
+ "modules/skottie/src/effects/ShiftChannelsEffect.cpp",
+ "modules/skottie/src/effects/SphereEffect.cpp",
+ "modules/skottie/src/effects/ThresholdEffect.cpp",
+ "modules/skottie/src/effects/TintEffect.cpp",
+ "modules/skottie/src/effects/TransformEffect.cpp",
+ "modules/skottie/src/effects/TritoneEffect.cpp",
+ "modules/skottie/src/effects/VenetianBlindsEffect.cpp",
+ "modules/skottie/src/layers/AudioLayer.cpp",
+ "modules/skottie/src/layers/FootageLayer.cpp",
+ "modules/skottie/src/layers/NullLayer.cpp",
+ "modules/skottie/src/layers/PrecompLayer.cpp",
+ "modules/skottie/src/layers/SolidLayer.cpp",
+ "modules/skottie/src/layers/TextLayer.cpp",
+ "modules/skottie/src/layers/shapelayer/Ellipse.cpp",
+ "modules/skottie/src/layers/shapelayer/FillStroke.cpp",
+ "modules/skottie/src/layers/shapelayer/Gradient.cpp",
+ "modules/skottie/src/layers/shapelayer/MergePaths.cpp",
+ "modules/skottie/src/layers/shapelayer/OffsetPaths.cpp",
+ "modules/skottie/src/layers/shapelayer/Polystar.cpp",
+ "modules/skottie/src/layers/shapelayer/PuckerBloat.cpp",
+ "modules/skottie/src/layers/shapelayer/Rectangle.cpp",
+ "modules/skottie/src/layers/shapelayer/Repeater.cpp",
+ "modules/skottie/src/layers/shapelayer/RoundCorners.cpp",
+ "modules/skottie/src/layers/shapelayer/ShapeLayer.cpp",
+ "modules/skottie/src/layers/shapelayer/TrimPaths.cpp",
+ "modules/skottie/src/text/RangeSelector.cpp",
+ "modules/skottie/src/text/SkottieShaper.cpp",
+ "modules/skottie/src/text/TextAdapter.cpp",
+ "modules/skottie/src/text/TextAnimator.cpp",
+ "modules/skottie/src/text/TextValue.cpp",
+ "modules/skottie/utils/SkottieUtils.cpp",
+ "modules/skparagraph/gm/simple_gm.cpp",
+ "modules/skparagraph/src/Decorations.cpp",
+ "modules/skparagraph/src/FontCollection.cpp",
+ "modules/skparagraph/src/OneLineShaper.cpp",
+ "modules/skparagraph/src/ParagraphBuilderImpl.cpp",
+ "modules/skparagraph/src/ParagraphCache.cpp",
+ "modules/skparagraph/src/ParagraphImpl.cpp",
+ "modules/skparagraph/src/ParagraphStyle.cpp",
+ "modules/skparagraph/src/Run.cpp",
+ "modules/skparagraph/src/TextLine.cpp",
+ "modules/skparagraph/src/TextShadow.cpp",
+ "modules/skparagraph/src/TextStyle.cpp",
+ "modules/skparagraph/src/TextWrapper.cpp",
+ "modules/skparagraph/src/TypefaceFontProvider.cpp",
+ "modules/skparagraph/utils/TestFontCollection.cpp",
+ "modules/skresources/src/SkResources.cpp",
+ "modules/sksg/src/SkSGClipEffect.cpp",
+ "modules/sksg/src/SkSGColorFilter.cpp",
+ "modules/sksg/src/SkSGDraw.cpp",
+ "modules/sksg/src/SkSGEffectNode.cpp",
+ "modules/sksg/src/SkSGGeometryEffect.cpp",
+ "modules/sksg/src/SkSGGeometryNode.cpp",
+ "modules/sksg/src/SkSGGradient.cpp",
+ "modules/sksg/src/SkSGGroup.cpp",
+ "modules/sksg/src/SkSGImage.cpp",
+ "modules/sksg/src/SkSGInvalidationController.cpp",
+ "modules/sksg/src/SkSGMaskEffect.cpp",
+ "modules/sksg/src/SkSGMerge.cpp",
+ "modules/sksg/src/SkSGNode.cpp",
+ "modules/sksg/src/SkSGOpacityEffect.cpp",
+ "modules/sksg/src/SkSGPaint.cpp",
+ "modules/sksg/src/SkSGPath.cpp",
+ "modules/sksg/src/SkSGPlane.cpp",
+ "modules/sksg/src/SkSGRect.cpp",
+ "modules/sksg/src/SkSGRenderEffect.cpp",
+ "modules/sksg/src/SkSGRenderNode.cpp",
+ "modules/sksg/src/SkSGScene.cpp",
+ "modules/sksg/src/SkSGText.cpp",
+ "modules/sksg/src/SkSGTransform.cpp",
+ "modules/skshaper/src/SkShaper.cpp",
+ "modules/skshaper/src/SkShaper_harfbuzz.cpp",
+ "modules/skshaper/src/SkShaper_primitive.cpp",
+ "modules/skshaper/src/SkUnicode_icu.cpp",
+ "modules/svg/src/SkSVGAttribute.cpp",
+ "modules/svg/src/SkSVGAttributeParser.cpp",
+ "modules/svg/src/SkSVGCircle.cpp",
+ "modules/svg/src/SkSVGClipPath.cpp",
+ "modules/svg/src/SkSVGContainer.cpp",
+ "modules/svg/src/SkSVGDOM.cpp",
+ "modules/svg/src/SkSVGEllipse.cpp",
+ "modules/svg/src/SkSVGFe.cpp",
+ "modules/svg/src/SkSVGFeBlend.cpp",
+ "modules/svg/src/SkSVGFeColorMatrix.cpp",
+ "modules/svg/src/SkSVGFeComposite.cpp",
+ "modules/svg/src/SkSVGFeDisplacementMap.cpp",
+ "modules/svg/src/SkSVGFeFlood.cpp",
+ "modules/svg/src/SkSVGFeGaussianBlur.cpp",
+ "modules/svg/src/SkSVGFeImage.cpp",
+ "modules/svg/src/SkSVGFeLightSource.cpp",
+ "modules/svg/src/SkSVGFeLighting.cpp",
+ "modules/svg/src/SkSVGFeMorphology.cpp",
+ "modules/svg/src/SkSVGFeOffset.cpp",
+ "modules/svg/src/SkSVGFeTurbulence.cpp",
+ "modules/svg/src/SkSVGFilter.cpp",
+ "modules/svg/src/SkSVGFilterContext.cpp",
+ "modules/svg/src/SkSVGGradient.cpp",
+ "modules/svg/src/SkSVGImage.cpp",
+ "modules/svg/src/SkSVGLine.cpp",
+ "modules/svg/src/SkSVGLinearGradient.cpp",
+ "modules/svg/src/SkSVGMask.cpp",
+ "modules/svg/src/SkSVGNode.cpp",
+ "modules/svg/src/SkSVGPath.cpp",
+ "modules/svg/src/SkSVGPattern.cpp",
+ "modules/svg/src/SkSVGPoly.cpp",
+ "modules/svg/src/SkSVGRadialGradient.cpp",
+ "modules/svg/src/SkSVGRect.cpp",
+ "modules/svg/src/SkSVGRenderContext.cpp",
+ "modules/svg/src/SkSVGSVG.cpp",
+ "modules/svg/src/SkSVGShape.cpp",
+ "modules/svg/src/SkSVGStop.cpp",
+ "modules/svg/src/SkSVGText.cpp",
+ "modules/svg/src/SkSVGTransformableNode.cpp",
+ "modules/svg/src/SkSVGUse.cpp",
+ "modules/svg/src/SkSVGValue.cpp",
+ "third_party/etc1/etc1.cpp",
+ "tools/AndroidSkDebugToStdOut.cpp",
+ "tools/CrashHandler.cpp",
+ "tools/DDLPromiseImageHelper.cpp",
+ "tools/DDLTileHelper.cpp",
+ "tools/LsanSuppressions.cpp",
+ "tools/MSKPPlayer.cpp",
+ "tools/ProcStats.cpp",
+ "tools/Resources.cpp",
+ "tools/SkMetaData.cpp",
+ "tools/SkSharingProc.cpp",
+ "tools/ToolUtils.cpp",
+ "tools/UrlDataManager.cpp",
+ "tools/debugger/DebugCanvas.cpp",
+ "tools/debugger/DebugLayerManager.cpp",
+ "tools/debugger/DrawCommand.cpp",
+ "tools/debugger/JsonWriteBuffer.cpp",
+ "tools/flags/CommandLineFlags.cpp",
+ "tools/flags/CommonFlagsAA.cpp",
+ "tools/flags/CommonFlagsConfig.cpp",
+ "tools/flags/CommonFlagsGpu.cpp",
+ "tools/flags/CommonFlagsImages.cpp",
+ "tools/fonts/RandomScalerContext.cpp",
+ "tools/fonts/TestFontMgr.cpp",
+ "tools/fonts/TestSVGTypeface.cpp",
+ "tools/fonts/TestTypeface.cpp",
+ "tools/fonts/ToolUtilsFont.cpp",
+ "tools/gpu/BackendSurfaceFactory.cpp",
+ "tools/gpu/BackendTextureImageFactory.cpp",
+ "tools/gpu/FlushFinishTracker.cpp",
+ "tools/gpu/GrContextFactory.cpp",
+ "tools/gpu/GrTest.cpp",
+ "tools/gpu/ManagedBackendTexture.cpp",
+ "tools/gpu/MemoryCache.cpp",
+ "tools/gpu/ProxyUtils.cpp",
+ "tools/gpu/TestContext.cpp",
+ "tools/gpu/TestOps.cpp",
+ "tools/gpu/YUVUtils.cpp",
+ "tools/gpu/gl/GLTestContext.cpp",
+ "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
+ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp",
+ "tools/gpu/mock/MockTestContext.cpp",
+ "tools/gpu/vk/VkTestContext.cpp",
+ "tools/gpu/vk/VkTestHelper.cpp",
+ "tools/gpu/vk/VkTestUtils.cpp",
+ "tools/gpu/vk/VkYcbcrSamplerHelper.cpp",
+ "tools/random_parse_path.cpp",
+ "tools/timer/Timer.cpp",
+ "tools/trace/ChromeTracingTracer.cpp",
+ "tools/trace/EventTracingPriv.cpp",
+ "tools/trace/SkDebugfTracer.cpp",
+ ],
+
+ data: [
+ "resources/**/*",
+ ],
+}
diff --git a/CleanSpec.mk b/CleanSpec.mk
new file mode 100644
index 0000000..b84e1b6
--- /dev/null
+++ b/CleanSpec.mk
@@ -0,0 +1,49 @@
+# Copyright (C) 2007 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# If you don't need to do a full clean build but would like to touch
+# a file or delete some intermediate files, add a clean step to the end
+# of the list. These steps will only be run once, if they haven't been
+# run before.
+#
+# E.g.:
+# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
+# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
+#
+# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
+# files that are missing or have been moved.
+#
+# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
+# Use $(OUT_DIR) to refer to the "out" directory.
+#
+# If you need to re-do something that's already mentioned, just copy
+# the command and add it to the bottom of the list. E.g., if a change
+# that you made last week required touching a file and a change you
+# made today requires touching the same file, just copy the old
+# touch step and add it to the end of the list.
+#
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+
+# For example:
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
+#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
+#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
+
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
diff --git a/DATA/skia_resources b/DATA/skia_resources
new file mode 120000
index 0000000..35a4f7a
--- /dev/null
+++ b/DATA/skia_resources
@@ -0,0 +1 @@
+../resources
\ No newline at end of file
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..882e024
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,19 @@
+name: "skia"
+description: "Skia Graphics Library"
+third_party {
+ url {
+ type: HOMEPAGE
+ value: "https://www.skia.org/"
+ }
+ url {
+ type: GIT
+ value: "https://skia.googlesource.com/skia"
+ }
+ version: "d977fdecc63406243a2ff698fa63a5b07a13d593"
+ license_type: RECIPROCAL
+ last_upgrade_date {
+ year: 2021
+ month: 5
+ day: 13
+ }
+}
diff --git a/MODULE_LICENSE_BSD b/MODULE_LICENSE_BSD
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MODULE_LICENSE_BSD
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..41570e8
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,68 @@
+// Copyright (c) 2011 Google Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=========================================================================
+
+The SKIA library also includes a third-party dependency on a nearly
+verbatim copy of the GLU tessellator source code from SGI's OpenGL Sample
+Implementation at http://oss.sgi.com/projects/ogl-sample/. Per
+http://oss.sgi.com/projects/FreeB/, the code is covered under the SGI
+Free Software License B, version 2.0, a copy of which is included below.
+
+SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+
+Copyright (C) [dates of first publication] Silicon Graphics, Inc. All
+Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice including the dates of first publication
+and either this permission notice or a reference to HYPERLINK
+"http://oss.sgi.com/projects/FreeB/"http://oss.sgi.com/projects/FreeB/
+shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Silicon Graphics,
+Inc. shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from Silicon Graphics, Inc.
+
diff --git a/README.android b/README.android
new file mode 100644
index 0000000..fece98e
--- /dev/null
+++ b/README.android
@@ -0,0 +1,13 @@
+The Skia library is a cross-platform 2D-based renderer. The
+key places to look are in the folders:
+
+ include/ : contains public header files
+ src/ : contains src code
+
+The top level makefile is at the root: Android.mk
+
+These files originate from an upstream repository
+(skia.googlesource.com) where the project is actively developed
+and maintained. As a result some files are not relevant to
+Android, but make the merging process smoother.
+
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..6ba23f7
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,18 @@
+{
+ "presubmit": [
+ {
+ "name": "CtsGraphicsTestCases"
+ },
+ {
+ "name": "minikin_tests"
+ },
+ {
+ "name": "librenderengine_test"
+ }
+ ],
+ "imports": [
+ {
+ "path": "cts/tests/tests/uirendering"
+ }
+ ]
+}
diff --git a/android/include/config/SkUserConfig.h b/android/include/config/SkUserConfig.h
new file mode 100644
index 0000000..874b2c0
--- /dev/null
+++ b/android/include/config/SkUserConfig.h
@@ -0,0 +1,88 @@
+// DO NOT MODIFY! This file is autogenerated by gn_to_bp.py.
+// If need to change a define, modify SkUserConfigManual.h
+#pragma once
+#include "SkUserConfigManual.h"
+
+#ifndef SK_CODEC_DECODES_JPEG
+#define SK_CODEC_DECODES_JPEG
+#endif
+
+#ifndef SK_CODEC_DECODES_PNG
+#define SK_CODEC_DECODES_PNG
+#endif
+
+#ifndef SK_CODEC_DECODES_RAW
+#define SK_CODEC_DECODES_RAW
+#endif
+
+#ifndef SK_CODEC_DECODES_WEBP
+#define SK_CODEC_DECODES_WEBP
+#endif
+
+#ifndef SK_ENABLE_ANDROID_UTILS
+#define SK_ENABLE_ANDROID_UTILS
+#endif
+
+#ifndef SK_ENCODE_JPEG
+#define SK_ENCODE_JPEG
+#endif
+
+#ifndef SK_ENCODE_PNG
+#define SK_ENCODE_PNG
+#endif
+
+#ifndef SK_ENCODE_WEBP
+#define SK_ENCODE_WEBP
+#endif
+
+#ifndef SK_GAMMA_APPLY_TO_A8
+#define SK_GAMMA_APPLY_TO_A8
+#endif
+
+#ifndef SK_GAMMA_CONTRAST
+#define SK_GAMMA_CONTRAST 0.0
+#endif
+
+#ifndef SK_GAMMA_EXPONENT
+#define SK_GAMMA_EXPONENT 1.4
+#endif
+
+#ifndef SK_GL
+#define SK_GL
+#endif
+
+#ifndef SK_HAS_ANDROID_CODEC
+#define SK_HAS_ANDROID_CODEC
+#endif
+
+#ifndef SK_HAS_HEIF_LIBRARY
+#define SK_HAS_HEIF_LIBRARY
+#endif
+
+#ifndef SK_SUPPORT_PDF
+#define SK_SUPPORT_PDF
+#endif
+
+#ifndef SK_USE_LIBGIFCODEC
+#define SK_USE_LIBGIFCODEC
+#endif
+
+#ifndef SK_USE_VMA
+#define SK_USE_VMA
+#endif
+
+#ifndef SK_VULKAN
+#define SK_VULKAN
+#endif
+
+#ifndef SK_XML
+#define SK_XML
+#endif
+
+#ifndef SK_BUILD_FOR_ANDROID
+ #error "SK_BUILD_FOR_ANDROID must be defined!"
+#endif
+#if defined(SK_BUILD_FOR_IOS) || defined(SK_BUILD_FOR_MAC) || \
+ defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_WIN)
+ #error "Only SK_BUILD_FOR_ANDROID should be defined!"
+#endif
diff --git a/gm/DATA/skia_resources b/gm/DATA/skia_resources
new file mode 120000
index 0000000..81bd1c5
--- /dev/null
+++ b/gm/DATA/skia_resources
@@ -0,0 +1 @@
+../../resources/
\ No newline at end of file
diff --git a/include/config/SkUserConfig.h b/include/config/SkUserConfig.h
deleted file mode 100644
index 313d324..0000000
--- a/include/config/SkUserConfig.h
+++ /dev/null
@@ -1,89 +0,0 @@
-
-/*
- * Copyright 2006 The Android Open Source Project
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-
-#ifndef SkUserConfig_DEFINED
-#define SkUserConfig_DEFINED
-
-/* SkTypes.h, the root of the public header files, includes this file
- SkUserConfig.h after first initializing certain Skia defines, letting
- this file change or augment those flags.
-
- Below are optional defines that add, subtract, or change default behavior
- in Skia. Your port can locally edit this file to enable/disable flags as
- you choose, or these can be delared on your command line (i.e. -Dfoo).
-
- By default, this include file will always default to having all of the flags
- commented out, so including it will have no effect.
-*/
-
-///////////////////////////////////////////////////////////////////////////////
-
-/* Skia has lots of debug-only code. Often this is just null checks or other
- parameter checking, but sometimes it can be quite intrusive (e.g. check that
- each 32bit pixel is in premultiplied form). This code can be very useful
- during development, but will slow things down in a shipping product.
-
- By default, these mutually exclusive flags are defined in SkTypes.h,
- based on the presence or absence of NDEBUG, but that decision can be changed
- here.
- */
-//#define SK_DEBUG
-//#define SK_RELEASE
-
-/* To write debug messages to a console, skia will call SkDebugf(...) following
- printf conventions (e.g. const char* format, ...). If you want to redirect
- this to something other than printf, define yours here
- */
-//#define SkDebugf(...) MyFunction(__VA_ARGS__)
-
-/*
- * To specify a different default font cache limit, define this. If this is
- * undefined, skia will use a built-in value.
- */
-//#define SK_DEFAULT_FONT_CACHE_LIMIT (1024 * 1024)
-
-/*
- * To specify the default size of the image cache, undefine this and set it to
- * the desired value (in bytes). SkGraphics.h as a runtime API to set this
- * value as well. If this is undefined, a built-in value will be used.
- */
-//#define SK_DEFAULT_IMAGE_CACHE_LIMIT (1024 * 1024)
-
-/* Define this to set the upper limit for text to support LCD. Values that
- are very large increase the cost in the font cache and draw slower, without
- improving readability. If this is undefined, Skia will use its default
- value (e.g. 48)
- */
-//#define SK_MAX_SIZE_FOR_LCDTEXT 48
-
-/* Change the kN32_SkColorType ordering to BGRA to work in X windows.
- */
-//#define SK_R32_SHIFT 16
-
-
-/* Determines whether to build code that supports the GPU backend. Some classes
- that are not GPU-specific, such as SkShader subclasses, have optional code
- that is used allows them to interact with the GPU backend. If you'd like to
- omit this code set SK_SUPPORT_GPU to 0. This also allows you to omit the gpu
- directories from your include search path when you're not building the GPU
- backend. Defaults to 1 (build the GPU code).
- */
-//#define SK_SUPPORT_GPU 1
-
-/* Skia makes use of histogram logging macros to trace the frequency of
- * events. By default, Skia provides no-op versions of these macros.
- * Skia consumers can provide their own definitions of these macros to
- * integrate with their histogram collection backend.
- */
-//#define SK_HISTOGRAM_BOOLEAN(name, sample)
-//#define SK_HISTOGRAM_ENUMERATION(name, sample, enum_size)
-//#define SK_HISTOGRAM_EXACT_LINEAR(name, sample, value_max)
-//#define SK_HISTOGRAM_MEMORY_KB(name, sample)
-
-#endif
diff --git a/include/config/SkUserConfigManual.h b/include/config/SkUserConfigManual.h
new file mode 100644
index 0000000..f90e6c9
--- /dev/null
+++ b/include/config/SkUserConfigManual.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2017 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkUserConfigManual_DEFINED
+#define SkUserConfigManual_DEFINED
+ #define GR_TEST_UTILS 1
+ #define SK_BUILD_FOR_ANDROID_FRAMEWORK
+ #define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
+ #define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
+ #define SK_USE_FREETYPE_EMBOLDEN
+
+ // Disable these Ganesh features
+ #define SK_DISABLE_REDUCE_OPLIST_SPLITTING
+ // Check error is expensive. HWUI historically also doesn't check its allocations
+ #define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
+
+ // Legacy flags
+ #define SK_SUPPORT_DEPRECATED_CLIPOPS
+
+ // Staging flags
+ #define SK_LEGACY_PATH_ARCTO_ENDPOINT
+
+ // Needed until we fix https://bug.skia.org/2440
+ #define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
+ #define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
+ #define SK_SUPPORT_LEGACY_AA_CHOICE
+ #define SK_SUPPORT_LEGACY_AAA_CHOICE
+
+ #define SK_DISABLE_DAA // skbug.com/6886
+
+#endif // SkUserConfigManual_DEFINED
diff --git a/linux/include/config/SkUserConfig.h b/linux/include/config/SkUserConfig.h
new file mode 100644
index 0000000..09df4bd
--- /dev/null
+++ b/linux/include/config/SkUserConfig.h
@@ -0,0 +1,85 @@
+// DO NOT MODIFY! This file is autogenerated by gn_to_bp.py.
+// If need to change a define, modify SkUserConfigManual.h
+#pragma once
+#include "SkUserConfigManual.h"
+
+#ifndef SK_CODEC_DECODES_JPEG
+#define SK_CODEC_DECODES_JPEG
+#endif
+
+#ifndef SK_CODEC_DECODES_PNG
+#define SK_CODEC_DECODES_PNG
+#endif
+
+#ifndef SK_CODEC_DECODES_RAW
+#define SK_CODEC_DECODES_RAW
+#endif
+
+#ifndef SK_CODEC_DECODES_WEBP
+#define SK_CODEC_DECODES_WEBP
+#endif
+
+#ifndef SK_ENABLE_ANDROID_UTILS
+#define SK_ENABLE_ANDROID_UTILS
+#endif
+
+#ifndef SK_ENCODE_JPEG
+#define SK_ENCODE_JPEG
+#endif
+
+#ifndef SK_ENCODE_PNG
+#define SK_ENCODE_PNG
+#endif
+
+#ifndef SK_ENCODE_WEBP
+#define SK_ENCODE_WEBP
+#endif
+
+#ifndef SK_GAMMA_APPLY_TO_A8
+#define SK_GAMMA_APPLY_TO_A8
+#endif
+
+#ifndef SK_GAMMA_CONTRAST
+#define SK_GAMMA_CONTRAST 0.0
+#endif
+
+#ifndef SK_GAMMA_EXPONENT
+#define SK_GAMMA_EXPONENT 1.4
+#endif
+
+#ifndef SK_HAS_ANDROID_CODEC
+#define SK_HAS_ANDROID_CODEC
+#endif
+
+#ifndef SK_R32_SHIFT
+#define SK_R32_SHIFT 16
+#endif
+
+#ifndef SK_SUPPORT_GPU
+#define SK_SUPPORT_GPU 0
+#endif
+
+#ifndef SK_SUPPORT_PDF
+#define SK_SUPPORT_PDF
+#endif
+
+#ifndef SK_USE_LIBGIFCODEC
+#define SK_USE_LIBGIFCODEC
+#endif
+
+#ifndef SK_XML
+#define SK_XML
+#endif
+
+// Correct SK_BUILD_FOR flags that may have been set by
+// SkTypes.h/Android.bp
+#ifndef SK_BUILD_FOR_UNIX
+ #define SK_BUILD_FOR_UNIX
+#endif
+#ifdef SK_BUILD_FOR_ANDROID
+ #undef SK_BUILD_FOR_ANDROID
+#endif
+#if defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_IOS) || \
+ defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_WIN)
+ #error "Only SK_BUILD_FOR_UNIX should be defined!"
+#endif
diff --git a/mac/include/config/SkUserConfig.h b/mac/include/config/SkUserConfig.h
new file mode 100644
index 0000000..d6fbeea
--- /dev/null
+++ b/mac/include/config/SkUserConfig.h
@@ -0,0 +1,89 @@
+// DO NOT MODIFY! This file is autogenerated by gn_to_bp.py.
+// If need to change a define, modify SkUserConfigManual.h
+#pragma once
+#include "SkUserConfigManual.h"
+
+#ifndef SK_ASSUME_GL
+#define SK_ASSUME_GL 1
+#endif
+
+#ifndef SK_CODEC_DECODES_JPEG
+#define SK_CODEC_DECODES_JPEG
+#endif
+
+#ifndef SK_CODEC_DECODES_PNG
+#define SK_CODEC_DECODES_PNG
+#endif
+
+#ifndef SK_CODEC_DECODES_RAW
+#define SK_CODEC_DECODES_RAW
+#endif
+
+#ifndef SK_CODEC_DECODES_WEBP
+#define SK_CODEC_DECODES_WEBP
+#endif
+
+#ifndef SK_ENABLE_ANDROID_UTILS
+#define SK_ENABLE_ANDROID_UTILS
+#endif
+
+#ifndef SK_ENABLE_API_AVAILABLE
+#define SK_ENABLE_API_AVAILABLE
+#endif
+
+#ifndef SK_ENCODE_JPEG
+#define SK_ENCODE_JPEG
+#endif
+
+#ifndef SK_ENCODE_PNG
+#define SK_ENCODE_PNG
+#endif
+
+#ifndef SK_ENCODE_WEBP
+#define SK_ENCODE_WEBP
+#endif
+
+#ifndef SK_GAMMA_APPLY_TO_A8
+#define SK_GAMMA_APPLY_TO_A8
+#endif
+
+#ifndef SK_GAMMA_CONTRAST
+#define SK_GAMMA_CONTRAST 0.0
+#endif
+
+#ifndef SK_GAMMA_EXPONENT
+#define SK_GAMMA_EXPONENT 1.4
+#endif
+
+#ifndef SK_HAS_ANDROID_CODEC
+#define SK_HAS_ANDROID_CODEC
+#endif
+
+#ifndef SK_SUPPORT_GPU
+#define SK_SUPPORT_GPU 0
+#endif
+
+#ifndef SK_SUPPORT_PDF
+#define SK_SUPPORT_PDF
+#endif
+
+#ifndef SK_USE_LIBGIFCODEC
+#define SK_USE_LIBGIFCODEC
+#endif
+
+#ifndef SK_XML
+#define SK_XML
+#endif
+
+// Correct SK_BUILD_FOR flags that may have been set by
+// SkTypes.h/Android.bp
+#ifndef SK_BUILD_FOR_MAC
+ #define SK_BUILD_FOR_MAC
+#endif
+#ifdef SK_BUILD_FOR_ANDROID
+ #undef SK_BUILD_FOR_ANDROID
+#endif
+#if defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_IOS) || \
+ defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_WIN)
+ #error "Only SK_BUILD_FOR_MAC should be defined!"
+#endif
diff --git a/renderengine/include/config/SkUserConfig.h b/renderengine/include/config/SkUserConfig.h
new file mode 100644
index 0000000..7495db5
--- /dev/null
+++ b/renderengine/include/config/SkUserConfig.h
@@ -0,0 +1,36 @@
+// DO NOT MODIFY! This file is autogenerated by gn_to_bp.py.
+// If need to change a define, modify SkUserConfigManual.h
+#pragma once
+#include "SkUserConfigManual.h"
+
+#ifndef SK_ENCODE_PNG
+#define SK_ENCODE_PNG
+#endif
+
+#ifndef SK_GAMMA_APPLY_TO_A8
+#define SK_GAMMA_APPLY_TO_A8
+#endif
+
+#ifndef SK_GL
+#define SK_GL
+#endif
+
+#ifndef SK_HAS_ANDROID_CODEC
+#define SK_HAS_ANDROID_CODEC
+#endif
+
+#ifndef SK_USE_VMA
+#define SK_USE_VMA
+#endif
+
+#ifndef SK_VULKAN
+#define SK_VULKAN
+#endif
+
+#ifndef SK_BUILD_FOR_ANDROID
+ #error "SK_BUILD_FOR_ANDROID must be defined!"
+#endif
+#if defined(SK_BUILD_FOR_IOS) || defined(SK_BUILD_FOR_MAC) || \
+ defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_WIN)
+ #error "Only SK_BUILD_FOR_ANDROID should be defined!"
+#endif
diff --git a/src/codec/SkPngCodec.cpp b/src/codec/SkPngCodec.cpp
index 288dee6..f97a52f 100644
--- a/src/codec/SkPngCodec.cpp
+++ b/src/codec/SkPngCodec.cpp
@@ -933,22 +933,39 @@
}
}
- if (encodedColorType == PNG_COLOR_TYPE_GRAY_ALPHA) {
- png_color_8p sigBits;
- if (png_get_sBIT(fPng_ptr, fInfo_ptr, &sigBits)) {
- if (8 == sigBits->alpha && kGraySigBit_GrayAlphaIsJustAlpha == sigBits->gray) {
- color = SkEncodedInfo::kXAlpha_Color;
+ switch (encodedColorType) {
+ case PNG_COLOR_TYPE_GRAY_ALPHA:{
+ png_color_8p sigBits;
+ if (png_get_sBIT(fPng_ptr, fInfo_ptr, &sigBits)) {
+ if (8 == sigBits->alpha && kGraySigBit_GrayAlphaIsJustAlpha == sigBits->gray) {
+ color = SkEncodedInfo::kXAlpha_Color;
+ }
}
+ break;
}
- } else if (SkEncodedInfo::kOpaque_Alpha == alpha) {
+ case PNG_COLOR_TYPE_RGB:{
+ png_color_8p sigBits;
+ if (png_get_sBIT(fPng_ptr, fInfo_ptr, &sigBits)) {
+ if (5 == sigBits->red && 6 == sigBits->green && 5 == sigBits->blue) {
+ // Recommend a decode to 565 if the sBIT indicates 565.
+ color = SkEncodedInfo::k565_Color;
+ }
+ }
+ break;
+ }
+ }
+
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+ if (encodedColorType != PNG_COLOR_TYPE_GRAY_ALPHA
+ && SkEncodedInfo::kOpaque_Alpha == alpha) {
png_color_8p sigBits;
if (png_get_sBIT(fPng_ptr, fInfo_ptr, &sigBits)) {
if (5 == sigBits->red && 6 == sigBits->green && 5 == sigBits->blue) {
- // Recommend a decode to 565 if the sBIT indicates 565.
- color = SkEncodedInfo::k565_Color;
+ SkAndroidFrameworkUtils::SafetyNetLog("190188264");
}
}
}
+#endif // SK_BUILD_FOR_ANDROID_FRAMEWORK
SkEncodedInfo encodedInfo = SkEncodedInfo::Make(origWidth, origHeight, color, alpha,
bitDepth, std::move(profile));
diff --git a/third_party/libgifcodec/LICENSE.md b/third_party/libgifcodec/LICENSE.md
new file mode 100644
index 0000000..d1f5763
--- /dev/null
+++ b/third_party/libgifcodec/LICENSE.md
@@ -0,0 +1,109 @@
+MPL-1.1 / GPL-2.0 / LGPL-2.1
+============================
+
+SkGifImageReader.cpp and SkGifImageReader.h:
+
+ ***** BEGIN LICENSE BLOCK *****
+ Version: MPL 1.1/GPL 2.0/LGPL 2.1
+
+ The contents of this file are subject to the Mozilla Public License Version
+ 1.1 (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS" basis,
+ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ for the specific language governing rights and limitations under the
+ License.
+
+ The Original Code is mozilla.org code.
+
+ The Initial Developer of the Original Code is
+ Netscape Communications Corporation.
+ Portions created by the Initial Developer are Copyright (C) 1998
+ the Initial Developer. All Rights Reserved.
+
+ Contributor(s):
+ Chris Saari <saari@netscape.com>
+ Apple Computer
+
+ Alternatively, the contents of this file may be used under the terms of
+ either the GNU General Public License Version 2 or later (the "GPL"), or
+ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ in which case the provisions of the GPL or the LGPL are applicable instead
+ of those above. If you wish to allow use of your version of this file only
+ under the terms of either the GPL or the LGPL, and not to allow others to
+ use your version of this file under the terms of the MPL, indicate your
+ decision by deleting the provisions above and replace them with the notice
+ and other provisions required by the GPL or the LGPL. If you do not delete
+ the provisions above, a recipient may use your version of this file under
+ the terms of any one of the MPL, the GPL or the LGPL.
+
+ ***** END LICENSE BLOCK ***** */
+
+
+BSD-3-Clause
+============
+
+libgifcodec.gni, SkGifCodec.h, SkLibGifCodec.cpp, SkLibGifCodec.h:
+
+ Copyright 2019 Google LLC. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ * Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+BSD-2-Clause
+============
+
+SkLibGifCodec.cpp:
+
+ Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/third_party/libgifcodec/README.chromium b/third_party/libgifcodec/README.chromium
new file mode 100644
index 0000000..1ee6a0d
--- /dev/null
+++ b/third_party/libgifcodec/README.chromium
@@ -0,0 +1,9 @@
+Name: libgif codec for Skia
+Short Name: libgifcodec
+URL: https://skia.googlesource.com/libgifcodec/
+Version: unknown
+License: MPL-1.1/GPL-2.0/LGPL-2.1 + BSD-3-Clause + BSD-2-Clause
+License File: LICENSE.md
+Security Critical: yes
+Description: See file README.md
+Local Modifications: None
diff --git a/third_party/libgifcodec/README.md b/third_party/libgifcodec/README.md
new file mode 100644
index 0000000..0acefc6
--- /dev/null
+++ b/third_party/libgifcodec/README.md
@@ -0,0 +1,16 @@
+LIBGIF CODEC FOR SKIA
+=====================
+
+libgifcodec is based on a fork of libgif made by Chromium. It was copied into
+Skia with <https://codereview.chromium.org/2045293002>, as
+<https://skia.googlesource.com/skia/+/19b91531e912283d237435d94516575b28713cba>.
+
+The header file `SkGifCodec.h` exposes two functions:
+
+ * `bool SkGifCodec::IsGif(const void*, size_t);`
+
+ * `std::unique_ptr<SkCodec> SkGifCodec::MakeFromStream(std::unique_ptr<SkStream>, SkCodec::Result*);`
+
+Which can be used by Skia's `SkCodec::MakeFromStream` to implement GIF Decoding.
+
+See [`LICENSE.md`](LICENSE.md) for the license information.
diff --git a/third_party/libgifcodec/SkGifCodec.h b/third_party/libgifcodec/SkGifCodec.h
new file mode 100644
index 0000000..532e7b1
--- /dev/null
+++ b/third_party/libgifcodec/SkGifCodec.h
@@ -0,0 +1,20 @@
+// Copyright 2019 Google LLC.
+// Use of this source code is governed by the BSD-3-Clause license that can be
+// found in the LICENSE.md file.
+
+#ifndef SkGifCodec_DEFINED
+#define SkGifCodec_DEFINED
+
+#include "include/codec/SkCodec.h"
+
+namespace SkGifCodec {
+
+// Returns true if the span of bytes appears to be GIF encoded data.
+bool IsGif(const void*, size_t);
+
+// Assumes IsGif was called and returned true.
+// Reads enough of the stream to determine the image format.
+std::unique_ptr<SkCodec> MakeFromStream(std::unique_ptr<SkStream>, SkCodec::Result*);
+
+} // namespace SkGifCodec
+#endif // SkGifCodec_DEFINED
diff --git a/third_party/libgifcodec/SkGifImageReader.cpp b/third_party/libgifcodec/SkGifImageReader.cpp
new file mode 100644
index 0000000..f0184cb
--- /dev/null
+++ b/third_party/libgifcodec/SkGifImageReader.cpp
@@ -0,0 +1,958 @@
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Chris Saari <saari@netscape.com>
+ * Apple Computer
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+The Graphics Interchange Format(c) is the copyright property of CompuServe
+Incorporated. Only CompuServe Incorporated is authorized to define, redefine,
+enhance, alter, modify or change in any way the definition of the format.
+
+CompuServe Incorporated hereby grants a limited, non-exclusive, royalty-free
+license for the use of the Graphics Interchange Format(sm) in computer
+software; computer software utilizing GIF(sm) must acknowledge ownership of the
+Graphics Interchange Format and its Service Mark by CompuServe Incorporated, in
+User and Technical Documentation. Computer software utilizing GIF, which is
+distributed or may be distributed without User or Technical Documentation must
+display to the screen or printer a message acknowledging ownership of the
+Graphics Interchange Format and the Service Mark by CompuServe Incorporated; in
+this case, the acknowledgement may be displayed in an opening screen or leading
+banner, or a closing screen or trailing banner. A message such as the following
+may be used:
+
+ "The Graphics Interchange Format(c) is the Copyright property of
+ CompuServe Incorporated. GIF(sm) is a Service Mark property of
+ CompuServe Incorporated."
+
+For further information, please contact :
+
+ CompuServe Incorporated
+ Graphics Technology Department
+ 5000 Arlington Center Boulevard
+ Columbus, Ohio 43220
+ U. S. A.
+
+CompuServe Incorporated maintains a mailing list with all those individuals and
+organizations who wish to receive copies of this document when it is corrected
+or revised. This service is offered free of charge; please provide us with your
+mailing address.
+*/
+
+#include "SkGifImageReader.h"
+#include "SkLibGifCodec.h"
+
+#include "include/core/SkColorPriv.h"
+
+#include <algorithm>
+#include <string.h>
+
+
+// GETN(n, s) requests at least 'n' bytes available from 'q', at start of state 's'.
+//
+// Note, the hold will never need to be bigger than 256 bytes to gather up in the hold,
+// as each GIF block (except colormaps) can never be bigger than 256 bytes.
+// Colormaps are directly copied in the resp. global_colormap or dynamically allocated local_colormap.
+// So a fixed buffer in SkGifImageReader is good enough.
+// This buffer is only needed to copy left-over data from one GifWrite call to the next
+#define GETN(n, s) \
+ do { \
+ m_bytesToConsume = (n); \
+ m_state = (s); \
+ } while (0)
+
+// Get a 16-bit value stored in little-endian format.
+#define GETINT16(p) ((p)[1]<<8|(p)[0])
+
+namespace {
+ bool is_palette_index_valid(int transparentIndex) {
+ // -1 is a signal that there is no transparent index.
+ // Otherwise, it is encoded in 8 bits, and all 256 values are considered
+ // valid since a GIF may use an index outside of the palette to be
+ // transparent.
+ return transparentIndex >= 0;
+ }
+} // anonymous namespace
+
+// Send the data to the display front-end.
+void SkGIFLZWContext::outputRow(const unsigned char* rowBegin)
+{
+ int drowStart = irow;
+ int drowEnd = irow;
+
+ // Haeberli-inspired hack for interlaced GIFs: Replicate lines while
+ // displaying to diminish the "venetian-blind" effect as the image is
+ // loaded. Adjust pixel vertical positions to avoid the appearance of the
+ // image crawling up the screen as successive passes are drawn.
+ if (m_frameContext->progressiveDisplay() && m_frameContext->interlaced() && ipass < 4) {
+ unsigned rowDup = 0;
+ unsigned rowShift = 0;
+
+ switch (ipass) {
+ case 1:
+ rowDup = 7;
+ rowShift = 3;
+ break;
+ case 2:
+ rowDup = 3;
+ rowShift = 1;
+ break;
+ case 3:
+ rowDup = 1;
+ rowShift = 0;
+ break;
+ default:
+ break;
+ }
+
+ drowStart -= rowShift;
+ drowEnd = drowStart + rowDup;
+
+ // Extend if bottom edge isn't covered because of the shift upward.
+ if ((unsigned)((m_frameContext->height() - 1) - drowEnd) <= rowShift)
+ drowEnd = m_frameContext->height() - 1;
+
+ // Clamp first and last rows to upper and lower edge of image.
+ if (drowStart < 0)
+ drowStart = 0;
+
+ if (drowEnd >= m_frameContext->height())
+ drowEnd = m_frameContext->height() - 1;
+ }
+
+ // Protect against too much image data.
+ if (drowStart >= m_frameContext->height())
+ return;
+
+ // CALLBACK: Let the client know we have decoded a row.
+ const bool writeTransparentPixels =
+ SkCodec::kNoFrame == m_frameContext->getRequiredFrame();
+ m_client->haveDecodedRow(m_frameContext->frameId(), rowBegin,
+ drowStart, drowEnd - drowStart + 1, writeTransparentPixels);
+
+ if (!m_frameContext->interlaced())
+ irow++;
+ else {
+ do {
+ switch (ipass) {
+ case 1:
+ irow += 8;
+ if (irow >= (unsigned) m_frameContext->height()) {
+ ipass++;
+ irow = 4;
+ }
+ break;
+
+ case 2:
+ irow += 8;
+ if (irow >= (unsigned) m_frameContext->height()) {
+ ipass++;
+ irow = 2;
+ }
+ break;
+
+ case 3:
+ irow += 4;
+ if (irow >= (unsigned) m_frameContext->height()) {
+ ipass++;
+ irow = 1;
+ }
+ break;
+
+ case 4:
+ irow += 2;
+ if (irow >= (unsigned) m_frameContext->height()) {
+ ipass++;
+ irow = 0;
+ }
+ break;
+
+ default:
+ break;
+ }
+ } while (irow > (unsigned) (m_frameContext->height() - 1));
+ }
+}
+
+// Perform Lempel-Ziv-Welch decoding.
+// Returns true if decoding was successful. In this case the block will have been completely consumed and/or rowsRemaining will be 0.
+// Otherwise, decoding failed; returns false in this case, which will always cause the SkGifImageReader to set the "decode failed" flag.
+bool SkGIFLZWContext::doLZW(const unsigned char* block, size_t bytesInBlock)
+{
+ if (rowIter == rowBuffer.end())
+ return true;
+ const int width = m_frameContext->width();
+
+ for (const unsigned char* ch = block; bytesInBlock-- > 0; ch++) {
+ // Feed the next byte into the decoder's 32-bit input buffer.
+ datum += ((int) *ch) << bits;
+ bits += 8;
+
+ // Check for underflow of decoder's 32-bit input buffer.
+ while (bits >= codesize) {
+ // Get the leading variable-length symbol from the data stream.
+ int code = datum & codemask;
+ datum >>= codesize;
+ bits -= codesize;
+
+ // Reset the dictionary to its original state, if requested.
+ if (code == clearCode) {
+ codesize = m_frameContext->dataSize() + 1;
+ codemask = (1 << codesize) - 1;
+ avail = clearCode + 2;
+ oldcode = -1;
+ continue;
+ }
+
+ // Check for explicit end-of-stream code.
+ if (code == (clearCode + 1)) {
+ // end-of-stream should only appear after all image data.
+ if (!rowsRemaining)
+ return true;
+ return false;
+ }
+
+ const int tempCode = code;
+ if (code > avail) {
+ // This is an invalid code. The dictionary is just initialized
+ // and the code is incomplete. We don't know how to handle
+ // this case.
+ return false;
+ }
+
+ if (code == avail) {
+ if (oldcode != -1) {
+ // This is a new code just being added to the dictionary.
+ // It must encode the contents of the previous code, plus
+ // the first character of the previous code again.
+ // Now we know avail is the new code we can use oldcode
+ // value to get the code related to that.
+ code = oldcode;
+ } else {
+ // This is an invalid code. The dictionary is just initialized
+ // and the code is incomplete. We don't know how to handle
+ // this case.
+ return false;
+ }
+ }
+
+ // code length of the oldcode for new code which is
+ // avail = oldcode + firstchar of the oldcode
+ int remaining = suffixLength[code];
+
+ // Round remaining up to multiple of SK_DICTIONARY_WORD_SIZE, because that's
+ // the granularity of the chunks we copy. The last chunk may contain
+ // some garbage but it'll be overwritten by the next code or left unused.
+ // The working buffer is padded to account for this.
+ remaining += -remaining & (SK_DICTIONARY_WORD_SIZE - 1) ;
+ unsigned char* p = rowIter + remaining;
+
+ // Place rowIter so that after writing pixels rowIter can be set to firstchar, thereby
+ // completing the code.
+ rowIter += suffixLength[code];
+
+ while (remaining > 0) {
+ p -= SK_DICTIONARY_WORD_SIZE;
+ std::copy_n(suffix[code].begin(), SK_DICTIONARY_WORD_SIZE, p);
+ code = prefix[code];
+ remaining -= SK_DICTIONARY_WORD_SIZE;
+ }
+ const int firstchar = static_cast<unsigned char>(code); // (strictly `suffix[code][0]`)
+
+ // This completes the new code avail and writing the corresponding
+ // pixels on target.
+ if (tempCode == avail) {
+ *rowIter++ = firstchar;
+ }
+
+ // Define a new codeword in the dictionary as long as we've read
+ // more than one value from the stream.
+ if (avail < SK_MAX_DICTIONARY_ENTRIES && oldcode != -1) {
+ // now add avail to the dictionary for future reference
+ unsigned short codeLength = suffixLength[oldcode] + 1;
+ int l = (codeLength - 1) & (SK_DICTIONARY_WORD_SIZE - 1);
+ // If the suffix buffer is full (l == 0) then oldcode becomes the new
+ // prefix, otherwise copy and extend oldcode's buffer and use the same
+ // prefix as oldcode used.
+ prefix[avail] = (l == 0) ? oldcode : prefix[oldcode];
+ suffix[avail] = suffix[oldcode];
+ suffix[avail][l] = firstchar;
+ suffixLength[avail] = codeLength;
+ ++avail;
+
+ // If we've used up all the codewords of a given length
+ // increase the length of codewords by one bit, but don't
+ // exceed the specified maximum codeword size.
+ if (!(avail & codemask) && avail < SK_MAX_DICTIONARY_ENTRIES) {
+ ++codesize;
+ codemask += avail;
+ }
+ }
+ oldcode = tempCode;
+
+ // Output as many rows as possible.
+ unsigned char* rowBegin = rowBuffer.begin();
+ for (; rowBegin + width <= rowIter; rowBegin += width) {
+ outputRow(rowBegin);
+ rowsRemaining--;
+ if (!rowsRemaining)
+ return true;
+ }
+
+ if (rowBegin != rowBuffer.begin()) {
+ // Move the remaining bytes to the beginning of the buffer.
+ const size_t bytesToCopy = rowIter - rowBegin;
+ memcpy(&rowBuffer.front(), rowBegin, bytesToCopy);
+ rowIter = rowBuffer.begin() + bytesToCopy;
+ }
+ }
+ }
+ return true;
+}
+
+sk_sp<SkColorTable> SkGIFColorMap::buildTable(SkStreamBuffer* streamBuffer, SkColorType colorType,
+ int transparentPixel) const
+{
+ if (!m_isDefined)
+ return nullptr;
+
+ const PackColorProc proc = choose_pack_color_proc(false, colorType);
+ if (m_table && proc == m_packColorProc && m_transPixel == transparentPixel) {
+ SkASSERT(transparentPixel == kNotFound || transparentPixel > m_table->count()
+ || m_table->operator[](transparentPixel) == SK_ColorTRANSPARENT);
+ // This SkColorTable has already been built with the same transparent color and
+ // packing proc. Reuse it.
+ return m_table;
+ }
+ m_packColorProc = proc;
+ m_transPixel = transparentPixel;
+
+ const size_t bytes = m_colors * SK_BYTES_PER_COLORMAP_ENTRY;
+ sk_sp<SkData> rawData(streamBuffer->getDataAtPosition(m_position, bytes));
+ if (!rawData) {
+ return nullptr;
+ }
+
+ SkASSERT(m_colors <= SK_MAX_COLORS);
+ const uint8_t* srcColormap = rawData->bytes();
+ SkPMColor colorStorage[SK_MAX_COLORS];
+ for (int i = 0; i < m_colors; i++) {
+ if (i == transparentPixel) {
+ colorStorage[i] = SK_ColorTRANSPARENT;
+ } else {
+ colorStorage[i] = proc(255, srcColormap[0], srcColormap[1], srcColormap[2]);
+ }
+ srcColormap += SK_BYTES_PER_COLORMAP_ENTRY;
+ }
+ for (int i = m_colors; i < SK_MAX_COLORS; i++) {
+ colorStorage[i] = SK_ColorTRANSPARENT;
+ }
+ m_table = sk_sp<SkColorTable>(new SkColorTable(colorStorage, SK_MAX_COLORS));
+ return m_table;
+}
+
+sk_sp<SkColorTable> SkGifImageReader::getColorTable(SkColorType colorType, int index) {
+ if (index < 0 || index >= m_frames.count()) {
+ return nullptr;
+ }
+
+ const SkGIFFrameContext* frameContext = m_frames[index].get();
+ const SkGIFColorMap& localColorMap = frameContext->localColorMap();
+ const int transPix = frameContext->transparentPixel();
+ if (localColorMap.isDefined()) {
+ return localColorMap.buildTable(&m_streamBuffer, colorType, transPix);
+ }
+ if (m_globalColorMap.isDefined()) {
+ return m_globalColorMap.buildTable(&m_streamBuffer, colorType, transPix);
+ }
+ return nullptr;
+}
+
+// Perform decoding for this frame. frameComplete will be true if the entire frame is decoded.
+// Returns false if a decoding error occurred. This is a fatal error and causes the SkGifImageReader to set the "decode failed" flag.
+// Otherwise, either not enough data is available to decode further than before, or the new data has been decoded successfully; returns true in this case.
+bool SkGIFFrameContext::decode(SkStreamBuffer* streamBuffer, SkLibGifCodec* client,
+ bool* frameComplete)
+{
+ *frameComplete = false;
+ if (!m_lzwContext) {
+ // Wait for more data to properly initialize SkGIFLZWContext.
+ if (!isDataSizeDefined() || !isHeaderDefined())
+ return true;
+
+ m_lzwContext.reset(new SkGIFLZWContext(client, this));
+ if (!m_lzwContext->prepareToDecode()) {
+ m_lzwContext.reset();
+ return false;
+ }
+
+ m_currentLzwBlock = 0;
+ }
+
+ // Some bad GIFs have extra blocks beyond the last row, which we don't want to decode.
+ while (m_currentLzwBlock < m_lzwBlocks.count() && m_lzwContext->hasRemainingRows()) {
+ const auto& block = m_lzwBlocks[m_currentLzwBlock];
+ const size_t len = block.blockSize;
+
+ sk_sp<SkData> data(streamBuffer->getDataAtPosition(block.blockPosition, len));
+ if (!data) {
+ return false;
+ }
+ if (!m_lzwContext->doLZW(reinterpret_cast<const unsigned char*>(data->data()), len)) {
+ return false;
+ }
+ ++m_currentLzwBlock;
+ }
+
+ // If this frame is data complete then the previous loop must have completely decoded all LZW blocks.
+ // There will be no more decoding for this frame so it's time to cleanup.
+ if (isComplete()) {
+ *frameComplete = true;
+ m_lzwContext.reset();
+ }
+ return true;
+}
+
+// Decode a frame.
+// This method uses SkGIFFrameContext:decode() to decode the frame; decoding error is reported to client as a critical failure.
+// Return true if decoding has progressed. Return false if an error has occurred.
+bool SkGifImageReader::decode(int frameIndex, bool* frameComplete)
+{
+ SkGIFFrameContext* currentFrame = m_frames[frameIndex].get();
+
+ return currentFrame->decode(&m_streamBuffer, m_client, frameComplete);
+}
+
+// Parse incoming GIF data stream into internal data structures.
+SkCodec::Result SkGifImageReader::parse(int query)
+{
+ if (m_parseCompleted) {
+ return SkCodec::kSuccess;
+ }
+
+ if ((int) SkGIFLoopCountQuery == query && m_loopCount != cLoopCountNotSeen) {
+ // Loop count has already been parsed.
+ return SkCodec::kSuccess;
+ }
+
+ // SkGIFSizeQuery and SkGIFFrameCountQuery are negative, so this is only meaningful when >= 0.
+ const int lastFrameToParse = query;
+ if (lastFrameToParse >= 0 && m_frames.count() > lastFrameToParse
+ && m_frames[lastFrameToParse]->isComplete()) {
+ // We have already parsed this frame.
+ return SkCodec::kSuccess;
+ }
+
+ while (true) {
+ if (!m_streamBuffer.buffer(m_bytesToConsume)) {
+ // The stream does not yet have enough data.
+ return SkCodec::kIncompleteInput;
+ }
+
+ switch (m_state) {
+ case SkGIFLZW: {
+ SkASSERT(!m_frames.empty());
+ auto* frame = m_frames.back().get();
+ frame->addLzwBlock(m_streamBuffer.markPosition(), m_bytesToConsume);
+ GETN(1, SkGIFSubBlock);
+ break;
+ }
+ case SkGIFLZWStart: {
+ SkASSERT(!m_frames.empty());
+ auto* currentFrame = m_frames.back().get();
+
+ currentFrame->setDataSize(this->getOneByte());
+ GETN(1, SkGIFSubBlock);
+ break;
+ }
+
+ case SkGIFType: {
+ const char* currentComponent = m_streamBuffer.get();
+
+ // All GIF files begin with "GIF87a" or "GIF89a".
+ if (!memcmp(currentComponent, "GIF89a", 6))
+ m_version = 89;
+ else if (!memcmp(currentComponent, "GIF87a", 6))
+ m_version = 87;
+ else {
+ // This prevents attempting to continue reading this invalid stream.
+ GETN(0, SkGIFDone);
+ return SkCodec::kInvalidInput;
+ }
+ GETN(7, SkGIFGlobalHeader);
+ break;
+ }
+
+ case SkGIFGlobalHeader: {
+ const unsigned char* currentComponent =
+ reinterpret_cast<const unsigned char*>(m_streamBuffer.get());
+
+ // This is the height and width of the "screen" or frame into which
+ // images are rendered. The individual images can be smaller than
+ // the screen size and located with an origin anywhere within the
+ // screen.
+ // Note that we don't inform the client of the size yet, as it might
+ // change after we read the first frame's image header.
+ fScreenWidth = GETINT16(currentComponent);
+ fScreenHeight = GETINT16(currentComponent + 2);
+
+ const int globalColorMapColors = 2 << (currentComponent[4] & 0x07);
+
+ if ((currentComponent[4] & 0x80) && globalColorMapColors > 0) { /* global map */
+ m_globalColorMap.setNumColors(globalColorMapColors);
+ GETN(SK_BYTES_PER_COLORMAP_ENTRY * globalColorMapColors, SkGIFGlobalColormap);
+ break;
+ }
+
+ GETN(1, SkGIFImageStart);
+ break;
+ }
+
+ case SkGIFGlobalColormap: {
+ m_globalColorMap.setTablePosition(m_streamBuffer.markPosition());
+ GETN(1, SkGIFImageStart);
+ break;
+ }
+
+ case SkGIFImageStart: {
+ const char currentComponent = m_streamBuffer.get()[0];
+
+ if (currentComponent == '!') { // extension.
+ GETN(2, SkGIFExtension);
+ break;
+ }
+
+ if (currentComponent == ',') { // image separator.
+ GETN(9, SkGIFImageHeader);
+ break;
+ }
+
+ // If we get anything other than ',' (image separator), '!'
+ // (extension), or ';' (trailer), there is extraneous data
+ // between blocks. The GIF87a spec tells us to keep reading
+ // until we find an image separator, but GIF89a says such
+ // a file is corrupt. We follow Mozilla's implementation and
+ // proceed as if the file were correctly terminated, so the
+ // GIF will display.
+ GETN(0, SkGIFDone);
+ break;
+ }
+
+ case SkGIFExtension: {
+ const unsigned char* currentComponent =
+ reinterpret_cast<const unsigned char*>(m_streamBuffer.get());
+
+ size_t bytesInBlock = currentComponent[1];
+ SkGIFState exceptionState = SkGIFSkipBlock;
+
+ switch (*currentComponent) {
+ case 0xf9:
+ // The GIF spec mandates that the GIFControlExtension header block length is 4 bytes,
+ exceptionState = SkGIFControlExtension;
+ // and the parser for this block reads 4 bytes, so we must enforce that the buffer
+ // contains at least this many bytes. If the GIF specifies a different length, we
+ // allow that, so long as it's larger; the additional data will simply be ignored.
+ bytesInBlock = std::max(bytesInBlock, static_cast<size_t>(4));
+ break;
+
+ // The GIF spec also specifies the lengths of the following two extensions' headers
+ // (as 12 and 11 bytes, respectively). Because we ignore the plain text extension entirely
+ // and sanity-check the actual length of the application extension header before reading it,
+ // we allow GIFs to deviate from these values in either direction. This is important for
+ // real-world compatibility, as GIFs in the wild exist with application extension headers
+ // that are both shorter and longer than 11 bytes.
+ case 0x01:
+ // ignoring plain text extension
+ break;
+
+ case 0xff:
+ exceptionState = SkGIFApplicationExtension;
+ break;
+
+ case 0xfe:
+ exceptionState = SkGIFConsumeComment;
+ break;
+ }
+
+ if (bytesInBlock)
+ GETN(bytesInBlock, exceptionState);
+ else
+ GETN(1, SkGIFImageStart);
+ break;
+ }
+
+ case SkGIFConsumeBlock: {
+ const unsigned char currentComponent = this->getOneByte();
+ if (!currentComponent)
+ GETN(1, SkGIFImageStart);
+ else
+ GETN(currentComponent, SkGIFSkipBlock);
+ break;
+ }
+
+ case SkGIFSkipBlock: {
+ GETN(1, SkGIFConsumeBlock);
+ break;
+ }
+
+ case SkGIFControlExtension: {
+ const unsigned char* currentComponent =
+ reinterpret_cast<const unsigned char*>(m_streamBuffer.get());
+
+ addFrameIfNecessary();
+ SkGIFFrameContext* currentFrame = m_frames.back().get();
+ if (*currentComponent & 0x1)
+ currentFrame->setTransparentPixel(currentComponent[3]);
+
+ // We ignore the "user input" bit.
+
+ // NOTE: This relies on the values in the FrameDisposalMethod enum
+ // matching those in the GIF spec!
+ int rawDisposalMethod = ((*currentComponent) >> 2) & 0x7;
+ switch (rawDisposalMethod) {
+ case 1:
+ case 2:
+ case 3:
+ currentFrame->setDisposalMethod((SkCodecAnimation::DisposalMethod) rawDisposalMethod);
+ break;
+ case 4:
+ // Some specs say that disposal method 3 is "overwrite previous", others that setting
+ // the third bit of the field (i.e. method 4) is. We map both to the same value.
+ currentFrame->setDisposalMethod(SkCodecAnimation::DisposalMethod::kRestorePrevious);
+ break;
+ default:
+ // Other values use the default.
+ currentFrame->setDisposalMethod(SkCodecAnimation::DisposalMethod::kKeep);
+ break;
+ }
+ currentFrame->setDuration(GETINT16(currentComponent + 1) * 10);
+ GETN(1, SkGIFConsumeBlock);
+ break;
+ }
+
+ case SkGIFCommentExtension: {
+ const unsigned char currentComponent = this->getOneByte();
+ if (currentComponent)
+ GETN(currentComponent, SkGIFConsumeComment);
+ else
+ GETN(1, SkGIFImageStart);
+ break;
+ }
+
+ case SkGIFConsumeComment: {
+ GETN(1, SkGIFCommentExtension);
+ break;
+ }
+
+ case SkGIFApplicationExtension: {
+ // Check for netscape application extension.
+ if (m_bytesToConsume == 11) {
+ const unsigned char* currentComponent =
+ reinterpret_cast<const unsigned char*>(m_streamBuffer.get());
+
+ if (!memcmp(currentComponent, "NETSCAPE2.0", 11) || !memcmp(currentComponent, "ANIMEXTS1.0", 11))
+ GETN(1, SkGIFNetscapeExtensionBlock);
+ }
+
+ if (m_state != SkGIFNetscapeExtensionBlock)
+ GETN(1, SkGIFConsumeBlock);
+ break;
+ }
+
+ // Netscape-specific GIF extension: animation looping.
+ case SkGIFNetscapeExtensionBlock: {
+ const int currentComponent = this->getOneByte();
+ // SkGIFConsumeNetscapeExtension always reads 3 bytes from the stream; we should at least wait for this amount.
+ if (currentComponent)
+ GETN(std::max(3, currentComponent), SkGIFConsumeNetscapeExtension);
+ else
+ GETN(1, SkGIFImageStart);
+ break;
+ }
+
+ // Parse netscape-specific application extensions
+ case SkGIFConsumeNetscapeExtension: {
+ const unsigned char* currentComponent =
+ reinterpret_cast<const unsigned char*>(m_streamBuffer.get());
+
+ int netscapeExtension = currentComponent[0] & 7;
+
+ // Loop entire animation specified # of times. Only read the loop count during the first iteration.
+ if (netscapeExtension == 1) {
+ m_loopCount = GETINT16(currentComponent + 1);
+
+ // Zero loop count is infinite animation loop request.
+ if (!m_loopCount)
+ m_loopCount = SkCodec::kRepetitionCountInfinite;
+
+ GETN(1, SkGIFNetscapeExtensionBlock);
+
+ if ((int) SkGIFLoopCountQuery == query) {
+ m_streamBuffer.flush();
+ return SkCodec::kSuccess;
+ }
+ } else if (netscapeExtension == 2) {
+ // Wait for specified # of bytes to enter buffer.
+
+ // Don't do this, this extension doesn't exist (isn't used at all)
+ // and doesn't do anything, as our streaming/buffering takes care of it all...
+ // See: http://semmix.pl/color/exgraf/eeg24.htm
+ GETN(1, SkGIFNetscapeExtensionBlock);
+ } else {
+ // 0,3-7 are yet to be defined netscape extension codes
+ // This prevents attempting to continue reading this invalid stream.
+ GETN(0, SkGIFDone);
+ return SkCodec::kInvalidInput;
+ }
+ break;
+ }
+
+ case SkGIFImageHeader: {
+ int height, width, xOffset, yOffset;
+ const unsigned char* currentComponent =
+ reinterpret_cast<const unsigned char*>(m_streamBuffer.get());
+
+ /* Get image offsets, with respect to the screen origin */
+ xOffset = GETINT16(currentComponent);
+ yOffset = GETINT16(currentComponent + 2);
+
+ /* Get image width and height. */
+ width = GETINT16(currentComponent + 4);
+ height = GETINT16(currentComponent + 6);
+
+ // Some GIF files have frames that don't fit in the specified
+ // overall image size. For the first frame, we can simply enlarge
+ // the image size to allow the frame to be visible. We can't do
+ // this on subsequent frames because the rest of the decoding
+ // infrastructure assumes the image size won't change as we
+ // continue decoding, so any subsequent frames that are even
+ // larger will be cropped.
+ // Luckily, handling just the first frame is sufficient to deal
+ // with most cases, e.g. ones where the image size is erroneously
+ // set to zero, since usually the first frame completely fills
+ // the image.
+ if (currentFrameIsFirstFrame()) {
+ fScreenHeight = std::max(fScreenHeight, yOffset + height);
+ fScreenWidth = std::max(fScreenWidth, xOffset + width);
+ }
+
+ // NOTE: Chromium placed this block after setHeaderDefined, down
+ // below we returned true when asked for the size. So Chromium
+ // created an image which would fail. Is this the correct behavior?
+ // We choose to return false early, so we will not create an
+ // SkCodec.
+
+ // Work around more broken GIF files that have zero image width or
+ // height.
+ if (!height || !width) {
+ height = fScreenHeight;
+ width = fScreenWidth;
+ if (!height || !width) {
+ // This prevents attempting to continue reading this invalid stream.
+ GETN(0, SkGIFDone);
+ return SkCodec::kInvalidInput;
+ }
+ }
+
+ const bool isLocalColormapDefined = SkToBool(currentComponent[8] & 0x80);
+ // The three low-order bits of currentComponent[8] specify the bits per pixel.
+ const int numColors = 2 << (currentComponent[8] & 0x7);
+ if (currentFrameIsFirstFrame()) {
+ const int transPix = m_frames.empty() ? SkGIFColorMap::kNotFound
+ : m_frames[0]->transparentPixel();
+ if (is_palette_index_valid(transPix)) {
+ m_firstFrameHasAlpha = true;
+ } else {
+ const bool frameIsSubset = xOffset > 0 || yOffset > 0
+ || width < fScreenWidth
+ || height < fScreenHeight;
+ m_firstFrameHasAlpha = frameIsSubset;
+ }
+ }
+
+ addFrameIfNecessary();
+ SkGIFFrameContext* currentFrame = m_frames.back().get();
+ currentFrame->setHeaderDefined();
+
+ if (query == (int) SkGIFSizeQuery) {
+ // The decoder needs to stop, so we return here, before
+ // flushing the buffer. Next time through, we'll be in the same
+ // state, requiring the same amount in the buffer.
+ return SkCodec::kSuccess;
+ }
+
+
+ currentFrame->setXYWH(xOffset, yOffset, width, height);
+ currentFrame->setInterlaced(SkToBool(currentComponent[8] & 0x40));
+
+ // Overlaying interlaced, transparent GIFs over
+ // existing image data using the Haeberli display hack
+ // requires saving the underlying image in order to
+ // avoid jaggies at the transparency edges. We are
+ // unprepared to deal with that, so don't display such
+ // images progressively. Which means only the first
+ // frame can be progressively displayed.
+ // FIXME: It is possible that a non-transparent frame
+ // can be interlaced and progressively displayed.
+ currentFrame->setProgressiveDisplay(currentFrameIsFirstFrame());
+
+ if (isLocalColormapDefined) {
+ currentFrame->localColorMap().setNumColors(numColors);
+ GETN(SK_BYTES_PER_COLORMAP_ENTRY * numColors, SkGIFImageColormap);
+ break;
+ }
+
+ setAlphaAndRequiredFrame(currentFrame);
+ GETN(1, SkGIFLZWStart);
+ break;
+ }
+
+ case SkGIFImageColormap: {
+ SkASSERT(!m_frames.empty());
+ auto* currentFrame = m_frames.back().get();
+ auto& cmap = currentFrame->localColorMap();
+ cmap.setTablePosition(m_streamBuffer.markPosition());
+ setAlphaAndRequiredFrame(currentFrame);
+ GETN(1, SkGIFLZWStart);
+ break;
+ }
+
+ case SkGIFSubBlock: {
+ const size_t bytesInBlock = this->getOneByte();
+ if (bytesInBlock)
+ GETN(bytesInBlock, SkGIFLZW);
+ else {
+ // Finished parsing one frame; Process next frame.
+ SkASSERT(!m_frames.empty());
+ // Note that some broken GIF files do not have enough LZW blocks to fully
+ // decode all rows but we treat it as frame complete.
+ m_frames.back()->setComplete();
+ GETN(1, SkGIFImageStart);
+ if (lastFrameToParse >= 0 && m_frames.count() > lastFrameToParse) {
+ m_streamBuffer.flush();
+ return SkCodec::kSuccess;
+ }
+ }
+ break;
+ }
+
+ case SkGIFDone: {
+ m_parseCompleted = true;
+ return SkCodec::kSuccess;
+ }
+
+ default:
+ // We shouldn't ever get here.
+ // This prevents attempting to continue reading this invalid stream.
+ GETN(0, SkGIFDone);
+ return SkCodec::kInvalidInput;
+ break;
+ } // switch
+ m_streamBuffer.flush();
+ }
+}
+
+void SkGifImageReader::addFrameIfNecessary()
+{
+ if (m_frames.empty() || m_frames.back()->isComplete()) {
+ const int i = m_frames.count();
+ m_frames.emplace_back(new SkGIFFrameContext(i));
+ }
+}
+
+SkEncodedInfo::Alpha SkGIFFrameContext::onReportedAlpha() const {
+ // Note: We could correct these after decoding - i.e. some frames may turn out to be
+ // independent and opaque if they do not use the transparent pixel, but that would require
+ // checking whether each pixel used the transparent index.
+ return is_palette_index_valid(this->transparentPixel()) ? SkEncodedInfo::kBinary_Alpha
+ : SkEncodedInfo::kOpaque_Alpha;
+}
+
+// FIXME: Move this method to close to doLZW().
+bool SkGIFLZWContext::prepareToDecode()
+{
+ SkASSERT(m_frameContext->isDataSizeDefined() && m_frameContext->isHeaderDefined());
+
+ // Since we use a codesize of 1 more than the datasize, we need to ensure
+ // that our datasize is strictly less than the SK_MAX_DICTIONARY_ENTRY_BITS.
+ if (m_frameContext->dataSize() >= SK_MAX_DICTIONARY_ENTRY_BITS)
+ return false;
+ clearCode = 1 << m_frameContext->dataSize();
+ avail = clearCode + 2;
+ oldcode = -1;
+ codesize = m_frameContext->dataSize() + 1;
+ codemask = (1 << codesize) - 1;
+ datum = bits = 0;
+ ipass = m_frameContext->interlaced() ? 1 : 0;
+ irow = 0;
+
+ // We want to know the longest sequence encodable by a dictionary with
+ // SK_MAX_DICTIONARY_ENTRIES entries. If we ignore the need to encode the base
+ // values themselves at the beginning of the dictionary, as well as the need
+ // for a clear code or a termination code, we could use every entry to
+ // encode a series of multiple values. If the input value stream looked
+ // like "AAAAA..." (a long string of just one value), the first dictionary
+ // entry would encode AA, the next AAA, the next AAAA, and so forth. Thus
+ // the longest sequence would be SK_MAX_DICTIONARY_ENTRIES + 1 values.
+ //
+ // However, we have to account for reserved entries. The first |datasize|
+ // bits are reserved for the base values, and the next two entries are
+ // reserved for the clear code and termination code. In theory a GIF can
+ // set the datasize to 0, meaning we have just two reserved entries, making
+ // the longest sequence (SK_MAX_DICTIONARY_ENTRIES + 1) - 2 values long. Since
+ // each value is a byte, this is also the number of bytes in the longest
+ // encodable sequence.
+ constexpr size_t kMaxSequence = SK_MAX_DICTIONARY_ENTRIES - 1;
+ constexpr size_t kMaxBytes = (kMaxSequence + SK_DICTIONARY_WORD_SIZE - 1)
+ & ~(SK_DICTIONARY_WORD_SIZE - 1);
+
+ // Now allocate the output buffer. We decode directly into this buffer
+ // until we have at least one row worth of data, then call outputRow().
+ // This means worst case we may have (row width - 1) bytes in the buffer
+ // and then decode a sequence |kMaxBytes| long to append.
+ rowBuffer.reset(m_frameContext->width() - 1 + kMaxBytes);
+ rowIter = rowBuffer.begin();
+ rowsRemaining = m_frameContext->height();
+
+ // Clearing the whole suffix table lets us be more tolerant of bad data.
+ for (int i = 0; i < clearCode; ++i) {
+ std::fill_n(suffix[i].begin(), SK_DICTIONARY_WORD_SIZE, 0);
+ suffix[i][0] = i;
+ suffixLength[i] = 1;
+ prefix[i] = i; // ensure that we have a place to find firstchar
+ }
+ return true;
+}
diff --git a/third_party/libgifcodec/SkGifImageReader.h b/third_party/libgifcodec/SkGifImageReader.h
new file mode 100644
index 0000000..98f7d36
--- /dev/null
+++ b/third_party/libgifcodec/SkGifImageReader.h
@@ -0,0 +1,398 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef SkGifImageReader_h
+#define SkGifImageReader_h
+
+// Define ourselves as the clientPtr. Mozilla just hacked their C++ callback class into this old C decoder,
+// so we will too.
+class SkLibGifCodec;
+
+#include "include/codec/SkCodec.h"
+#include "include/codec/SkCodecAnimation.h"
+#include "include/core/SkData.h"
+#include "include/core/SkImageInfo.h"
+#include "include/private/SkTArray.h"
+#include "src/codec/SkCodecPriv.h"
+#include "src/codec/SkColorTable.h"
+#include "src/codec/SkFrameHolder.h"
+#include "src/codec/SkStreamBuffer.h"
+
+#include <array>
+#include <memory>
+
+typedef SkTArray<unsigned char, true> SkGIFRow;
+
+
+#define SK_MAX_DICTIONARY_ENTRY_BITS 12
+#define SK_MAX_DICTIONARY_ENTRIES 4096 // 2^SK_MAX_DICTIONARY_ENTRY_BITS
+#define SK_MAX_COLORS 256
+#define SK_BYTES_PER_COLORMAP_ENTRY 3
+#define SK_DICTIONARY_WORD_SIZE 8
+
+// List of possible parsing states.
+enum SkGIFState {
+ SkGIFType,
+ SkGIFGlobalHeader,
+ SkGIFGlobalColormap,
+ SkGIFImageStart,
+ SkGIFImageHeader,
+ SkGIFImageColormap,
+ SkGIFImageBody,
+ SkGIFLZWStart,
+ SkGIFLZW,
+ SkGIFSubBlock,
+ SkGIFExtension,
+ SkGIFControlExtension,
+ SkGIFConsumeBlock,
+ SkGIFSkipBlock,
+ SkGIFDone,
+ SkGIFCommentExtension,
+ SkGIFApplicationExtension,
+ SkGIFNetscapeExtensionBlock,
+ SkGIFConsumeNetscapeExtension,
+ SkGIFConsumeComment
+};
+
+class SkGIFFrameContext;
+class SkGIFColorMap;
+
+// LZW decoder state machine.
+class SkGIFLZWContext final : public SkNoncopyable {
+public:
+ SkGIFLZWContext(SkLibGifCodec* client, const SkGIFFrameContext* frameContext)
+ : codesize(0)
+ , codemask(0)
+ , clearCode(0)
+ , avail(0)
+ , oldcode(0)
+ , bits(0)
+ , datum(0)
+ , ipass(0)
+ , irow(0)
+ , rowsRemaining(0)
+ , rowIter(nullptr)
+ , m_client(client)
+ , m_frameContext(frameContext)
+ { }
+
+ bool prepareToDecode();
+ void outputRow(const unsigned char* rowBegin);
+ bool doLZW(const unsigned char* block, size_t bytesInBlock);
+ bool hasRemainingRows() { return SkToBool(rowsRemaining); }
+
+private:
+ // LZW decoding states and output states.
+ int codesize;
+ int codemask;
+ int clearCode; // Codeword used to trigger dictionary reset.
+ int avail; // Index of next available slot in dictionary.
+ int oldcode;
+ int bits; // Number of unread bits in "datum".
+ int datum; // 32-bit input buffer.
+ int ipass; // Interlace pass; Ranges 1-4 if interlaced.
+ size_t irow; // Current output row, starting at zero.
+ size_t rowsRemaining; // Rows remaining to be output.
+
+ unsigned short prefix[SK_MAX_DICTIONARY_ENTRIES];
+ std::array<std::array<unsigned char, SK_DICTIONARY_WORD_SIZE>,
+ SK_MAX_DICTIONARY_ENTRIES> suffix;
+ unsigned short suffixLength[SK_MAX_DICTIONARY_ENTRIES];
+ SkGIFRow rowBuffer; // Single scanline temporary buffer.
+ unsigned char* rowIter;
+
+ SkLibGifCodec* const m_client;
+ const SkGIFFrameContext* m_frameContext;
+};
+
+struct SkGIFLZWBlock {
+ public:
+ SkGIFLZWBlock(size_t position, size_t size)
+ : blockPosition(position), blockSize(size) {}
+
+ size_t blockPosition;
+ size_t blockSize;
+};
+
+class SkGIFColorMap final {
+public:
+ static constexpr int kNotFound = -1;
+
+ SkGIFColorMap()
+ : m_isDefined(false)
+ , m_position(0)
+ , m_colors(0)
+ , m_transPixel(kNotFound)
+ , m_packColorProc(nullptr)
+ {
+ }
+
+ void setNumColors(int colors) {
+ SkASSERT(!m_colors);
+ SkASSERT(!m_position);
+
+ m_colors = colors;
+ }
+
+ void setTablePosition(size_t position) {
+ SkASSERT(!m_isDefined);
+
+ m_position = position;
+ m_isDefined = true;
+ }
+
+ int numColors() const { return m_colors; }
+
+ bool isDefined() const { return m_isDefined; }
+
+ // Build RGBA table using the data stream.
+ sk_sp<SkColorTable> buildTable(SkStreamBuffer*, SkColorType dstColorType,
+ int transparentPixel) const;
+
+private:
+ bool m_isDefined;
+ size_t m_position;
+ int m_colors;
+ // Cached values. If these match on a new request, we can reuse m_table.
+ mutable int m_transPixel;
+ mutable PackColorProc m_packColorProc;
+ mutable sk_sp<SkColorTable> m_table;
+};
+
+class SkGifImageReader;
+
+// LocalFrame output state machine.
+class SkGIFFrameContext : public SkFrame {
+public:
+ SkGIFFrameContext(int id)
+ : INHERITED(id)
+ , m_transparentPixel(SkGIFColorMap::kNotFound)
+ , m_dataSize(0)
+ , m_progressiveDisplay(false)
+ , m_interlaced(false)
+ , m_currentLzwBlock(0)
+ , m_isComplete(false)
+ , m_isHeaderDefined(false)
+ , m_isDataSizeDefined(false)
+ {
+ }
+
+ ~SkGIFFrameContext() override
+ {
+ }
+
+ void addLzwBlock(size_t position, size_t size)
+ {
+ m_lzwBlocks.emplace_back(position, size);
+ }
+
+ bool decode(SkStreamBuffer*, SkLibGifCodec* client, bool* frameDecoded);
+
+ int transparentPixel() const { return m_transparentPixel; }
+ void setTransparentPixel(int pixel) { m_transparentPixel = pixel; }
+
+ bool isComplete() const { return m_isComplete; }
+ void setComplete() { m_isComplete = true; }
+ bool isHeaderDefined() const { return m_isHeaderDefined; }
+ void setHeaderDefined() { m_isHeaderDefined = true; }
+ bool isDataSizeDefined() const { return m_isDataSizeDefined; }
+ int dataSize() const { return m_dataSize; }
+ void setDataSize(int size)
+ {
+ m_dataSize = size;
+ m_isDataSizeDefined = true;
+ }
+ bool progressiveDisplay() const { return m_progressiveDisplay; }
+ void setProgressiveDisplay(bool progressiveDisplay) { m_progressiveDisplay = progressiveDisplay; }
+ bool interlaced() const { return m_interlaced; }
+ void setInterlaced(bool interlaced) { m_interlaced = interlaced; }
+
+ void clearDecodeState() { m_lzwContext.reset(); }
+ const SkGIFColorMap& localColorMap() const { return m_localColorMap; }
+ SkGIFColorMap& localColorMap() { return m_localColorMap; }
+
+protected:
+ SkEncodedInfo::Alpha onReportedAlpha() const override;
+
+private:
+ int m_transparentPixel; // Index of transparent pixel. Value is kNotFound if there is no transparent pixel.
+ int m_dataSize;
+
+ bool m_progressiveDisplay; // If true, do Haeberli interlace hack.
+ bool m_interlaced; // True, if scanlines arrive interlaced order.
+
+ std::unique_ptr<SkGIFLZWContext> m_lzwContext;
+ // LZW blocks for this frame.
+ SkTArray<SkGIFLZWBlock> m_lzwBlocks;
+
+ SkGIFColorMap m_localColorMap;
+
+ int m_currentLzwBlock;
+ bool m_isComplete;
+ bool m_isHeaderDefined;
+ bool m_isDataSizeDefined;
+
+ typedef SkFrame INHERITED;
+};
+
+class SkGifImageReader final : public SkFrameHolder {
+public:
+ // This takes ownership of stream.
+ SkGifImageReader(std::unique_ptr<SkStream> stream)
+ : m_client(nullptr)
+ , m_state(SkGIFType)
+ , m_bytesToConsume(6) // Number of bytes for GIF type, either "GIF87a" or "GIF89a".
+ , m_version(0)
+ , m_loopCount(cLoopCountNotSeen)
+ , m_streamBuffer(std::move(stream))
+ , m_parseCompleted(false)
+ , m_firstFrameHasAlpha(false)
+ {
+ }
+
+ ~SkGifImageReader() override
+ {
+ }
+
+ void setClient(SkLibGifCodec* client) { m_client = client; }
+
+ // Option to pass to parse(). All enums are negative, because a non-negative value is used to
+ // indicate that the Reader should parse up to and including the frame indicated.
+ enum SkGIFParseQuery {
+ // Parse enough to determine the size. Note that this parses the first frame's header,
+ // since we may decide to expand based on the frame's dimensions.
+ SkGIFSizeQuery = -1,
+ // Parse to the end, so we know about all frames.
+ SkGIFFrameCountQuery = -2,
+ // Parse until we see the loop count.
+ SkGIFLoopCountQuery = -3,
+ };
+
+ // Parse incoming GIF data stream into internal data structures.
+ // Non-negative values are used to indicate to parse through that frame.
+ SkCodec::Result parse(int);
+
+ // Decode the frame indicated by frameIndex.
+ // frameComplete will be set to true if the frame is completely decoded.
+ // The method returns false if there is an error.
+ bool decode(int frameIndex, bool* frameComplete);
+
+ int imagesCount() const
+ {
+ const int frames = m_frames.count();
+ if (!frames) {
+ return 0;
+ }
+
+ // This avoids counting an empty frame when the file is truncated (or
+ // simply not yet complete) after receiving SkGIFControlExtension (and
+ // possibly SkGIFImageHeader) but before reading the color table. This
+ // ensures that we do not count a frame before we know its required
+ // frame.
+ return m_frames.back()->reachedStartOfData() ? frames : frames - 1;
+ }
+ int loopCount() const {
+ if (cLoopCountNotSeen == m_loopCount) {
+ return 0;
+ }
+ return m_loopCount;
+ }
+
+ const SkGIFColorMap& globalColorMap() const
+ {
+ return m_globalColorMap;
+ }
+
+ const SkGIFFrameContext* frameContext(int index) const
+ {
+ return index >= 0 && index < m_frames.count()
+ ? m_frames[index].get() : nullptr;
+ }
+
+ void clearDecodeState() {
+ for (int index = 0; index < m_frames.count(); index++) {
+ m_frames[index]->clearDecodeState();
+ }
+ }
+
+ // Return the color table for frame index (which may be the global color table).
+ sk_sp<SkColorTable> getColorTable(SkColorType dstColorType, int index);
+
+ bool firstFrameHasAlpha() const { return m_firstFrameHasAlpha; }
+
+protected:
+ const SkFrame* onGetFrame(int i) const override {
+ return static_cast<const SkFrame*>(this->frameContext(i));
+ }
+
+private:
+ // Requires that one byte has been buffered into m_streamBuffer.
+ unsigned char getOneByte() const {
+ return reinterpret_cast<const unsigned char*>(m_streamBuffer.get())[0];
+ }
+
+ void addFrameIfNecessary();
+ bool currentFrameIsFirstFrame() const
+ {
+ return m_frames.empty() || (m_frames.count() == 1 && !m_frames[0]->isComplete());
+ }
+
+ // Unowned pointer
+ SkLibGifCodec* m_client;
+
+ // Parsing state machine.
+ SkGIFState m_state; // Current decoder master state.
+ size_t m_bytesToConsume; // Number of bytes to consume for next stage of parsing.
+
+ // Global (multi-image) state.
+ int m_version; // Either 89 for GIF89 or 87 for GIF87.
+ SkGIFColorMap m_globalColorMap;
+
+ static constexpr int cLoopCountNotSeen = -2;
+ int m_loopCount; // Netscape specific extension block to control the number of animation loops a GIF renders.
+
+ SkTArray<std::unique_ptr<SkGIFFrameContext>> m_frames;
+
+ SkStreamBuffer m_streamBuffer;
+ bool m_parseCompleted;
+
+ // This value can be computed before we create a SkGIFFrameContext, so we
+ // store it here instead of on m_frames[0].
+ bool m_firstFrameHasAlpha;
+};
+
+#endif
diff --git a/third_party/libgifcodec/SkLibGifCodec.cpp b/third_party/libgifcodec/SkLibGifCodec.cpp
new file mode 100644
index 0000000..95f5bf1
--- /dev/null
+++ b/third_party/libgifcodec/SkLibGifCodec.cpp
@@ -0,0 +1,538 @@
+// Copyright 2015 Google Inc.
+// Use of this source code is governed by the BSD-3-Clause license that can be
+// found in the LICENSE.md file.
+
+/*
+ * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "SkGifCodec.h"
+#include "SkLibGifCodec.h"
+
+#include "include/codec/SkCodecAnimation.h"
+#include "include/core/SkStream.h"
+#include "include/private/SkColorData.h"
+#include "src/codec/SkCodecPriv.h"
+#include "src/codec/SkColorTable.h"
+#include "src/codec/SkSwizzler.h"
+
+#include <algorithm>
+
+#define GIF87_STAMP "GIF87a"
+#define GIF89_STAMP "GIF89a"
+#define GIF_STAMP_LEN 6
+
+/*
+ * Checks the start of the stream to see if the image is a gif
+ */
+bool SkGifCodec::IsGif(const void* buf, size_t bytesRead) {
+ if (bytesRead >= GIF_STAMP_LEN) {
+ if (memcmp(GIF87_STAMP, buf, GIF_STAMP_LEN) == 0 ||
+ memcmp(GIF89_STAMP, buf, GIF_STAMP_LEN) == 0)
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+/*
+ * Error function
+ */
+static SkCodec::Result gif_error(const char* msg, SkCodec::Result result = SkCodec::kInvalidInput) {
+ SkCodecPrintf("Gif Error: %s\n", msg);
+ return result;
+}
+
+std::unique_ptr<SkCodec> SkGifCodec::MakeFromStream(std::unique_ptr<SkStream> stream,
+ SkCodec::Result* result) {
+ std::unique_ptr<SkGifImageReader> reader(new SkGifImageReader(std::move(stream)));
+ *result = reader->parse(SkGifImageReader::SkGIFSizeQuery);
+ if (*result != SkCodec::kSuccess) {
+ return nullptr;
+ }
+
+ // If no images are in the data, or the first header is not yet defined, we cannot
+ // create a codec. In either case, the width and height are not yet known.
+ auto* frame = reader->frameContext(0);
+ if (!frame || !frame->isHeaderDefined()) {
+ *result = SkCodec::kInvalidInput;
+ return nullptr;
+ }
+
+ // isHeaderDefined() will not return true if the screen size is empty.
+ SkASSERT(reader->screenHeight() > 0 && reader->screenWidth() > 0);
+
+ const auto alpha = reader->firstFrameHasAlpha() ? SkEncodedInfo::kBinary_Alpha
+ : SkEncodedInfo::kOpaque_Alpha;
+ // Use kPalette since Gifs are encoded with a color table.
+ // FIXME: Gifs can actually be encoded with 4-bits per pixel. Using 8 works, but we could skip
+ // expanding to 8 bits and take advantage of the SkSwizzler to work from 4.
+ auto encodedInfo = SkEncodedInfo::Make(reader->screenWidth(), reader->screenHeight(),
+ SkEncodedInfo::kPalette_Color, alpha, 8);
+ return std::unique_ptr<SkCodec>(new SkLibGifCodec(std::move(encodedInfo), reader.release()));
+}
+
+bool SkLibGifCodec::onRewind() {
+ fReader->clearDecodeState();
+ return true;
+}
+
+SkLibGifCodec::SkLibGifCodec(SkEncodedInfo&& encodedInfo, SkGifImageReader* reader)
+ : INHERITED(std::move(encodedInfo), skcms_PixelFormat_RGBA_8888, nullptr)
+ , fReader(reader)
+ , fTmpBuffer(nullptr)
+ , fSwizzler(nullptr)
+ , fCurrColorTable(nullptr)
+ , fCurrColorTableIsReal(false)
+ , fFilledBackground(false)
+ , fFirstCallToIncrementalDecode(false)
+ , fDst(nullptr)
+ , fDstRowBytes(0)
+ , fRowsDecoded(0)
+{
+ reader->setClient(this);
+}
+
+int SkLibGifCodec::onGetFrameCount() {
+ fReader->parse(SkGifImageReader::SkGIFFrameCountQuery);
+ return fReader->imagesCount();
+}
+
+bool SkLibGifCodec::onGetFrameInfo(int i, SkCodec::FrameInfo* frameInfo) const {
+ if (i >= fReader->imagesCount()) {
+ return false;
+ }
+
+ const SkGIFFrameContext* frameContext = fReader->frameContext(i);
+ SkASSERT(frameContext->reachedStartOfData());
+
+ if (frameInfo) {
+ frameContext->fillIn(frameInfo, frameContext->isComplete());
+
+ auto* rect = &frameInfo->fFrameRect;
+ auto bounds = this->bounds();
+ if (!rect->intersect(bounds)) {
+ // If a frame is offscreen, it will have no effect on the output
+ // image. Modify its bounds to be consistent with the Wuffs
+ // implementation.
+ rect->setLTRB(std::min(rect->left(), bounds.right()),
+ std::min(rect->top(), bounds.bottom()),
+ std::min(rect->right(), bounds.right()),
+ std::min(rect->bottom(), bounds.bottom()));
+ }
+ }
+ return true;
+}
+
+int SkLibGifCodec::onGetRepetitionCount() {
+ fReader->parse(SkGifImageReader::SkGIFLoopCountQuery);
+ return fReader->loopCount();
+}
+
+static constexpr SkColorType kXformSrcColorType = kRGBA_8888_SkColorType;
+
+void SkLibGifCodec::initializeColorTable(const SkImageInfo& dstInfo, int frameIndex) {
+ SkColorType colorTableColorType = dstInfo.colorType();
+ if (this->colorXform()) {
+ colorTableColorType = kXformSrcColorType;
+ }
+
+ sk_sp<SkColorTable> currColorTable = fReader->getColorTable(colorTableColorType, frameIndex);
+ fCurrColorTableIsReal = static_cast<bool>(currColorTable);
+ if (!fCurrColorTableIsReal) {
+ // This is possible for an empty frame. Create a dummy with one value (transparent).
+ SkPMColor color = SK_ColorTRANSPARENT;
+ fCurrColorTable.reset(new SkColorTable(&color, 1));
+ } else if (this->colorXform() && !this->xformOnDecode()) {
+ SkPMColor dstColors[256];
+ this->applyColorXform(dstColors, currColorTable->readColors(),
+ currColorTable->count());
+ fCurrColorTable.reset(new SkColorTable(dstColors, currColorTable->count()));
+ } else {
+ fCurrColorTable = std::move(currColorTable);
+ }
+}
+
+
+SkCodec::Result SkLibGifCodec::prepareToDecode(const SkImageInfo& dstInfo, const Options& opts) {
+ if (opts.fSubset) {
+ return gif_error("Subsets not supported.\n", kUnimplemented);
+ }
+
+ const int frameIndex = opts.fFrameIndex;
+ if (frameIndex > 0 && kRGB_565_SkColorType == dstInfo.colorType()) {
+ // FIXME: In theory, we might be able to support this, but it's not clear that it
+ // is necessary (Chromium does not decode to 565, and Android does not decode
+ // frames beyond the first). Disabling it because it is somewhat difficult:
+ // - If there is a transparent pixel, and this frame draws on top of another frame
+ // (if the frame is independent with a transparent pixel, we should not decode to
+ // 565 anyway, since it is not opaque), we need to skip drawing the transparent
+ // pixels (see writeTransparentPixels in haveDecodedRow). We currently do this by
+ // first swizzling into temporary memory, then copying into the destination. (We
+ // let the swizzler handle it first because it may need to sample.) After
+ // swizzling to 565, we do not know which pixels in our temporary memory
+ // correspond to the transparent pixel, so we do not know what to skip. We could
+ // special case the non-sampled case (no need to swizzle), but as this is
+ // currently unused we can just not support it.
+ return gif_error("Cannot decode multiframe gif (except frame 0) as 565.\n",
+ kInvalidConversion);
+ }
+
+ const auto* frame = fReader->frameContext(frameIndex);
+ SkASSERT(frame);
+ if (0 == frameIndex) {
+ // SkCodec does not have a way to just parse through frame 0, so we
+ // have to do so manually, here.
+ fReader->parse((SkGifImageReader::SkGIFParseQuery) 0);
+ if (!frame->reachedStartOfData()) {
+ // We have parsed enough to know that there is a color map, but cannot
+ // parse the map itself yet. Exit now, so we do not build an incorrect
+ // table.
+ return gif_error("color map not available yet\n", kIncompleteInput);
+ }
+ } else {
+ // Parsing happened in SkCodec::getPixels.
+ SkASSERT(frameIndex < fReader->imagesCount());
+ SkASSERT(frame->reachedStartOfData());
+ }
+
+ if (this->xformOnDecode()) {
+ fXformBuffer.reset(new uint32_t[dstInfo.width()]);
+ sk_bzero(fXformBuffer.get(), dstInfo.width() * sizeof(uint32_t));
+ }
+
+ fTmpBuffer.reset(new uint8_t[dstInfo.minRowBytes()]);
+
+ this->initializeColorTable(dstInfo, frameIndex);
+ this->initializeSwizzler(dstInfo, frameIndex);
+
+ SkASSERT(fCurrColorTable);
+ return kSuccess;
+}
+
+void SkLibGifCodec::initializeSwizzler(const SkImageInfo& dstInfo, int frameIndex) {
+ const SkGIFFrameContext* frame = fReader->frameContext(frameIndex);
+ // This is only called by prepareToDecode, which ensures frameIndex is in range.
+ SkASSERT(frame);
+
+ const int xBegin = frame->xOffset();
+ const int xEnd = std::min(frame->frameRect().right(), fReader->screenWidth());
+
+ // CreateSwizzler only reads left and right of the frame. We cannot use the frame's raw
+ // frameRect, since it might extend beyond the edge of the frame.
+ SkIRect swizzleRect = SkIRect::MakeLTRB(xBegin, 0, xEnd, 0);
+
+ SkImageInfo swizzlerInfo = dstInfo;
+ if (this->colorXform()) {
+ swizzlerInfo = swizzlerInfo.makeColorType(kXformSrcColorType);
+ if (kPremul_SkAlphaType == dstInfo.alphaType()) {
+ swizzlerInfo = swizzlerInfo.makeAlphaType(kUnpremul_SkAlphaType);
+ }
+ }
+
+ // The default Options should be fine:
+ // - we'll ignore if the memory is zero initialized - unless we're the first frame, this won't
+ // matter anyway.
+ // - subsets are not supported for gif
+ // - the swizzler does not need to know about the frame.
+ // We may not be able to use the real Options anyway, since getPixels does not store it (due to
+ // a bug).
+ fSwizzler = SkSwizzler::Make(this->getEncodedInfo(), fCurrColorTable->readColors(),
+ swizzlerInfo, Options(), &swizzleRect);
+ SkASSERT(fSwizzler.get());
+}
+
+/*
+ * Initiates the gif decode
+ */
+SkCodec::Result SkLibGifCodec::onGetPixels(const SkImageInfo& dstInfo,
+ void* pixels, size_t dstRowBytes,
+ const Options& opts,
+ int* rowsDecoded) {
+ Result result = this->prepareToDecode(dstInfo, opts);
+ switch (result) {
+ case kSuccess:
+ break;
+ case kIncompleteInput:
+ // onStartIncrementalDecode treats this as incomplete, since it may
+ // provide more data later, but in this case, no more data will be
+ // provided, and there is nothing to draw. We also cannot return
+ // kIncompleteInput, which will make SkCodec attempt to fill
+ // remaining rows, but that requires an SkSwizzler, which we have
+ // not created.
+ return kInvalidInput;
+ default:
+ return result;
+ }
+
+ if (dstInfo.dimensions() != this->dimensions()) {
+ return gif_error("Scaling not supported.\n", kInvalidScale);
+ }
+
+ fDst = pixels;
+ fDstRowBytes = dstRowBytes;
+
+ return this->decodeFrame(true, opts, rowsDecoded);
+}
+
+SkCodec::Result SkLibGifCodec::onStartIncrementalDecode(const SkImageInfo& dstInfo,
+ void* pixels, size_t dstRowBytes,
+ const SkCodec::Options& opts) {
+ Result result = this->prepareToDecode(dstInfo, opts);
+ if (result != kSuccess) {
+ return result;
+ }
+
+ fDst = pixels;
+ fDstRowBytes = dstRowBytes;
+
+ fFirstCallToIncrementalDecode = true;
+
+ return kSuccess;
+}
+
+SkCodec::Result SkLibGifCodec::onIncrementalDecode(int* rowsDecoded) {
+ // It is possible the client has appended more data. Parse, if needed.
+ const auto& options = this->options();
+ const int frameIndex = options.fFrameIndex;
+ fReader->parse((SkGifImageReader::SkGIFParseQuery) frameIndex);
+
+ const bool firstCallToIncrementalDecode = fFirstCallToIncrementalDecode;
+ fFirstCallToIncrementalDecode = false;
+ return this->decodeFrame(firstCallToIncrementalDecode, options, rowsDecoded);
+}
+
+SkCodec::Result SkLibGifCodec::decodeFrame(bool firstAttempt, const Options& opts, int* rowsDecoded) {
+ const SkImageInfo& dstInfo = this->dstInfo();
+ const int scaledHeight = get_scaled_dimension(dstInfo.height(), fSwizzler->sampleY());
+
+ const int frameIndex = opts.fFrameIndex;
+ SkASSERT(frameIndex < fReader->imagesCount());
+ const SkGIFFrameContext* frameContext = fReader->frameContext(frameIndex);
+ if (firstAttempt) {
+ // rowsDecoded reports how many rows have been initialized, so a layer above
+ // can fill the rest. In some cases, we fill the background before decoding
+ // (or it is already filled for us), so we report rowsDecoded to be the full
+ // height.
+ bool filledBackground = false;
+ if (frameContext->getRequiredFrame() == kNoFrame) {
+ // We may need to clear to transparent for one of the following reasons:
+ // - The frameRect does not cover the full bounds. haveDecodedRow will
+ // only draw inside the frameRect, so we need to clear the rest.
+ // - The frame is interlaced. There is no obvious way to fill
+ // afterwards for an incomplete image. (FIXME: Does the first pass
+ // cover all rows? If so, we do not have to fill here.)
+ // - There is no color table for this frame. In that case will not
+ // draw anything, so we need to fill.
+ if (frameContext->frameRect() != this->bounds()
+ || frameContext->interlaced() || !fCurrColorTableIsReal) {
+ auto fillInfo = dstInfo.makeWH(fSwizzler->fillWidth(), scaledHeight);
+ SkSampler::Fill(fillInfo, fDst, fDstRowBytes, opts.fZeroInitialized);
+ filledBackground = true;
+ }
+ } else {
+ // Not independent.
+ // SkCodec ensured that the prior frame has been decoded.
+ filledBackground = true;
+ }
+
+ fFilledBackground = filledBackground;
+ if (filledBackground) {
+ // Report the full (scaled) height, since the client will never need to fill.
+ fRowsDecoded = scaledHeight;
+ } else {
+ // This will be updated by haveDecodedRow.
+ fRowsDecoded = 0;
+ }
+ }
+
+ if (!fCurrColorTableIsReal) {
+ // Nothing to draw this frame.
+ return kSuccess;
+ }
+
+ bool frameDecoded = false;
+ const bool fatalError = !fReader->decode(frameIndex, &frameDecoded);
+ if (fatalError || !frameDecoded || fRowsDecoded != scaledHeight) {
+ if (rowsDecoded) {
+ *rowsDecoded = fRowsDecoded;
+ }
+ if (fatalError) {
+ return kErrorInInput;
+ }
+ return kIncompleteInput;
+ }
+
+ return kSuccess;
+}
+
+void SkLibGifCodec::applyXformRow(const SkImageInfo& dstInfo, void* dst, const uint8_t* src) const {
+ if (this->xformOnDecode()) {
+ SkASSERT(this->colorXform());
+ fSwizzler->swizzle(fXformBuffer.get(), src);
+
+ const int xformWidth = get_scaled_dimension(dstInfo.width(), fSwizzler->sampleX());
+ this->applyColorXform(dst, fXformBuffer.get(), xformWidth);
+ } else {
+ fSwizzler->swizzle(dst, src);
+ }
+}
+
+template <typename T>
+static void blend_line(void* dstAsVoid, const void* srcAsVoid, int width) {
+ T* dst = reinterpret_cast<T*>(dstAsVoid);
+ const T* src = reinterpret_cast<const T*>(srcAsVoid);
+ while (width --> 0) {
+ if (*src != 0) { // GIF pixels are either transparent (== 0) or opaque (!= 0).
+ *dst = *src;
+ }
+ src++;
+ dst++;
+ }
+}
+
+void SkLibGifCodec::haveDecodedRow(int frameIndex, const unsigned char* rowBegin,
+ int rowNumber, int repeatCount, bool writeTransparentPixels)
+{
+ const SkGIFFrameContext* frameContext = fReader->frameContext(frameIndex);
+ // The pixel data and coordinates supplied to us are relative to the frame's
+ // origin within the entire image size, i.e.
+ // (frameContext->xOffset, frameContext->yOffset). There is no guarantee
+ // that width == (size().width() - frameContext->xOffset), so
+ // we must ensure we don't run off the end of either the source data or the
+ // row's X-coordinates.
+ const int width = frameContext->width();
+ const int xBegin = frameContext->xOffset();
+ const int yBegin = frameContext->yOffset() + rowNumber;
+ const int xEnd = std::min(xBegin + width, this->dimensions().width());
+ const int yEnd = std::min(yBegin + repeatCount, this->dimensions().height());
+ // FIXME: No need to make the checks on width/xBegin/xEnd for every row. We could instead do
+ // this once in prepareToDecode.
+ if (!width || (xBegin < 0) || (yBegin < 0) || (xEnd <= xBegin) || (yEnd <= yBegin))
+ return;
+
+ // yBegin is the first row in the non-sampled image. dstRow will be the row in the output,
+ // after potentially scaling it.
+ int dstRow = yBegin;
+
+ const int sampleY = fSwizzler->sampleY();
+ if (sampleY > 1) {
+ // Check to see whether this row or one that falls in the repeatCount is needed in the
+ // output.
+ bool foundNecessaryRow = false;
+ for (int i = 0; i < repeatCount; i++) {
+ const int potentialRow = yBegin + i;
+ if (fSwizzler->rowNeeded(potentialRow)) {
+ dstRow = potentialRow / sampleY;
+ const int scaledHeight = get_scaled_dimension(this->dstInfo().height(), sampleY);
+ if (dstRow >= scaledHeight) {
+ return;
+ }
+
+ foundNecessaryRow = true;
+ repeatCount -= i;
+
+ repeatCount = (repeatCount - 1) / sampleY + 1;
+
+ // Make sure the repeatCount does not take us beyond the end of the dst
+ if (dstRow + repeatCount > scaledHeight) {
+ repeatCount = scaledHeight - dstRow;
+ SkASSERT(repeatCount >= 1);
+ }
+ break;
+ }
+ }
+
+ if (!foundNecessaryRow) {
+ return;
+ }
+ } else {
+ // Make sure the repeatCount does not take us beyond the end of the dst
+ SkASSERT(this->dstInfo().height() >= yBegin);
+ repeatCount = std::min(repeatCount, this->dstInfo().height() - yBegin);
+ }
+
+ if (!fFilledBackground) {
+ // At this point, we are definitely going to write the row, so count it towards the number
+ // of rows decoded.
+ // We do not consider the repeatCount, which only happens for interlaced, in which case we
+ // have already set fRowsDecoded to the proper value (reflecting that we have filled the
+ // background).
+ fRowsDecoded++;
+ }
+
+ // decodeFrame will early exit if this is false, so this method will not be
+ // called.
+ SkASSERT(fCurrColorTableIsReal);
+
+ // The swizzler takes care of offsetting into the dst width-wise.
+ void* dstLine = SkTAddOffset<void>(fDst, dstRow * fDstRowBytes);
+
+ // We may or may not need to write transparent pixels to the buffer.
+ // If we're compositing against a previous image, it's wrong, but if
+ // we're decoding an interlaced gif and displaying it "Haeberli"-style,
+ // we must write these for passes beyond the first, or the initial passes
+ // will "show through" the later ones.
+ const auto dstInfo = this->dstInfo();
+ if (writeTransparentPixels) {
+ this->applyXformRow(dstInfo, dstLine, rowBegin);
+ } else {
+ this->applyXformRow(dstInfo, fTmpBuffer.get(), rowBegin);
+
+ size_t offsetBytes = fSwizzler->swizzleOffsetBytes();
+ if (dstInfo.colorType() == kRGBA_F16_SkColorType) {
+ // Account for the fact that post-swizzling we converted to F16,
+ // which is twice as wide.
+ offsetBytes *= 2;
+ }
+ const void* src = SkTAddOffset<void>(fTmpBuffer.get(), offsetBytes);
+ void* dst = SkTAddOffset<void>(dstLine, offsetBytes);
+
+ switch (dstInfo.colorType()) {
+ case kBGRA_8888_SkColorType:
+ case kRGBA_8888_SkColorType:
+ blend_line<uint32_t>(dst, src, fSwizzler->swizzleWidth());
+ break;
+ case kRGBA_F16_SkColorType:
+ blend_line<uint64_t>(dst, src, fSwizzler->swizzleWidth());
+ break;
+ default:
+ SkASSERT(false);
+ return;
+ }
+ }
+
+ // Tell the frame to copy the row data if need be.
+ if (repeatCount > 1) {
+ const size_t bytesPerPixel = this->dstInfo().bytesPerPixel();
+ const size_t bytesToCopy = fSwizzler->swizzleWidth() * bytesPerPixel;
+ void* copiedLine = SkTAddOffset<void>(dstLine, fSwizzler->swizzleOffsetBytes());
+ void* dst = copiedLine;
+ for (int i = 1; i < repeatCount; i++) {
+ dst = SkTAddOffset<void>(dst, fDstRowBytes);
+ memcpy(dst, copiedLine, bytesToCopy);
+ }
+ }
+}
diff --git a/third_party/libgifcodec/SkLibGifCodec.h b/third_party/libgifcodec/SkLibGifCodec.h
new file mode 100644
index 0000000..014df5f
--- /dev/null
+++ b/third_party/libgifcodec/SkLibGifCodec.h
@@ -0,0 +1,153 @@
+// Copyright 2015 Google Inc.
+// Use of this source code is governed by the BSD-3-Clause license that can be
+// found in the LICENSE.md file.
+#ifndef SkLibGifCodec_DEFINED
+#define SkLibGifCodec_DEFINED
+
+#include "SkGifImageReader.h"
+
+#include "include/codec/SkCodec.h"
+#include "include/codec/SkCodecAnimation.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkImageInfo.h"
+#include "src/codec/SkColorTable.h"
+#include "src/codec/SkSwizzler.h"
+
+/*
+ *
+ * This class implements the decoding for gif images
+ *
+ */
+class SkLibGifCodec : public SkCodec {
+public:
+ static bool IsGif(const void*, size_t);
+
+ /*
+ * Assumes IsGif was called and returned true
+ * Reads enough of the stream to determine the image format
+ */
+ static std::unique_ptr<SkCodec> MakeFromStream(std::unique_ptr<SkStream>, Result*);
+
+ // Callback for SkGifImageReader when a row is available.
+ void haveDecodedRow(int frameIndex, const unsigned char* rowBegin,
+ int rowNumber, int repeatCount, bool writeTransparentPixels);
+ /*
+ * Creates an instance of the decoder
+ * Called only by NewFromStream
+ * Takes ownership of the SkGifImageReader
+ */
+ SkLibGifCodec(SkEncodedInfo&&, SkGifImageReader*);
+
+protected:
+ /*
+ * Performs the full gif decode
+ */
+ Result onGetPixels(const SkImageInfo&, void*, size_t, const Options&,
+ int*) override;
+
+ SkEncodedImageFormat onGetEncodedFormat() const override {
+ return SkEncodedImageFormat::kGIF;
+ }
+
+ bool onRewind() override;
+
+ int onGetFrameCount() override;
+ bool onGetFrameInfo(int, FrameInfo*) const override;
+ int onGetRepetitionCount() override;
+
+ Result onStartIncrementalDecode(const SkImageInfo& /*dstInfo*/, void*, size_t,
+ const SkCodec::Options&) override;
+
+ Result onIncrementalDecode(int*) override;
+
+ const SkFrameHolder* getFrameHolder() const override {
+ return fReader.get();
+ }
+
+private:
+
+ /*
+ * Initializes the color table that we will use for decoding.
+ *
+ * @param dstInfo Contains the requested dst color type.
+ * @param frameIndex Frame whose color table to use.
+ */
+ void initializeColorTable(const SkImageInfo& dstInfo, int frameIndex);
+
+ /*
+ * Does necessary setup, including setting up the color table and swizzler.
+ */
+ Result prepareToDecode(const SkImageInfo& dstInfo, const Options& opts);
+
+ /*
+ * Initializes the swizzler.
+ *
+ * @param dstInfo Output image information. Dimensions may have been
+ * adjusted if the image frame size does not match the size
+ * indicated in the header.
+ * @param frameIndex Which frame we are decoding. This determines the frameRect
+ * to use.
+ */
+ void initializeSwizzler(const SkImageInfo& dstInfo, int frameIndex);
+
+ SkSampler* getSampler(bool createIfNecessary) override {
+ SkASSERT(fSwizzler);
+ return fSwizzler.get();
+ }
+
+ /*
+ * Recursive function to decode a frame.
+ *
+ * @param firstAttempt Whether this is the first call to decodeFrame since
+ * starting. e.g. true in onGetPixels, and true in the
+ * first call to onIncrementalDecode after calling
+ * onStartIncrementalDecode.
+ * When true, this method may have to initialize the
+ * frame, for example by filling or decoding the prior
+ * frame.
+ * @param opts Options for decoding. May be different from
+ * this->options() for decoding prior frames. Specifies
+ * the frame to decode and whether the prior frame has
+ * already been decoded to fDst. If not, and the frame
+ * is not independent, this method will recursively
+ * decode the frame it depends on.
+ * @param rowsDecoded Out-parameter to report the total number of rows
+ * that have been decoded (or at least written to, if
+ * it had to fill), including rows decoded by prior
+ * calls to onIncrementalDecode.
+ * @return kSuccess if the frame is complete, kIncompleteInput
+ * otherwise.
+ */
+ Result decodeFrame(bool firstAttempt, const Options& opts, int* rowsDecoded);
+
+ /*
+ * Swizzles and color xforms (if necessary) into dst.
+ */
+ void applyXformRow(const SkImageInfo& dstInfo, void* dst, const uint8_t* src) const;
+
+ std::unique_ptr<SkGifImageReader> fReader;
+ std::unique_ptr<uint8_t[]> fTmpBuffer;
+ std::unique_ptr<SkSwizzler> fSwizzler;
+ sk_sp<SkColorTable> fCurrColorTable;
+ // We may create a dummy table if there is not a Map in the input data. In
+ // that case, we set this value to false, and we can skip a lot of decoding
+ // work (which would not be meaningful anyway). We create a "fake"/"dummy"
+ // one in that case, so the client and the swizzler have something to draw.
+ bool fCurrColorTableIsReal;
+ // Whether the background was filled.
+ bool fFilledBackground;
+ // True on the first call to onIncrementalDecode. This value is passed to
+ // decodeFrame.
+ bool fFirstCallToIncrementalDecode;
+
+ void* fDst;
+ size_t fDstRowBytes;
+
+ // Updated inside haveDecodedRow when rows are decoded, unless we filled
+ // the background, in which case it is set once and left alone.
+ int fRowsDecoded;
+ std::unique_ptr<uint32_t[]> fXformBuffer;
+
+ typedef SkCodec INHERITED;
+};
+#endif // SkLibGifCodec_DEFINED
diff --git a/third_party/libgifcodec/libgifcodec.gni b/third_party/libgifcodec/libgifcodec.gni
new file mode 100644
index 0000000..aa94603
--- /dev/null
+++ b/third_party/libgifcodec/libgifcodec.gni
@@ -0,0 +1,14 @@
+# Copyright 2019 Google LLC.
+# Use of this source code is governed by the BSD-3-Clause license that can be
+# found in the LICENSE.md file.
+
+libgifcodec_sources = [
+ "SkGifImageReader.cpp",
+ "SkGifImageReader.h",
+ "SkLibGifCodec.cpp",
+ "SkLibGifCodec.h",
+]
+
+libgifcodec_public = [
+ "SkGifCodec.h",
+]
diff --git a/win/include/config/SkUserConfig.h b/win/include/config/SkUserConfig.h
new file mode 100644
index 0000000..52adcac
--- /dev/null
+++ b/win/include/config/SkUserConfig.h
@@ -0,0 +1,85 @@
+// DO NOT MODIFY! This file is autogenerated by gn_to_bp.py.
+// If need to change a define, modify SkUserConfigManual.h
+#pragma once
+#include "SkUserConfigManual.h"
+
+#ifndef NOMINMAX
+#define NOMINMAX
+#endif
+
+#ifndef SK_CODEC_DECODES_JPEG
+#define SK_CODEC_DECODES_JPEG
+#endif
+
+#ifndef SK_CODEC_DECODES_PNG
+#define SK_CODEC_DECODES_PNG
+#endif
+
+#ifndef SK_CODEC_DECODES_WEBP
+#define SK_CODEC_DECODES_WEBP
+#endif
+
+#ifndef SK_ENABLE_ANDROID_UTILS
+#define SK_ENABLE_ANDROID_UTILS
+#endif
+
+#ifndef SK_ENCODE_JPEG
+#define SK_ENCODE_JPEG
+#endif
+
+#ifndef SK_ENCODE_PNG
+#define SK_ENCODE_PNG
+#endif
+
+#ifndef SK_ENCODE_WEBP
+#define SK_ENCODE_WEBP
+#endif
+
+#ifndef SK_GAMMA_APPLY_TO_A8
+#define SK_GAMMA_APPLY_TO_A8
+#endif
+
+#ifndef SK_GAMMA_CONTRAST
+#define SK_GAMMA_CONTRAST 0.0
+#endif
+
+#ifndef SK_GAMMA_EXPONENT
+#define SK_GAMMA_EXPONENT 1.4
+#endif
+
+#ifndef SK_HAS_ANDROID_CODEC
+#define SK_HAS_ANDROID_CODEC
+#endif
+
+#ifndef SK_SUPPORT_GPU
+#define SK_SUPPORT_GPU 0
+#endif
+
+#ifndef SK_SUPPORT_PDF
+#define SK_SUPPORT_PDF
+#endif
+
+#ifndef SK_USE_LIBGIFCODEC
+#define SK_USE_LIBGIFCODEC
+#endif
+
+#ifndef SK_XML
+#define SK_XML
+#endif
+
+#ifndef _CRT_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+
+// Correct SK_BUILD_FOR flags that may have been set by
+// SkTypes.h/Android.bp
+#ifndef SK_BUILD_FOR_WIN
+ #define SK_BUILD_FOR_WIN
+#endif
+#ifdef SK_BUILD_FOR_ANDROID
+ #undef SK_BUILD_FOR_ANDROID
+#endif
+#if defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_IOS) || \
+ defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_UNIX)
+ #error "Only SK_BUILD_FOR_WIN should be defined!"
+#endif