diff options
Diffstat (limited to 'external/skia')
35 files changed, 3397 insertions, 0 deletions
diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk new file mode 100644 index 000000000..1cd4adac9 --- /dev/null +++ b/external/skia/Library_skia.mk @@ -0,0 +1,853 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Library_Library,skia)) + +$(eval $(call gb_Library_set_warnings_disabled,skia)) + +$(eval $(call gb_Library_use_unpacked,skia,skia)) + +$(eval $(call gb_Library_use_clang,skia)) +$(eval $(call gb_Library_set_clang_precompiled_header,skia,external/skia/inc/pch/precompiled_skia)) + +$(eval $(call gb_Library_add_defs,skia,\ + -DSKIA_IMPLEMENTATION=1 \ + -DSKIA_DLL \ + -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \ +)) + +# SK_DEBUG controls runtime checks and is controlled by config_skia.h and depends on DBG_UTIL. +# This controls whether to build with compiler optimizations, normally yes, --enable-skia=debug +# allows to build non-optimized. We normally wouldn't debug a 3rd-party library, and Skia +# performance is relatively important (it may be the drawing engine used in software mode). +ifeq ($(ENABLE_SKIA_DEBUG),) +$(eval $(call gb_Library_add_cxxflags,skia, \ + $(gb_COMPILEROPTFLAGS) \ +)) +endif + +ifeq ($(OS),WNT) +# Skia can be built with or without UNICODE set, in LO sources we explicitly use the *W unicode +# variants, so build Skia with UNICODE to make it also use the *W variants. +$(eval $(call gb_Library_add_defs,skia,\ + -DUNICODE -D_UNICODE \ +)) +ifneq ($(gb_ENABLE_PCH),) +$(eval $(call gb_Library_add_cxxflags,skia, \ + -FIsrc/utils/win/SkDWriteNTDDI_VERSION.h \ +)) +endif + +$(eval $(call gb_Library_use_system_win32_libs,skia,\ + fontsub \ + ole32 \ + oleaut32 \ + user32 \ + usp10 \ + gdi32 \ +)) +else +$(eval $(call gb_Library_use_externals,skia,\ + freetype \ + fontconfig \ +)) +endif + +# we don't enable jpeg for skia, but it has incorrect #ifdef's in places +$(eval $(call gb_Library_use_externals,skia,\ + zlib \ + libjpeg \ + libpng \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_libs,skia,\ + -lm \ + -ldl \ + -lX11-xcb \ + -lX11 \ +)) +endif + +$(eval $(call gb_Library_use_libraries,skia,\ + sal \ +)) + +$(eval $(call gb_Library_set_include,skia,\ + $$(INCLUDE) \ + -I$(call gb_UnpackedTarball_get_dir,skia) \ + -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/skcms/ \ + -I$(call gb_UnpackedTarball_get_dir,skia)/third_party/vulkanmemoryallocator/ \ + -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/vulkan/ \ + -I$(SRCDIR)/external/skia/inc/ \ +)) + +$(eval $(call gb_Library_add_exception_objects,skia,\ + external/skia/source/SkMemory_malloc \ + external/skia/source/skia_compiler \ +)) + +$(eval $(call gb_Library_set_generated_cxx_suffix,skia,cpp)) + +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/codec/SkAndroidCodecAdapter \ + UnpackedTarball/skia/src/codec/SkAndroidCodec \ + UnpackedTarball/skia/src/codec/SkBmpBaseCodec \ + UnpackedTarball/skia/src/codec/SkBmpCodec \ + UnpackedTarball/skia/src/codec/SkBmpMaskCodec \ + UnpackedTarball/skia/src/codec/SkBmpRLECodec \ + UnpackedTarball/skia/src/codec/SkBmpStandardCodec \ + UnpackedTarball/skia/src/codec/SkCodec \ + UnpackedTarball/skia/src/codec/SkCodecImageGenerator \ + UnpackedTarball/skia/src/codec/SkColorTable \ + UnpackedTarball/skia/src/codec/SkEncodedInfo \ + UnpackedTarball/skia/src/codec/SkIcoCodec \ + UnpackedTarball/skia/src/codec/SkMasks \ + UnpackedTarball/skia/src/codec/SkMaskSwizzler \ + UnpackedTarball/skia/src/codec/SkParseEncodedOrigin \ + UnpackedTarball/skia/src/codec/SkPngCodec \ + UnpackedTarball/skia/src/codec/SkSampledCodec \ + UnpackedTarball/skia/src/codec/SkSampler \ + UnpackedTarball/skia/src/codec/SkStreamBuffer \ + UnpackedTarball/skia/src/codec/SkSwizzler \ + UnpackedTarball/skia/src/codec/SkWbmpCodec \ + UnpackedTarball/skia/src/core/SkAAClip \ + UnpackedTarball/skia/src/core/SkAlphaRuns \ + UnpackedTarball/skia/src/core/SkAnalyticEdge \ + UnpackedTarball/skia/src/core/SkAnnotation \ + UnpackedTarball/skia/src/core/SkArenaAlloc \ + UnpackedTarball/skia/src/core/SkATrace \ + UnpackedTarball/skia/src/core/SkAutoPixmapStorage \ + UnpackedTarball/skia/src/core/SkBBHFactory \ + UnpackedTarball/skia/src/core/SkBigPicture \ + UnpackedTarball/skia/src/core/SkBitmapCache \ + UnpackedTarball/skia/src/core/SkBitmapController \ + UnpackedTarball/skia/src/core/SkBitmap \ + UnpackedTarball/skia/src/core/SkBitmapDevice \ + UnpackedTarball/skia/src/core/SkBitmapProcState \ + UnpackedTarball/skia/src/core/SkBitmapProcState_matrixProcs \ + UnpackedTarball/skia/src/core/SkBlendMode \ + UnpackedTarball/skia/src/core/SkBlitRow_D32 \ + UnpackedTarball/skia/src/core/SkBlitter_ARGB32 \ + UnpackedTarball/skia/src/core/SkBlitter_A8 \ + UnpackedTarball/skia/src/core/SkBlitter \ + UnpackedTarball/skia/src/core/SkBlitter_RGB565 \ + UnpackedTarball/skia/src/core/SkBlitter_Sprite \ + UnpackedTarball/skia/src/core/SkBlurMask \ + UnpackedTarball/skia/src/core/SkBlurMF \ + UnpackedTarball/skia/src/core/SkBuffer \ + UnpackedTarball/skia/src/core/SkCachedData \ + UnpackedTarball/skia/src/core/SkCanvas \ + UnpackedTarball/skia/src/core/SkCanvasPriv \ + UnpackedTarball/skia/src/core/SkClipStack \ + UnpackedTarball/skia/src/core/SkClipStackDevice \ + UnpackedTarball/skia/src/core/SkColor \ + UnpackedTarball/skia/src/core/SkColorFilter \ + UnpackedTarball/skia/src/core/SkColorFilter_Matrix \ + UnpackedTarball/skia/src/core/SkColorSpace \ + UnpackedTarball/skia/src/core/SkColorSpaceXformSteps \ + UnpackedTarball/skia/src/core/SkCompressedDataUtils \ + UnpackedTarball/skia/src/core/SkContourMeasure \ + UnpackedTarball/skia/src/core/SkConvertPixels \ + UnpackedTarball/skia/src/core/SkCpu \ + UnpackedTarball/skia/src/core/SkCubicClipper \ + UnpackedTarball/skia/src/core/SkCubicMap \ + UnpackedTarball/skia/src/core/SkData \ + UnpackedTarball/skia/src/core/SkDataTable \ + UnpackedTarball/skia/src/core/SkDebug \ + UnpackedTarball/skia/src/core/SkDeferredDisplayList \ + UnpackedTarball/skia/src/core/SkDeferredDisplayListRecorder \ + UnpackedTarball/skia/src/core/SkDeque \ + UnpackedTarball/skia/src/core/SkDescriptor \ + UnpackedTarball/skia/src/core/SkDevice \ + UnpackedTarball/skia/src/core/SkDistanceFieldGen \ + UnpackedTarball/skia/src/core/SkDocument \ + UnpackedTarball/skia/src/core/SkDrawable \ + UnpackedTarball/skia/src/core/SkDraw \ + UnpackedTarball/skia/src/core/SkDrawLooper \ + UnpackedTarball/skia/src/core/SkDrawShadowInfo \ + UnpackedTarball/skia/src/core/SkDraw_atlas \ + UnpackedTarball/skia/src/core/SkDraw_text \ + UnpackedTarball/skia/src/core/SkDraw_vertices \ + UnpackedTarball/skia/src/core/SkEdgeBuilder \ + UnpackedTarball/skia/src/core/SkEdgeClipper \ + UnpackedTarball/skia/src/core/SkEdge \ + UnpackedTarball/skia/src/core/SkExecutor \ + UnpackedTarball/skia/src/core/SkFlattenable \ + UnpackedTarball/skia/src/core/SkFont \ + UnpackedTarball/skia/src/core/SkFont_serial \ + UnpackedTarball/skia/src/core/SkFontDescriptor \ + UnpackedTarball/skia/src/core/SkFontLCDConfig \ + UnpackedTarball/skia/src/core/SkFontMgr \ + UnpackedTarball/skia/src/core/SkFontStream \ + UnpackedTarball/skia/src/core/SkGaussFilter \ + UnpackedTarball/skia/src/core/SkGeometry \ + UnpackedTarball/skia/src/core/SkIDChangeListener \ + UnpackedTarball/skia/src/core/SkGlobalInitialization_core \ + UnpackedTarball/skia/src/core/SkGlyph \ + UnpackedTarball/skia/src/core/SkGlyphBuffer \ + UnpackedTarball/skia/src/core/SkGlyphRun \ + UnpackedTarball/skia/src/core/SkGlyphRunPainter \ + UnpackedTarball/skia/src/core/SkGraphics \ + UnpackedTarball/skia/src/core/SkHalf \ + UnpackedTarball/skia/src/core/SkICC \ + UnpackedTarball/skia/src/core/SkImageFilterCache \ + UnpackedTarball/skia/src/core/SkImageFilterTypes \ + UnpackedTarball/skia/src/core/SkImageFilter \ + UnpackedTarball/skia/src/core/SkImageGenerator \ + UnpackedTarball/skia/src/core/SkImageInfo \ + UnpackedTarball/skia/src/core/SkLatticeIter \ + UnpackedTarball/skia/src/core/SkLineClipper \ + UnpackedTarball/skia/src/core/SkLegacyGpuBlurUtils \ + UnpackedTarball/skia/src/core/SkLocalMatrixImageFilter \ + UnpackedTarball/skia/src/core/SkMalloc \ + UnpackedTarball/skia/src/core/SkMallocPixelRef \ + UnpackedTarball/skia/src/core/SkMarkerStack \ + UnpackedTarball/skia/src/core/SkMaskBlurFilter \ + UnpackedTarball/skia/src/core/SkMaskCache \ + UnpackedTarball/skia/src/core/SkMask \ + UnpackedTarball/skia/src/core/SkMaskFilter \ + UnpackedTarball/skia/src/core/SkMaskGamma \ + UnpackedTarball/skia/src/core/SkMath \ + UnpackedTarball/skia/src/core/SkMatrix \ + UnpackedTarball/skia/src/core/SkMatrixImageFilter \ + UnpackedTarball/skia/src/core/SkMatrix44 \ + UnpackedTarball/skia/src/core/SkM44 \ + UnpackedTarball/skia/src/core/SkMD5 \ + UnpackedTarball/skia/src/core/SkMiniRecorder \ + UnpackedTarball/skia/src/core/SkMipMap \ + UnpackedTarball/skia/src/core/SkModeColorFilter \ + UnpackedTarball/skia/src/core/SkOpts \ + UnpackedTarball/skia/src/core/SkOverdrawCanvas \ + UnpackedTarball/skia/src/core/SkPaint \ + UnpackedTarball/skia/src/core/SkPaintPriv \ + UnpackedTarball/skia/src/core/SkPath \ + UnpackedTarball/skia/src/core/SkPathBuilder \ + UnpackedTarball/skia/src/core/SkPathEffect \ + UnpackedTarball/skia/src/core/SkPathMeasure \ + UnpackedTarball/skia/src/core/SkPathRef \ + UnpackedTarball/skia/src/core/SkPath_serial \ + UnpackedTarball/skia/src/core/SkPicture \ + UnpackedTarball/skia/src/core/SkPictureData \ + UnpackedTarball/skia/src/core/SkPictureFlat \ + UnpackedTarball/skia/src/core/SkPictureImageGenerator \ + UnpackedTarball/skia/src/core/SkPicturePlayback \ + UnpackedTarball/skia/src/core/SkPictureRecord \ + UnpackedTarball/skia/src/core/SkPictureRecorder \ + UnpackedTarball/skia/src/core/SkPixelRef \ + UnpackedTarball/skia/src/core/SkPixmap \ + UnpackedTarball/skia/src/core/SkPoint \ + UnpackedTarball/skia/src/core/SkPoint3 \ + UnpackedTarball/skia/src/core/SkPromiseImageTexture \ + UnpackedTarball/skia/src/core/SkPtrRecorder \ + UnpackedTarball/skia/src/core/SkQuadClipper \ + UnpackedTarball/skia/src/core/SkRasterClip \ + UnpackedTarball/skia/src/core/SkRasterPipelineBlitter \ + UnpackedTarball/skia/src/core/SkRasterPipeline \ + UnpackedTarball/skia/src/core/SkReadBuffer \ + UnpackedTarball/skia/src/core/SkRecord \ + UnpackedTarball/skia/src/core/SkRecordDraw \ + UnpackedTarball/skia/src/core/SkRecordedDrawable \ + UnpackedTarball/skia/src/core/SkRecorder \ + UnpackedTarball/skia/src/core/SkRecordOpts \ + UnpackedTarball/skia/src/core/SkRecords \ + UnpackedTarball/skia/src/core/SkRect \ + UnpackedTarball/skia/src/core/SkRegion \ + UnpackedTarball/skia/src/core/SkRegion_path \ + UnpackedTarball/skia/src/core/SkRemoteGlyphCache \ + UnpackedTarball/skia/src/core/SkResourceCache \ + UnpackedTarball/skia/src/core/SkRRect \ + UnpackedTarball/skia/src/core/SkRTree \ + UnpackedTarball/skia/src/core/SkRuntimeEffect \ + UnpackedTarball/skia/src/core/SkRWBuffer \ + UnpackedTarball/skia/src/core/SkScalar \ + UnpackedTarball/skia/src/core/SkScalerCache \ + UnpackedTarball/skia/src/core/SkScalerContext \ + UnpackedTarball/skia/src/core/SkScan_AAAPath \ + UnpackedTarball/skia/src/core/SkScan_Antihair \ + UnpackedTarball/skia/src/core/SkScan_AntiPath \ + UnpackedTarball/skia/src/core/SkScan \ + UnpackedTarball/skia/src/core/SkScan_Hairline \ + UnpackedTarball/skia/src/core/SkScan_Path \ + UnpackedTarball/skia/src/core/SkSemaphore \ + UnpackedTarball/skia/src/core/SkSharedMutex \ + UnpackedTarball/skia/src/core/SkSpecialImage \ + UnpackedTarball/skia/src/core/SkSpecialSurface \ + UnpackedTarball/skia/src/core/SkSpinlock \ + UnpackedTarball/skia/src/core/SkSpriteBlitter_ARGB32 \ + UnpackedTarball/skia/src/core/SkSpriteBlitter_RGB565 \ + UnpackedTarball/skia/src/core/SkStream \ + UnpackedTarball/skia/src/core/SkStrikeCache \ + UnpackedTarball/skia/src/core/SkStrikeForGPU \ + UnpackedTarball/skia/src/core/SkStrikeSpec \ + UnpackedTarball/skia/src/core/SkString \ + UnpackedTarball/skia/src/core/SkStringUtils \ + UnpackedTarball/skia/src/core/SkStroke \ + UnpackedTarball/skia/src/core/SkStrokeRec \ + UnpackedTarball/skia/src/core/SkStrokerPriv \ + UnpackedTarball/skia/src/core/SkSurfaceCharacterization \ + UnpackedTarball/skia/src/core/SkSwizzle \ + UnpackedTarball/skia/src/core/SkTaskGroup \ + UnpackedTarball/skia/src/core/SkTextBlob \ + UnpackedTarball/skia/src/core/SkTextBlobTrace \ + UnpackedTarball/skia/src/core/SkThreadID \ + UnpackedTarball/skia/src/core/SkTime \ + UnpackedTarball/skia/src/core/SkTSearch \ + UnpackedTarball/skia/src/core/SkTypefaceCache \ + UnpackedTarball/skia/src/core/SkTypeface \ + UnpackedTarball/skia/src/core/SkTypeface_remote \ + UnpackedTarball/skia/src/core/SkUnPreMultiply \ + UnpackedTarball/skia/src/core/SkUtilsArm \ + UnpackedTarball/skia/src/core/SkUtils \ + UnpackedTarball/skia/src/core/SkVertices \ + UnpackedTarball/skia/src/core/SkVertState \ + UnpackedTarball/skia/src/core/SkVM \ + UnpackedTarball/skia/src/core/SkVMBlitter \ + UnpackedTarball/skia/src/core/SkWriteBuffer \ + UnpackedTarball/skia/src/core/SkWriter32 \ + UnpackedTarball/skia/src/core/SkXfermode \ + UnpackedTarball/skia/src/core/SkXfermodeInterpretation \ + UnpackedTarball/skia/src/core/SkYUVASizeInfo \ + UnpackedTarball/skia/src/core/SkYUVMath \ + UnpackedTarball/skia/src/core/SkYUVPlanesCache \ + UnpackedTarball/skia/src/c/sk_effects \ + UnpackedTarball/skia/src/c/sk_imageinfo \ + UnpackedTarball/skia/src/c/sk_paint \ + UnpackedTarball/skia/src/c/sk_surface \ + UnpackedTarball/skia/src/effects/imagefilters/SkAlphaThresholdFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkArithmeticImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkBlurImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkColorFilterImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkComposeImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkDisplacementMapEffect \ + UnpackedTarball/skia/src/effects/imagefilters/SkDropShadowImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkImageFilters \ + UnpackedTarball/skia/src/effects/imagefilters/SkImageSource \ + UnpackedTarball/skia/src/effects/imagefilters/SkLightingImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkMagnifierImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkMatrixConvolutionImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkMergeImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkMorphologyImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkOffsetImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkPaintImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkPictureImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkTileImageFilter \ + UnpackedTarball/skia/src/effects/imagefilters/SkXfermodeImageFilter \ + UnpackedTarball/skia/src/effects/SkColorMatrix \ + UnpackedTarball/skia/src/effects/SkColorMatrixFilter \ + UnpackedTarball/skia/src/effects/SkCornerPathEffect \ + UnpackedTarball/skia/src/effects/SkDashPathEffect \ + UnpackedTarball/skia/src/effects/SkDiscretePathEffect \ + UnpackedTarball/skia/src/effects/SkEmbossMask \ + UnpackedTarball/skia/src/effects/SkEmbossMaskFilter \ + UnpackedTarball/skia/src/effects/SkHighContrastFilter \ + UnpackedTarball/skia/src/effects/SkLayerDrawLooper \ + UnpackedTarball/skia/src/effects/SkLumaColorFilter \ + UnpackedTarball/skia/src/effects/SkOpPathEffect \ + UnpackedTarball/skia/src/effects/SkOverdrawColorFilter \ + UnpackedTarball/skia/src/effects/SkPackBits \ + UnpackedTarball/skia/src/effects/SkShaderMaskFilter \ + UnpackedTarball/skia/src/effects/SkTableColorFilter \ + UnpackedTarball/skia/src/effects/SkTableMaskFilter \ + UnpackedTarball/skia/src/effects/SkTrimPathEffect \ + UnpackedTarball/skia/src/effects/Sk1DPathEffect \ + UnpackedTarball/skia/src/effects/Sk2DPathEffect \ + UnpackedTarball/skia/src/fonts/SkRemotableFontMgr \ + UnpackedTarball/skia/src/image/SkImage \ + UnpackedTarball/skia/src/image/SkImage_Lazy \ + UnpackedTarball/skia/src/image/SkImage_Raster \ + UnpackedTarball/skia/src/image/SkSurface \ + UnpackedTarball/skia/src/image/SkSurface_Raster \ + UnpackedTarball/skia/src/images/SkImageEncoder \ + UnpackedTarball/skia/src/images/SkPngEncoder \ + UnpackedTarball/skia/src/images/SkWebpEncoder \ + UnpackedTarball/skia/src/lazy/SkDiscardableMemoryPool \ + UnpackedTarball/skia/src/pathops/SkAddIntersections \ + UnpackedTarball/skia/src/pathops/SkDConicLineIntersection \ + UnpackedTarball/skia/src/pathops/SkDCubicLineIntersection \ + UnpackedTarball/skia/src/pathops/SkDCubicToQuads \ + UnpackedTarball/skia/src/pathops/SkDLineIntersection \ + UnpackedTarball/skia/src/pathops/SkDQuadLineIntersection \ + UnpackedTarball/skia/src/pathops/SkIntersections \ + UnpackedTarball/skia/src/pathops/SkOpAngle \ + UnpackedTarball/skia/src/pathops/SkOpBuilder \ + UnpackedTarball/skia/src/pathops/SkOpCoincidence \ + UnpackedTarball/skia/src/pathops/SkOpContour \ + UnpackedTarball/skia/src/pathops/SkOpCubicHull \ + UnpackedTarball/skia/src/pathops/SkOpEdgeBuilder \ + UnpackedTarball/skia/src/pathops/SkOpSegment \ + UnpackedTarball/skia/src/pathops/SkOpSpan \ + UnpackedTarball/skia/src/pathops/SkPathOpsAsWinding \ + UnpackedTarball/skia/src/pathops/SkPathOpsCommon \ + UnpackedTarball/skia/src/pathops/SkPathOpsConic \ + UnpackedTarball/skia/src/pathops/SkPathOpsCubic \ + UnpackedTarball/skia/src/pathops/SkPathOpsCurve \ + UnpackedTarball/skia/src/pathops/SkPathOpsDebug \ + UnpackedTarball/skia/src/pathops/SkPathOpsLine \ + UnpackedTarball/skia/src/pathops/SkPathOpsOp \ + UnpackedTarball/skia/src/pathops/SkPathOpsQuad \ + UnpackedTarball/skia/src/pathops/SkPathOpsRect \ + UnpackedTarball/skia/src/pathops/SkPathOpsSimplify \ + UnpackedTarball/skia/src/pathops/SkPathOpsTightBounds \ + UnpackedTarball/skia/src/pathops/SkPathOpsTSect \ + UnpackedTarball/skia/src/pathops/SkPathOpsTypes \ + UnpackedTarball/skia/src/pathops/SkPathOpsWinding \ + UnpackedTarball/skia/src/pathops/SkPathWriter \ + UnpackedTarball/skia/src/pathops/SkReduceOrder \ + UnpackedTarball/skia/src/sfnt/SkOTTable_name \ + UnpackedTarball/skia/src/sfnt/SkOTUtils \ + UnpackedTarball/skia/src/shaders/gradients/SkGradientShader \ + UnpackedTarball/skia/src/shaders/gradients/SkLinearGradient \ + UnpackedTarball/skia/src/shaders/gradients/SkRadialGradient \ + UnpackedTarball/skia/src/shaders/gradients/SkSweepGradient \ + UnpackedTarball/skia/src/shaders/gradients/SkTwoPointConicalGradient \ + UnpackedTarball/skia/src/shaders/gradients/Sk4fGradientBase \ + UnpackedTarball/skia/src/shaders/gradients/Sk4fLinearGradient \ + UnpackedTarball/skia/src/shaders/SkBitmapProcShader \ + UnpackedTarball/skia/src/shaders/SkColorFilterShader \ + UnpackedTarball/skia/src/shaders/SkColorShader \ + UnpackedTarball/skia/src/shaders/SkComposeShader \ + UnpackedTarball/skia/src/shaders/SkImageShader \ + UnpackedTarball/skia/src/shaders/SkLocalMatrixShader \ + UnpackedTarball/skia/src/shaders/SkPerlinNoiseShader \ + UnpackedTarball/skia/src/shaders/SkPictureShader \ + UnpackedTarball/skia/src/shaders/SkShader \ + UnpackedTarball/skia/src/sksl/ir/SkSLSetting \ + UnpackedTarball/skia/src/sksl/ir/SkSLSymbolTable \ + UnpackedTarball/skia/src/sksl/ir/SkSLType \ + UnpackedTarball/skia/src/sksl/ir/SkSLVariableReference \ + UnpackedTarball/skia/src/sksl/SkSLASTNode \ + UnpackedTarball/skia/src/sksl/SkSLByteCode \ + UnpackedTarball/skia/src/sksl/SkSLByteCodeGenerator \ + UnpackedTarball/skia/src/sksl/SkSLCFGGenerator \ + UnpackedTarball/skia/src/sksl/SkSLCompiler \ + UnpackedTarball/skia/src/sksl/SkSLCPPCodeGenerator \ + UnpackedTarball/skia/src/sksl/SkSLCPPUniformCTypes \ + UnpackedTarball/skia/src/sksl/SkSLGLSLCodeGenerator \ + UnpackedTarball/skia/src/sksl/SkSLHCodeGenerator \ + UnpackedTarball/skia/src/sksl/SkSLIRGenerator \ + UnpackedTarball/skia/src/sksl/SkSLLexer \ + UnpackedTarball/skia/src/sksl/SkSLMetalCodeGenerator \ + UnpackedTarball/skia/src/sksl/SkSLOutputStream \ + UnpackedTarball/skia/src/sksl/SkSLParser \ + UnpackedTarball/skia/src/sksl/SkSLPipelineStageCodeGenerator \ + UnpackedTarball/skia/src/sksl/SkSLSampleMatrix \ + UnpackedTarball/skia/src/sksl/SkSLSPIRVCodeGenerator \ + UnpackedTarball/skia/src/sksl/SkSLSPIRVtoHLSL \ + UnpackedTarball/skia/src/sksl/SkSLSectionAndParameterHelper \ + UnpackedTarball/skia/src/sksl/SkSLString \ + UnpackedTarball/skia/src/sksl/SkSLUtil \ + UnpackedTarball/skia/src/utils/SkBase64 \ + UnpackedTarball/skia/src/utils/SkCamera \ + UnpackedTarball/skia/src/utils/SkCanvasStack \ + UnpackedTarball/skia/src/utils/SkCanvasStateUtils \ + UnpackedTarball/skia/src/utils/SkDashPath \ + UnpackedTarball/skia/src/utils/SkEventTracer \ + UnpackedTarball/skia/src/utils/SkFloatToDecimal \ + UnpackedTarball/skia/src/utils/SkCharToGlyphCache \ + UnpackedTarball/skia/src/utils/SkClipStackUtils \ + UnpackedTarball/skia/src/utils/SkCustomTypeface \ + UnpackedTarball/skia/src/utils/SkInterpolator \ + UnpackedTarball/skia/src/utils/SkJSON \ + UnpackedTarball/skia/src/utils/SkJSONWriter \ + UnpackedTarball/skia/src/utils/SkMatrix22 \ + UnpackedTarball/skia/src/utils/SkMultiPictureDocument \ + UnpackedTarball/skia/src/utils/SkNullCanvas \ + UnpackedTarball/skia/src/utils/SkNWayCanvas \ + UnpackedTarball/skia/src/utils/SkOSPath \ + UnpackedTarball/skia/src/utils/SkPaintFilterCanvas \ + UnpackedTarball/skia/src/utils/SkParseColor \ + UnpackedTarball/skia/src/utils/SkParse \ + UnpackedTarball/skia/src/utils/SkParsePath \ + UnpackedTarball/skia/src/utils/SkPatchUtils \ + UnpackedTarball/skia/src/utils/SkPolyUtils \ + UnpackedTarball/skia/src/utils/SkShadowTessellator \ + UnpackedTarball/skia/src/utils/SkShadowUtils \ + UnpackedTarball/skia/src/utils/SkShaperJSONWriter \ + UnpackedTarball/skia/src/utils/SkTextUtils \ + UnpackedTarball/skia/src/utils/SkThreadUtils_pthread \ + UnpackedTarball/skia/src/utils/SkThreadUtils_win \ + UnpackedTarball/skia/src/utils/SkUTF \ + UnpackedTarball/skia/src/utils/SkWhitelistTypefaces \ + UnpackedTarball/skia/src/xps/SkXPSDevice \ + UnpackedTarball/skia/src/xps/SkXPSDocument \ +)) + +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/core/SkGpuBlurUtils \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCAtlas \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCClipPath \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCClipProcessor \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCConicShader \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCCoverageProcessor \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCCubicShader \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCDrawPathsOp \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCFiller \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCFillGeometry \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCPathCache \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCPathProcessor \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCPerFlushResources \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCQuadraticShader \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCStrokeGeometry \ + UnpackedTarball/skia/src/gpu/ccpr/GrCCStroker \ + UnpackedTarball/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer \ + UnpackedTarball/skia/src/gpu/ccpr/GrGSCoverageProcessor \ + UnpackedTarball/skia/src/gpu/ccpr/GrOctoBounds \ + UnpackedTarball/skia/src/gpu/ccpr/GrSampleMaskProcessor \ + UnpackedTarball/skia/src/gpu/ccpr/GrStencilAtlasOp \ + UnpackedTarball/skia/src/gpu/ccpr/GrVSCoverageProcessor \ + UnpackedTarball/skia/src/gpu/effects/generated/GrAARectEffect \ + UnpackedTarball/skia/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor \ + UnpackedTarball/skia/src/gpu/effects/generated/GrBlurredEdgeFragmentProcessor \ + UnpackedTarball/skia/src/gpu/effects/generated/GrCircleBlurFragmentProcessor \ + UnpackedTarball/skia/src/gpu/effects/generated/GrCircleEffect \ + UnpackedTarball/skia/src/gpu/effects/generated/GrClampFragmentProcessor \ + UnpackedTarball/skia/src/gpu/effects/generated/GrColorMatrixFragmentProcessor \ + UnpackedTarball/skia/src/gpu/effects/generated/GrComposeLerpEffect \ + UnpackedTarball/skia/src/gpu/effects/generated/GrConfigConversionEffect \ + UnpackedTarball/skia/src/gpu/effects/generated/GrConstColorProcessor \ + UnpackedTarball/skia/src/gpu/effects/generated/GrEllipseEffect \ + UnpackedTarball/skia/src/gpu/effects/generated/GrDeviceSpaceEffect \ + UnpackedTarball/skia/src/gpu/effects/generated/GrHSLToRGBFilterEffect \ + UnpackedTarball/skia/src/gpu/effects/generated/GrLumaColorFilterEffect \ + UnpackedTarball/skia/src/gpu/effects/generated/GrMagnifierEffect \ + UnpackedTarball/skia/src/gpu/effects/generated/GrMixerEffect \ + UnpackedTarball/skia/src/gpu/effects/generated/GrOverrideInputFragmentProcessor \ + UnpackedTarball/skia/src/gpu/effects/generated/GrRectBlurEffect \ + UnpackedTarball/skia/src/gpu/effects/generated/GrRGBToHSLFilterEffect \ + UnpackedTarball/skia/src/gpu/effects/generated/GrRRectBlurEffect \ + UnpackedTarball/skia/src/gpu/effects/GrBezierEffect \ + UnpackedTarball/skia/src/gpu/effects/GrBicubicEffect \ + UnpackedTarball/skia/src/gpu/effects/GrBitmapTextGeoProc \ + UnpackedTarball/skia/src/gpu/effects/GrConvexPolyEffect \ + UnpackedTarball/skia/src/gpu/effects/GrCoverageSetOpXP \ + UnpackedTarball/skia/src/gpu/effects/GrCustomXfermode \ + UnpackedTarball/skia/src/gpu/effects/GrDisableColorXP \ + UnpackedTarball/skia/src/gpu/effects/GrDistanceFieldGeoProc \ + UnpackedTarball/skia/src/gpu/effects/GrGaussianConvolutionFragmentProcessor \ + UnpackedTarball/skia/src/gpu/effects/GrMatrixConvolutionEffect \ + UnpackedTarball/skia/src/gpu/effects/GrMatrixEffect \ + UnpackedTarball/skia/src/gpu/effects/GrOvalEffect \ + UnpackedTarball/skia/src/gpu/effects/GrPorterDuffXferProcessor \ + UnpackedTarball/skia/src/gpu/effects/GrRRectEffect \ + UnpackedTarball/skia/src/gpu/effects/GrShadowGeoProc \ + UnpackedTarball/skia/src/gpu/effects/GrSkSLFP \ + UnpackedTarball/skia/src/gpu/effects/GrTextureEffect \ + UnpackedTarball/skia/src/gpu/effects/GrXfermodeFragmentProcessor \ + UnpackedTarball/skia/src/gpu/effects/GrYUVtoRGBEffect \ + UnpackedTarball/skia/src/gpu/geometry/GrPathUtils \ + UnpackedTarball/skia/src/gpu/geometry/GrQuad \ + UnpackedTarball/skia/src/gpu/geometry/GrQuadUtils \ + UnpackedTarball/skia/src/gpu/geometry/GrShape \ + UnpackedTarball/skia/src/gpu/geometry/GrStyledShape \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSLBlend \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSL \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSLFragmentProcessor \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSLFragmentShaderBuilder \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSLGeometryProcessor \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSLPrimitiveProcessor \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSLProgramBuilder \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSLProgramDataManager \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSLShaderBuilder \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSLUniformHandler \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSLVarying \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder \ + UnpackedTarball/skia/src/gpu/glsl/GrGLSLXferProcessor \ + UnpackedTarball/skia/src/gpu/gradients/generated/GrClampedGradientEffect \ + UnpackedTarball/skia/src/gpu/gradients/generated/GrDualIntervalGradientColorizer \ + UnpackedTarball/skia/src/gpu/gradients/generated/GrLinearGradientLayout \ + UnpackedTarball/skia/src/gpu/gradients/generated/GrRadialGradientLayout \ + UnpackedTarball/skia/src/gpu/gradients/generated/GrSingleIntervalGradientColorizer \ + UnpackedTarball/skia/src/gpu/gradients/generated/GrSweepGradientLayout \ + UnpackedTarball/skia/src/gpu/gradients/generated/GrTextureGradientColorizer \ + UnpackedTarball/skia/src/gpu/gradients/generated/GrTiledGradientEffect \ + UnpackedTarball/skia/src/gpu/gradients/generated/GrTwoPointConicalGradientLayout \ + UnpackedTarball/skia/src/gpu/gradients/generated/GrUnrolledBinaryGradientColorizer \ + UnpackedTarball/skia/src/gpu/gradients/GrGradientBitmapCache \ + UnpackedTarball/skia/src/gpu/gradients/GrGradientShader \ + UnpackedTarball/skia/src/gpu/GrAHardwareBufferImageGenerator \ + UnpackedTarball/skia/src/gpu/GrAHardwareBufferUtils \ + UnpackedTarball/skia/src/gpu/GrAuditTrail \ + UnpackedTarball/skia/src/gpu/GrBackendSurface \ + UnpackedTarball/skia/src/gpu/GrBackendTextureImageGenerator \ + UnpackedTarball/skia/src/gpu/GrBitmapTextureMaker \ + UnpackedTarball/skia/src/gpu/GrBlockAllocator \ + UnpackedTarball/skia/src/gpu/GrBlurUtils \ + UnpackedTarball/skia/src/gpu/GrBufferAllocPool \ + UnpackedTarball/skia/src/gpu/GrCaps \ + UnpackedTarball/skia/src/gpu/GrClientMappedBufferManager \ + UnpackedTarball/skia/src/gpu/GrClipStackClip \ + UnpackedTarball/skia/src/gpu/GrColorInfo \ + UnpackedTarball/skia/src/gpu/GrColorSpaceXform \ + UnpackedTarball/skia/src/gpu/GrContext_Base \ + UnpackedTarball/skia/src/gpu/GrContext \ + UnpackedTarball/skia/src/gpu/GrContextPriv \ + UnpackedTarball/skia/src/gpu/GrContextThreadSafeProxy \ + UnpackedTarball/skia/src/gpu/GrCopyRenderTask \ + UnpackedTarball/skia/src/gpu/GrDataUtils \ + UnpackedTarball/skia/src/gpu/GrDDLContext \ + UnpackedTarball/skia/src/gpu/GrDefaultGeoProcFactory \ + UnpackedTarball/skia/src/gpu/GrDistanceFieldGenFromVector \ + UnpackedTarball/skia/src/gpu/GrDrawingManager \ + UnpackedTarball/skia/src/gpu/GrDrawOpAtlas \ + UnpackedTarball/skia/src/gpu/GrDrawOpTest \ + UnpackedTarball/skia/src/gpu/GrDriverBugWorkarounds \ + UnpackedTarball/skia/src/gpu/GrDynamicAtlas \ + UnpackedTarball/skia/src/gpu/GrFinishCallbacks \ + UnpackedTarball/skia/src/gpu/GrFixedClip \ + UnpackedTarball/skia/src/gpu/GrFragmentProcessor \ + UnpackedTarball/skia/src/gpu/GrGpu \ + UnpackedTarball/skia/src/gpu/GrGpuBuffer \ + UnpackedTarball/skia/src/gpu/GrGpuResource \ + UnpackedTarball/skia/src/gpu/GrImageContext \ + UnpackedTarball/skia/src/gpu/GrImageTextureMaker \ + UnpackedTarball/skia/src/gpu/GrLegacyDirectContext \ + UnpackedTarball/skia/src/gpu/GrManagedResource \ + UnpackedTarball/skia/src/gpu/GrMemoryPool \ + UnpackedTarball/skia/src/gpu/GrOnFlushResourceProvider \ + UnpackedTarball/skia/src/gpu/GrOpFlushState \ + UnpackedTarball/skia/src/gpu/GrOpsRenderPass \ + UnpackedTarball/skia/src/gpu/GrOpsTask \ + UnpackedTarball/skia/src/gpu/GrPaint \ + UnpackedTarball/skia/src/gpu/GrPath \ + UnpackedTarball/skia/src/gpu/GrPathProcessor \ + UnpackedTarball/skia/src/gpu/GrPathRenderer \ + UnpackedTarball/skia/src/gpu/GrPathRendererChain \ + UnpackedTarball/skia/src/gpu/GrPathRendering \ + UnpackedTarball/skia/src/gpu/GrPipeline \ + UnpackedTarball/skia/src/gpu/GrPrimitiveProcessor \ + UnpackedTarball/skia/src/gpu/GrProcessorAnalysis \ + UnpackedTarball/skia/src/gpu/GrProcessor \ + UnpackedTarball/skia/src/gpu/GrProcessorSet \ + UnpackedTarball/skia/src/gpu/GrProcessorUnitTest \ + UnpackedTarball/skia/src/gpu/GrProgramDesc \ + UnpackedTarball/skia/src/gpu/GrProgramInfo \ + UnpackedTarball/skia/src/gpu/GrProxyProvider \ + UnpackedTarball/skia/src/gpu/GrRecordingContext \ + UnpackedTarball/skia/src/gpu/GrRectanizerPow2 \ + UnpackedTarball/skia/src/gpu/GrRectanizerSkyline \ + UnpackedTarball/skia/src/gpu/GrRenderTask \ + UnpackedTarball/skia/src/gpu/GrReducedClip \ + UnpackedTarball/skia/src/gpu/GrRenderTargetContext \ + UnpackedTarball/skia/src/gpu/GrRenderTarget \ + UnpackedTarball/skia/src/gpu/GrRenderTargetProxy \ + UnpackedTarball/skia/src/gpu/GrResourceAllocator \ + UnpackedTarball/skia/src/gpu/GrResourceCache \ + UnpackedTarball/skia/src/gpu/GrResourceProvider \ + UnpackedTarball/skia/src/gpu/GrRingBuffer \ + UnpackedTarball/skia/src/gpu/GrSamplePatternDictionary \ + UnpackedTarball/skia/src/gpu/GrShaderCaps \ + UnpackedTarball/skia/src/gpu/GrShaderUtils \ + UnpackedTarball/skia/src/gpu/GrShaderVar \ + UnpackedTarball/skia/src/gpu/GrSoftwarePathRenderer \ + UnpackedTarball/skia/src/gpu/GrSPIRVUniformHandler \ + UnpackedTarball/skia/src/gpu/GrSPIRVVaryingHandler \ + UnpackedTarball/skia/src/gpu/GrStagingBuffer \ + UnpackedTarball/skia/src/gpu/GrStencilAttachment \ + UnpackedTarball/skia/src/gpu/GrStencilMaskHelper \ + UnpackedTarball/skia/src/gpu/GrStencilSettings \ + UnpackedTarball/skia/src/gpu/GrStyle \ + UnpackedTarball/skia/src/gpu/GrSurfaceContext \ + UnpackedTarball/skia/src/gpu/GrSurface \ + UnpackedTarball/skia/src/gpu/GrSurfaceProxy \ + UnpackedTarball/skia/src/gpu/GrSwizzle \ + UnpackedTarball/skia/src/gpu/GrSWMaskHelper \ + UnpackedTarball/skia/src/gpu/GrTestUtils \ + UnpackedTarball/skia/src/gpu/GrTriangulator \ + UnpackedTarball/skia/src/gpu/GrUniformDataManager \ + UnpackedTarball/skia/src/gpu/GrTextureAdjuster \ + UnpackedTarball/skia/src/gpu/GrTexture \ + UnpackedTarball/skia/src/gpu/GrTextureMaker \ + UnpackedTarball/skia/src/gpu/GrTextureProducer \ + UnpackedTarball/skia/src/gpu/GrTextureProxy \ + UnpackedTarball/skia/src/gpu/GrTextureRenderTargetProxy \ + UnpackedTarball/skia/src/gpu/GrTextureResolveRenderTask \ + UnpackedTarball/skia/src/gpu/GrTransferFromRenderTask \ + UnpackedTarball/skia/src/gpu/GrWaitRenderTask \ + UnpackedTarball/skia/src/gpu/GrXferProcessor \ + UnpackedTarball/skia/src/gpu/GrYUVProvider \ + UnpackedTarball/skia/src/gpu/mock/GrMockCaps \ + UnpackedTarball/skia/src/gpu/mock/GrMockGpu \ + UnpackedTarball/skia/src/gpu/mock/GrMockTypes \ + UnpackedTarball/skia/src/gpu/ops/GrAAConvexPathRenderer \ + UnpackedTarball/skia/src/gpu/ops/GrAAConvexTessellator \ + UnpackedTarball/skia/src/gpu/ops/GrAAHairLinePathRenderer \ + UnpackedTarball/skia/src/gpu/ops/GrAALinearizingConvexPathRenderer \ + UnpackedTarball/skia/src/gpu/ops/GrAtlasTextOp \ + UnpackedTarball/skia/src/gpu/ops/GrClearOp \ + UnpackedTarball/skia/src/gpu/ops/GrDashLinePathRenderer \ + UnpackedTarball/skia/src/gpu/ops/GrDashOp \ + UnpackedTarball/skia/src/gpu/ops/GrDefaultPathRenderer \ + UnpackedTarball/skia/src/gpu/ops/GrDrawableOp \ + UnpackedTarball/skia/src/gpu/ops/GrDrawAtlasOp \ + UnpackedTarball/skia/src/gpu/ops/GrDrawPathOp \ + UnpackedTarball/skia/src/gpu/ops/GrDrawVerticesOp \ + UnpackedTarball/skia/src/gpu/ops/GrFillRectOp \ + UnpackedTarball/skia/src/gpu/ops/GrFillRRectOp \ + UnpackedTarball/skia/src/gpu/ops/GrLatticeOp \ + UnpackedTarball/skia/src/gpu/ops/GrMeshDrawOp \ + UnpackedTarball/skia/src/gpu/ops/GrOp \ + UnpackedTarball/skia/src/gpu/ops/GrOvalOpFactory \ + UnpackedTarball/skia/src/gpu/ops/GrQuadPerEdgeAA \ + UnpackedTarball/skia/src/gpu/ops/GrRegionOp \ + UnpackedTarball/skia/src/gpu/ops/GrShadowRRectOp \ + UnpackedTarball/skia/src/gpu/ops/GrSimpleMeshDrawOpHelper \ + UnpackedTarball/skia/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil \ + UnpackedTarball/skia/src/gpu/ops/GrSmallPathRenderer \ + UnpackedTarball/skia/src/gpu/ops/GrStencilAndCoverPathRenderer \ + UnpackedTarball/skia/src/gpu/ops/GrStencilPathOp \ + UnpackedTarball/skia/src/gpu/ops/GrStrokeRectOp \ + UnpackedTarball/skia/src/gpu/ops/GrTriangulatingPathRenderer \ + UnpackedTarball/skia/src/gpu/ops/GrTextureOp \ + UnpackedTarball/skia/src/gpu/SkGpuDevice \ + UnpackedTarball/skia/src/gpu/SkGpuDevice_drawTexture \ + UnpackedTarball/skia/src/gpu/SkGr \ + UnpackedTarball/skia/src/gpu/tessellate/GrDrawAtlasPathOp \ + UnpackedTarball/skia/src/gpu/tessellate/GrFillPathShader \ + UnpackedTarball/skia/src/gpu/tessellate/GrStencilPathShader \ + UnpackedTarball/skia/src/gpu/tessellate/GrStrokeGeometry \ + UnpackedTarball/skia/src/gpu/tessellate/GrTessellatePathOp \ + UnpackedTarball/skia/src/gpu/tessellate/GrTessellationPathRenderer \ + UnpackedTarball/skia/src/gpu/text/GrAtlasManager \ + UnpackedTarball/skia/src/gpu/text/GrDistanceFieldAdjustTable \ + UnpackedTarball/skia/src/gpu/text/GrSDFMaskFilter \ + UnpackedTarball/skia/src/gpu/text/GrSDFTOptions \ + UnpackedTarball/skia/src/gpu/text/GrStrikeCache \ + UnpackedTarball/skia/src/gpu/text/GrTextBlobCache \ + UnpackedTarball/skia/src/gpu/text/GrTextBlob \ + UnpackedTarball/skia/src/image/SkImage_GpuBase \ + UnpackedTarball/skia/src/image/SkImage_Gpu \ + UnpackedTarball/skia/src/image/SkImage_GpuYUVA \ + UnpackedTarball/skia/src/image/SkSurface_Gpu \ + UnpackedTarball/skia/src/gpu/vk/GrVkAMDMemoryAllocator \ + UnpackedTarball/skia/src/gpu/vk/GrVkBuffer \ + UnpackedTarball/skia/src/gpu/vk/GrVkCaps \ + UnpackedTarball/skia/src/gpu/vk/GrVkCommandBuffer \ + UnpackedTarball/skia/src/gpu/vk/GrVkCommandPool \ + UnpackedTarball/skia/src/gpu/vk/GrVkDescriptorPool \ + UnpackedTarball/skia/src/gpu/vk/GrVkDescriptorSet \ + UnpackedTarball/skia/src/gpu/vk/GrVkDescriptorSetManager \ + UnpackedTarball/skia/src/gpu/vk/GrVkExtensions \ + UnpackedTarball/skia/src/gpu/vk/GrVkFramebuffer \ + UnpackedTarball/skia/src/gpu/vk/GrVkGpu \ + UnpackedTarball/skia/src/gpu/vk/GrVkImage \ + UnpackedTarball/skia/src/gpu/vk/GrVkImageView \ + UnpackedTarball/skia/src/gpu/vk/GrVkInterface \ + UnpackedTarball/skia/src/gpu/vk/GrVkMemory \ + UnpackedTarball/skia/src/gpu/vk/GrVkMeshBuffer \ + UnpackedTarball/skia/src/gpu/vk/GrVkOpsRenderPass \ + UnpackedTarball/skia/src/gpu/vk/GrVkPipeline \ + UnpackedTarball/skia/src/gpu/vk/GrVkPipelineStateBuilder \ + UnpackedTarball/skia/src/gpu/vk/GrVkPipelineStateCache \ + UnpackedTarball/skia/src/gpu/vk/GrVkPipelineState \ + UnpackedTarball/skia/src/gpu/vk/GrVkPipelineStateDataManager \ + UnpackedTarball/skia/src/gpu/vk/GrVkRenderPass \ + UnpackedTarball/skia/src/gpu/vk/GrVkRenderTarget \ + UnpackedTarball/skia/src/gpu/vk/GrVkResourceProvider \ + UnpackedTarball/skia/src/gpu/vk/GrVkSampler \ + UnpackedTarball/skia/src/gpu/vk/GrVkSamplerYcbcrConversion \ + UnpackedTarball/skia/src/gpu/vk/GrVkSecondaryCBDrawContext \ + UnpackedTarball/skia/src/gpu/vk/GrVkSemaphore \ + UnpackedTarball/skia/src/gpu/vk/GrVkStencilAttachment \ + UnpackedTarball/skia/src/gpu/vk/GrVkTexture \ + UnpackedTarball/skia/src/gpu/vk/GrVkTextureRenderTarget \ + UnpackedTarball/skia/src/gpu/vk/GrVkTransferBuffer \ + UnpackedTarball/skia/src/gpu/vk/GrVkTypesPriv \ + UnpackedTarball/skia/src/gpu/vk/GrVkUniformBuffer \ + UnpackedTarball/skia/src/gpu/vk/GrVkUniformHandler \ + UnpackedTarball/skia/src/gpu/vk/GrVkUtil \ + UnpackedTarball/skia/src/gpu/vk/GrVkVaryingHandler \ +)) + +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/ports/SkGlobalInitialization_default \ + UnpackedTarball/skia/src/ports/SkImageGenerator_none \ + UnpackedTarball/skia/src/ports/SkOSFile_stdio \ +)) + +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/opts/SkOpts_avx, $(CXXFLAGS_INTRINSICS_AVX) $(CLANG_CXXFLAGS_INTRINSICS_AVX) \ +)) +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/opts/SkOpts_hsw, \ + $(CXXFLAGS_INTRINSICS_AVX2) $(CXXFLAGS_INTRINSICS_F16C) $(CXXFLAGS_INTRINSICS_FMA) \ + $(CLANG_CXXFLAGS_INTRINSICS_AVX2) $(CLANG_CXXFLAGS_INTRINSICS_F16C) $(CLANG_CXXFLAGS_INTRINSICS_FMA) \ +)) +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/opts/SkOpts_sse41, $(CXXFLAGS_INTRINSICS_SSE41) $(CLANG_CXXFLAGS_INTRINSICS_SSE41) \ +)) +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/opts/SkOpts_sse42, $(CXXFLAGS_INTRINSICS_SSE42) $(CLANG_CXXFLAGS_INTRINSICS_SSE42) \ +)) +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/opts/SkOpts_ssse3, $(CXXFLAGS_INTRINSICS_SSSE3) $(CLANG_CXXFLAGS_INTRINSICS_SSSE3) \ +)) +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/opts/SkOpts_crc32 \ +)) + +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/opts/SkOpts_skx, $(CXXFLAGS_INTRINSICS_AVX512) $(CLANG_CXXFLAGS_INTRINSICS_AVX512)\ +)) + +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/tools/gpu/vk/VkTestUtils \ + UnpackedTarball/skia/tools/sk_app/VulkanWindowContext \ +)) + +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/ports/SkDebug_win \ + UnpackedTarball/skia/src/ports/SkFontHost_win \ + UnpackedTarball/skia/src/fonts/SkFontMgr_indirect \ + UnpackedTarball/skia/src/ports/SkFontMgr_win_dw \ + UnpackedTarball/skia/src/ports/SkFontMgr_win_dw_factory \ + UnpackedTarball/skia/src/ports/SkOSFile_win \ + UnpackedTarball/skia/src/ports/SkOSLibrary_win \ + UnpackedTarball/skia/src/ports/SkScalerContext_win_dw \ + UnpackedTarball/skia/src/ports/SkTypeface_win_dw \ + UnpackedTarball/skia/src/utils/win/SkAutoCoInitialize \ + UnpackedTarball/skia/src/utils/win/SkDWrite \ + UnpackedTarball/skia/src/utils/win/SkDWriteFontFileStream \ + UnpackedTarball/skia/src/utils/win/SkDWriteGeometrySink \ + UnpackedTarball/skia/src/utils/win/SkHRESULT \ + UnpackedTarball/skia/src/utils/win/SkIStream \ +)) + +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/tools/sk_app/win/RasterWindowContext_win \ + UnpackedTarball/skia/tools/sk_app/win/VulkanWindowContext_win \ +)) +else +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/ports/SkDebug_stdio \ + UnpackedTarball/skia/src/ports/SkFontConfigInterface \ + UnpackedTarball/skia/src/ports/SkFontConfigInterface_direct \ + UnpackedTarball/skia/src/ports/SkFontConfigInterface_direct_factory \ + UnpackedTarball/skia/src/ports/SkFontHost_FreeType_common \ + UnpackedTarball/skia/src/ports/SkFontHost_FreeType \ + UnpackedTarball/skia/src/ports/SkFontMgr_FontConfigInterface \ + UnpackedTarball/skia/src/ports/SkFontMgr_fontconfig \ + UnpackedTarball/skia/src/ports/SkFontMgr_fontconfig_factory \ + UnpackedTarball/skia/src/ports/SkOSFile_posix \ + UnpackedTarball/skia/src/ports/SkOSLibrary_posix \ +)) + +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/tools/sk_app/unix/RasterWindowContext_unix \ + UnpackedTarball/skia/tools/sk_app/unix/VulkanWindowContext_unix \ +)) +endif + +$(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/third_party/skcms/skcms \ + UnpackedTarball/skia/third_party/vulkanmemoryallocator/GrVulkanMemoryAllocator \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/skia/Makefile b/external/skia/Makefile new file mode 100644 index 000000000..e4968cf85 --- /dev/null +++ b/external/skia/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/skia/Module_skia.mk b/external/skia/Module_skia.mk new file mode 100644 index 000000000..4cb8b5157 --- /dev/null +++ b/external/skia/Module_skia.mk @@ -0,0 +1,18 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,skia)) + +$(eval $(call gb_Module_add_targets,skia,\ + UnpackedTarball_skia \ + Library_skia \ +)) + + +# vim: set noet sw=4 ts=4: diff --git a/external/skia/README b/external/skia/README new file mode 100644 index 000000000..ccd1be151 --- /dev/null +++ b/external/skia/README @@ -0,0 +1,27 @@ +External package containing skia. + +https://skia.org/ + + +How to update the tarball: +========================== + +git clone https://skia.googlesource.com/skia.git +cd skia +git checkout chrome/mXX +id=$(git rev-parse chrome/mXX) +git clean -idx +rm -rf .git gitignore infra modules/canvaskit resources site +cd .. +tar cvJf skia-mXX-$id.tar.xz skia + +(where XX refers to the branch version) + +And review differences for BUILD.gn and relevant files in gn/ : +git diff chrome/mYY..chrome/mXX ./BUILD.gn ./gn + + +GrContext sharing +================= + +For details about the share-grcontext patch, see vcl/skia/README. diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk new file mode 100644 index 000000000..5caeff270 --- /dev/null +++ b/external/skia/UnpackedTarball_skia.mk @@ -0,0 +1,53 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,skia)) + +$(eval $(call gb_UnpackedTarball_set_tarball,skia,$(SKIA_TARBALL))) + +# * c++20.patch.0 has been reported upstream at +# <https://groups.google.com/forum/#!topic/skia-discuss/pYZQq_sLnv8> "C++20 operator== issue": +skia_patches := \ + lerp.patch \ + fix-pch.patch.1 \ + fix-ddi.patch \ + make-api-visible.patch.1 \ + no-trace-resources-on-exit.patch.1 \ + fix-alpha-difference-copy.patch.1 \ + libvulkan-name.patch.1 \ + share-grcontext.patch.1 \ + Wdeprecated-copy-dtor.patch.0 \ + fix-msvc.patch.1 \ + fix-gcc-x86.patch.1 \ + fix-sse.patch.1 \ + clang11-flax-vector-conversion.patch.0 \ + clang-attributes-warning.patch.1 \ + fontconfig-get-typeface.patch.0 \ + windows-do-not-modify-logfont.patch.0 \ + windows-text-gamma.patch.0 \ + windows-force-unicode-api.patch.0 \ + operator-eq-bool.patch.1 \ + fix-without-gl.patch.0 \ + extend-rgb-to-rgba.patch.0 \ + windows-typeface-directwrite.patch.0 \ + windows-raster-surface-no-copies.patch.1 \ + fix-windows-dwrite.patch.1 \ + public-make-from-backend-texture.patch.1 \ + +$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1)) + +$(eval $(call gb_UnpackedTarball_add_patches,skia,\ + $(foreach patch,$(skia_patches),external/skia/$(patch)) \ +)) + +$(eval $(call gb_UnpackedTarball_set_post_action,skia,\ + mv third_party/skcms/skcms.cc third_party/skcms/skcms.cpp \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/skia/Wdeprecated-copy-dtor.patch.0 b/external/skia/Wdeprecated-copy-dtor.patch.0 new file mode 100644 index 000000000..710fe9c24 --- /dev/null +++ b/external/skia/Wdeprecated-copy-dtor.patch.0 @@ -0,0 +1,21 @@ +--- include/gpu/GrDriverBugWorkarounds.h ++++ include/gpu/GrDriverBugWorkarounds.h +@@ -35,6 +35,7 @@ + public: + GrDriverBugWorkarounds(); + explicit GrDriverBugWorkarounds(const std::vector<int32_t>& workarounds); ++ GrDriverBugWorkarounds(GrDriverBugWorkarounds const &) = default; + + GrDriverBugWorkarounds& operator=(const GrDriverBugWorkarounds&) = default; + +--- tools/sk_app/VulkanWindowContext.h ++++ tools/sk_app/VulkanWindowContext.h +@@ -33,6 +33,8 @@ + SharedGrContext() {} + GrContext* getGrContext() { return shared ? shared->fContext.get() : nullptr; } + ~SharedGrContext() { shared.reset(); checkDestroyShared(); } ++ SharedGrContext(SharedGrContext const &) = default; ++ SharedGrContext & operator =(SharedGrContext const &) = default; + bool operator!() const { return !shared; } + void reset() { shared.reset(); } + private: diff --git a/external/skia/clang-attributes-warning.patch.1 b/external/skia/clang-attributes-warning.patch.1 new file mode 100644 index 000000000..1e30e290b --- /dev/null +++ b/external/skia/clang-attributes-warning.patch.1 @@ -0,0 +1,31 @@ +diff --git a/include/private/SkFloatingPoint.h b/include/private/SkFloatingPoint.h +index 110dda2ae4..530634b815 100644 +--- a/include/private/SkFloatingPoint.h ++++ b/include/private/SkFloatingPoint.h +@@ -159,7 +159,9 @@ static inline int64_t sk_float_saturate2int64(float x) { + // Cast double to float, ignoring any warning about too-large finite values being cast to float. + // Clang thinks this is undefined, but it's actually implementation defined to return either + // the largest float or infinity (one of the two bracketing representable floats). Good enough! ++#if defined(__clang__) + [[clang::no_sanitize("float-cast-overflow")]] ++#endif + static inline float sk_double_to_float(double x) { + return static_cast<float>(x); + } +@@ -226,12 +228,16 @@ static inline float sk_float_rsqrt(float x) { + // IEEE defines how float divide behaves for non-finite values and zero-denoms, but C does not + // so we have a helper that suppresses the possible undefined-behavior warnings. + ++#if defined(__clang__) + [[clang::no_sanitize("float-divide-by-zero")]] ++#endif + static inline float sk_ieee_float_divide(float numer, float denom) { + return numer / denom; + } + ++#if defined(__clang__) + [[clang::no_sanitize("float-divide-by-zero")]] ++#endif + static inline double sk_ieee_double_divide(double numer, double denom) { + return numer / denom; + } diff --git a/external/skia/clang11-flax-vector-conversion.patch.0 b/external/skia/clang11-flax-vector-conversion.patch.0 new file mode 100644 index 000000000..40cf4e0a4 --- /dev/null +++ b/external/skia/clang11-flax-vector-conversion.patch.0 @@ -0,0 +1,11 @@ +--- src/opts/SkRasterPipeline_opts.h ++++ src/opts/SkRasterPipeline_opts.h +@@ -68,7 +68,7 @@ + }; + + +-#if !defined(__clang__) ++#if !defined(__clang__) || __clang_major__ >= 11 + #define JUMPER_IS_SCALAR + #elif defined(SK_ARM_HAS_NEON) + #define JUMPER_IS_NEON diff --git a/external/skia/extend-rgb-to-rgba.patch.0 b/external/skia/extend-rgb-to-rgba.patch.0 new file mode 100644 index 000000000..f68dbab96 --- /dev/null +++ b/external/skia/extend-rgb-to-rgba.patch.0 @@ -0,0 +1,23 @@ +diff --git a/include/core/SkSwizzle.h b/include/core/SkSwizzle.h +index 61e93b2da7..c19063bb91 100644 +--- ./include/core/SkSwizzle.h ++++ ./include/core/SkSwizzle.h +@@ -16,4 +16,6 @@ + */ + SK_API void SkSwapRB(uint32_t* dest, const uint32_t* src, int count); + ++SK_API void SkExtendRGBToRGBA(uint32_t* dest, const uint8_t* src, int count); ++ + #endif +diff --git a/src/core/SkSwizzle.cpp b/src/core/SkSwizzle.cpp +index 301b0184f1..6e6dd27558 100644 +--- ./src/core/SkSwizzle.cpp ++++ ./src/core/SkSwizzle.cpp +@@ -12,3 +12,7 @@ + void SkSwapRB(uint32_t* dest, const uint32_t* src, int count) { + SkOpts::RGBA_to_BGRA(dest, src, count); + } ++ ++void SkExtendRGBToRGBA(uint32_t* dest, const uint8_t* src, int count) { ++ SkOpts::RGB_to_RGB1(dest, src, count); ++} diff --git a/external/skia/fix-alpha-difference-copy.patch.1 b/external/skia/fix-alpha-difference-copy.patch.1 new file mode 100644 index 000000000..61a61e621 --- /dev/null +++ b/external/skia/fix-alpha-difference-copy.patch.1 @@ -0,0 +1,13 @@ +diff --git a/src/core/SkBlitter_Sprite.cpp b/src/core/SkBlitter_Sprite.cpp +index df7d9a7025..7f94c2a660 100644 +--- a/src/core/SkBlitter_Sprite.cpp ++++ b/src/core/SkBlitter_Sprite.cpp +@@ -191,7 +191,7 @@ SkBlitter* SkBlitter::ChooseSprite(const SkPixmap& dst, const SkPaint& paint, + } + + // TODO: in principle SkRasterPipelineSpriteBlitter could be made to handle this. +- if (source.alphaType() == kUnpremul_SkAlphaType) { ++ if (source.alphaType() != dst.alphaType()) { + return nullptr; + } + diff --git a/external/skia/fix-ddi.patch b/external/skia/fix-ddi.patch new file mode 100644 index 000000000..f827c1d69 --- /dev/null +++ b/external/skia/fix-ddi.patch @@ -0,0 +1,9 @@ +--- skia/src/utils/win/SkDWriteNTDDI_VERSION.h.sav 2019-08-15 21:59:46.000000000 +0200 ++++ skia/src/utils/win/SkDWriteNTDDI_VERSION.h 2019-09-26 15:30:36.395622200 +0200 +@@ -28,4 +28,6 @@ + # endif + #endif + ++#define NTDDI_VERSION 0x0A000002 // NTDDI_WIN10_RS1 ++ + #endif diff --git a/external/skia/fix-gcc-x86.patch.1 b/external/skia/fix-gcc-x86.patch.1 new file mode 100644 index 000000000..097c59475 --- /dev/null +++ b/external/skia/fix-gcc-x86.patch.1 @@ -0,0 +1,16 @@ +--- skia/third_party/skcms/src/Transform_inl.h 2020-04-13 00:38:56.363207994 +0200 ++++ skia/third_party/skcms/src/Transform_inl.h~ 2020-04-13 00:39:18.215603244 +0200 +@@ -689,11 +689,11 @@ + && (defined(__mips64) || defined(__i386) || defined(__s390x__)) + #define MAYBE_NOINLINE __attribute__((noinline)) + #else +- #define MAYBE_NOINLINE ++ #define MAYBE_NOINLINE static + #endif + + MAYBE_NOINLINE +-static void clut(const skcms_A2B* a2b, F* r, F* g, F* b, F a) { ++void clut(const skcms_A2B* a2b, F* r, F* g, F* b, F a) { + const int dim = (int)a2b->input_channels; + assert (0 < dim && dim <= 4); + diff --git a/external/skia/fix-msvc.patch.1 b/external/skia/fix-msvc.patch.1 new file mode 100644 index 000000000..ffbf19883 --- /dev/null +++ b/external/skia/fix-msvc.patch.1 @@ -0,0 +1,13 @@ +diff --git a/src/gpu/GrFragmentProcessor.h b/src/gpu/GrFragmentProcessor.h +index 03d22aeaae..0f91f6f73c 100644 +--- a/src/gpu/GrFragmentProcessor.h ++++ b/src/gpu/GrFragmentProcessor.h +@@ -603,7 +603,7 @@ public: + operator bool() const { return fFPIter; } + bool operator!=(const FPItemEndIter&) { return (bool)*this; } + +- FPItemIter(const FPItemIter&) = delete; ++ FPItemIter(const FPItemIter&) = default; + FPItemIter& operator=(const FPItemIter&) = delete; + + private: diff --git a/external/skia/fix-pch.patch.1 b/external/skia/fix-pch.patch.1 new file mode 100644 index 000000000..9c89edbfe --- /dev/null +++ b/external/skia/fix-pch.patch.1 @@ -0,0 +1,123 @@ +diff --git a/include/core/SkColor.h b/include/core/SkColor.h +index 53df435e46..ce74db8b27 100644 +--- a/include/core/SkColor.h ++++ b/include/core/SkColor.h +@@ -400,6 +400,7 @@ using SkColor4f = SkRGBA4f<kUnpremul_SkAlphaType>; + + template <> SK_API SkColor4f SkColor4f::FromColor(SkColor); + template <> SK_API SkColor SkColor4f::toSkColor() const; ++template <> uint32_t SkColor4f::toBytes_RGBA() const; + + namespace SkColors { + constexpr SkColor4f kTransparent = {0, 0, 0, 0}; +diff --git a/include/private/SkColorData.h b/include/private/SkColorData.h +index 2090ab4b7e..801511586f 100644 +--- a/include/private/SkColorData.h ++++ b/include/private/SkColorData.h +@@ -441,4 +441,6 @@ constexpr SkPMColor4f SK_PMColor4fILLEGAL = { SK_FloatNegativeInfinity, + SK_FloatNegativeInfinity, + SK_FloatNegativeInfinity }; + ++template <> uint32_t SkPMColor4f::toBytes_RGBA() const; ++ + #endif +diff --git a/src/gpu/text/GrTextBlobCache.h b/src/gpu/text/GrTextBlobCache.h +index 1484cee527..dcb53b20a1 100644 +--- a/src/gpu/text/GrTextBlobCache.h ++++ b/src/gpu/text/GrTextBlobCache.h +@@ -197,4 +197,6 @@ private: + SkMessageBus<PurgeBlobMessage>::Inbox fPurgeBlobInbox; + }; + ++template<> SkMessageBus<GrTextBlobCache::PurgeBlobMessage>* SkMessageBus<GrTextBlobCache::PurgeBlobMessage>::Get(); ++ + #endif +diff --git a/src/gpu/vk/GrVkSemaphore.cpp b/src/gpu/vk/GrVkSemaphore.cpp +index 191b6a3ce5..26754acccd 100644 +--- a/src/gpu/vk/GrVkSemaphore.cpp ++++ b/src/gpu/vk/GrVkSemaphore.cpp +@@ -10,6 +10,7 @@ + #include "include/gpu/GrBackendSemaphore.h" + #include "src/gpu/vk/GrVkGpu.h" + #include "src/gpu/vk/GrVkUtil.h" ++#include "tools/gpu/vk/GrVulkanDefines.h" + + #ifdef VK_USE_PLATFORM_WIN32_KHR + // windows wants to define this as CreateSemaphoreA or CreateSemaphoreW +diff --git a/src/utils/win/SkDWriteGeometrySink.h b/src/utils/win/SkDWriteGeometrySink.h +index 019539b191..5dd7bef353 100644 +--- a/src/utils/win/SkDWriteGeometrySink.h ++++ b/src/utils/win/SkDWriteGeometrySink.h +@@ -13,6 +13,8 @@ + + class SkPath; + ++#define CONST const ++ + #include <dwrite.h> + #include <d2d1.h> + +diff --git a/third_party/skcms/skcms.cc b/third_party/skcms/skcms.cc +index cc5738d977..c67310f6cc 100644 +--- a/third_party/skcms/skcms.cc ++++ b/third_party/skcms/skcms.cc +@@ -124,7 +124,8 @@ static float minus_1_ulp(float x) { + // Most transfer functions we work with are sRGBish. + // For exotic HDR transfer functions, we encode them using a tf.g that makes no sense, + // and repurpose the other fields to hold the parameters of the HDR functions. +-enum TFKind { Bad, sRGBish, PQish, HLGish, HLGinvish }; ++enum TFKind_skcms { Bad, sRGBish, PQish, HLGish, HLGinvish }; ++#define TFKind TFKind_skcms + struct TF_PQish { float A,B,C,D,E,F; }; + struct TF_HLGish { float R,G,a,b,c; }; + +@@ -2011,7 +2012,9 @@ typedef enum { + Op_store_hhhh, + Op_store_fff, + Op_store_ffff, +-} Op; ++} Op_skcms; ++ ++#define Op Op_skcms + + #if defined(__clang__) + template <int N, typename T> using Vec = T __attribute__((ext_vector_type(N))); +diff --git a/src/core/SkM44.cpp b/src/core/SkM44.cpp +index 2c82a0abd7..8505253d12 100644 +--- a/src/core/SkM44.cpp ++++ b/src/core/SkM44.cpp +@@ -300,6 +300,8 @@ SkM44 Sk3LookAt(const SkV3& eye, const SkV3& center, const SkV3& up) { + return m; + } + ++#undef near ++#undef far + SkM44 Sk3Perspective(float near, float far, float angle) { + SkASSERT(far > near); + +diff --git a/src/shaders/SkImageShader.cpp b/src/shaders/SkImageShader.cpp +index b8fd426e13..5e6f2a9b28 100755 +--- a/src/shaders/SkImageShader.cpp ++++ b/src/shaders/SkImageShader.cpp +@@ -808,6 +808,8 @@ skvm::Color SkImageShader::onProgram(skv + + // See GrCubicEffect for details of these weights. + // TODO: these maybe don't seem right looking at gm/bicubic and GrBicubicEffect. ++#undef near ++#undef far + auto near = [&](skvm::F32 t) { + // 1/18 + 9/18t + 27/18t^2 - 21/18t^3 == t ( t ( -21/18t + 27/18) + 9/18) + 1/18 + return t * (t * (t * (-21/18.0f) + 27/18.0f) + 9/18.0f) + 1/18.0f; +diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp +index 191b6a3ce5..26754acccd 100644 +--- a/src/gpu/gl/GrGLGpu.cpp ++++ b/src/gpu/gl/GrGLGpu.cpp +@@ -3766,6 +3766,8 @@ + } + } + ++#undef MemoryBarrier ++ + void GrGLGpu::insertManualFramebufferBarrier() { + SkASSERT(this->caps()->requiresManualFBBarrierAfterTessellatedStencilDraw()); + GL_CALL(MemoryBarrier(GR_GL_FRAMEBUFFER_BARRIER_BIT)); diff --git a/external/skia/fix-sse.patch.1 b/external/skia/fix-sse.patch.1 new file mode 100644 index 000000000..8a731725e --- /dev/null +++ b/external/skia/fix-sse.patch.1 @@ -0,0 +1,23 @@ +--- a/src/opts/SkRasterPipeline_opts.h ++++ b/src/opts/SkRasterPipeline_opts.h +@@ -1047,7 +1047,7 @@ static const size_t N = sizeof(F) / sizeof(float); + // TODO: crashes during compilation :( + #define ABI __attribute__((sysv_abi)) + #define JUMPER_NARROW_STAGES 0 +-#elif defined(_MSC_VER) ++#elif defined(_MSC_VER) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 + // Even if not vectorized, this lets us pass {r,g,b,a} as registers, + // instead of {b,a} on the stack. Narrow stages work best for __vectorcall. + #define ABI __vectorcall +--- a/include/private/SkVx.h ++++ b/include/private/SkVx.h +@@ -515,9 +515,6 @@ static inline Vec<N,uint8_t> approx_scale(const Vec<N,uint8_t>& x, const Vec<N,u + static inline Vec<4,float> rcp(const Vec<4,float>& x) { + return bit_pun<Vec<4,float>>(_mm_rcp_ps(bit_pun<__m128>(x))); + } +- static inline Vec<4,int> lrint(const Vec<4,float>& x) { +- return bit_pun<Vec<4,int>>(_mm_cvtps_epi32(bit_pun<__m128>(x))); +- } + + static inline Vec<2,float> sqrt(const Vec<2,float>& x) { + return shuffle<0,1>( sqrt(shuffle<0,1,0,1>(x))); diff --git a/external/skia/fix-windows-dwrite.patch.1 b/external/skia/fix-windows-dwrite.patch.1 new file mode 100644 index 000000000..482fa8b40 --- /dev/null +++ b/external/skia/fix-windows-dwrite.patch.1 @@ -0,0 +1,20 @@ +diff --git a/src/ports/SkFontMgr_win_dw.cpp b/src/ports/SkFontMgr_win_dw.cpp +index 6a4748f91c..50086a7780 100644 +--- a/src/ports/SkFontMgr_win_dw.cpp ++++ b/src/ports/SkFontMgr_win_dw.cpp +@@ -361,6 +361,7 @@ static bool FindByDWriteFont(SkTypeface* cached, void* ctx) { + DWriteFontTypeface* cshFace = reinterpret_cast<DWriteFontTypeface*>(cached); + ProtoDWriteTypeface* ctxFace = reinterpret_cast<ProtoDWriteTypeface*>(ctx); + ++#if defined(NTDDI_WIN10_RS3) && NTDDI_VERSION >= NTDDI_WIN10_RS3 + // IDWriteFontFace5 introduced both Equals and HasVariations + SkTScopedComPtr<IDWriteFontFace5> cshFontFace5; + SkTScopedComPtr<IDWriteFontFace5> ctxFontFace5; +@@ -369,6 +370,7 @@ static bool FindByDWriteFont(SkTypeface* cached, void* ctx) { + if (cshFontFace5 && ctxFontFace5) { + return cshFontFace5->Equals(ctxFontFace5.get()); + } ++#endif + + bool same; + diff --git a/external/skia/fix-without-gl.patch.0 b/external/skia/fix-without-gl.patch.0 new file mode 100644 index 000000000..0729162b2 --- /dev/null +++ b/external/skia/fix-without-gl.patch.0 @@ -0,0 +1,47 @@ +diff --git a/include/gpu/GrBackendSurface.h b/include/gpu/GrBackendSurface.h +index 378646ebc1..af3b9ce290 100644 +--- ./include/gpu/GrBackendSurface.h ++++ ./include/gpu/GrBackendSurface.h +@@ -74,9 +74,11 @@ public: + GrBackendFormat(const GrBackendFormat&); + GrBackendFormat& operator=(const GrBackendFormat&); + ++#ifdef SK_GL + static GrBackendFormat MakeGL(GrGLenum format, GrGLenum target) { + return GrBackendFormat(format, target); + } ++#endif + + static GrBackendFormat MakeVk(VkFormat format) { + return GrBackendFormat(format, GrVkYcbcrConversionInfo()); +diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h +index 17655bdbed..ce0641f423 100644 +--- ./include/gpu/gl/GrGLInterface.h ++++ ./include/gpu/gl/GrGLInterface.h +@@ -65,7 +65,9 @@ public: + + GrGLExtensions fExtensions; + ++#ifdef SK_GL + bool hasExtension(const char ext[]) const { return fExtensions.has(ext); } ++#endif + + /** + * The function pointers are in a struct so that we can have a compiler generated assignment +diff --git a/src/gpu/gl/GrGLContext.h b/src/gpu/gl/GrGLContext.h +index 66bfe29331..034cd21838 100644 +--- ./src/gpu/gl/GrGLContext.h ++++ ./src/gpu/gl/GrGLContext.h +@@ -45,10 +45,11 @@ public: + GrGLDriverVersion driverVersion() const { return fDriverVersion; } + const GrGLCaps* caps() const { return fGLCaps.get(); } + GrGLCaps* caps() { return fGLCaps.get(); } ++#ifdef SK_GL + bool hasExtension(const char* ext) const { + return fInterface->hasExtension(ext); + } +- ++#endif + const GrGLExtensions& extensions() const { return fInterface->fExtensions; } + + protected: diff --git a/external/skia/fontconfig-get-typeface.patch.0 b/external/skia/fontconfig-get-typeface.patch.0 new file mode 100644 index 000000000..a7a82bfa0 --- /dev/null +++ b/external/skia/fontconfig-get-typeface.patch.0 @@ -0,0 +1,32 @@ +--- ./src/ports/SkFontMgr_fontconfig.cpp.sav 2020-01-20 16:42:51.322186451 +0100 ++++ ./src/ports/SkFontMgr_fontconfig.cpp 2020-03-13 11:25:15.793936659 +0100 +@@ -699,6 +699,7 @@ class SkFontMgr_fontconfig : public SkFo + /** Creates a typeface using a typeface cache. + * @param pattern a complete pattern from FcFontRenderPrepare. + */ ++public: + sk_sp<SkTypeface> createTypefaceFromFcPattern(FcPattern* pattern) const { + FCLocker::AssertHeld(); + SkAutoMutexExclusive ama(fTFCacheMutex); +@@ -1039,3 +1040,9 @@ protected: + SK_API sk_sp<SkFontMgr> SkFontMgr_New_FontConfig(FcConfig* fc) { + return sk_make_sp<SkFontMgr_fontconfig>(fc); + } ++ ++SK_API sk_sp<SkTypeface> SkFontMgr_createTypefaceFromFcPattern(const sk_sp<SkFontMgr>& mgr, FcPattern* pattern) ++{ ++ FCLocker lock; ++ return static_cast<SkFontMgr_fontconfig*>(mgr.get())->createTypefaceFromFcPattern(pattern); ++} +--- ./include/ports/SkFontMgr_fontconfig.h.sav 2019-09-19 11:38:00.943185323 +0200 ++++ ./include/ports/SkFontMgr_fontconfig.h 2020-03-13 11:31:48.025716543 +0100 +@@ -19,4 +19,9 @@ class SkFontMgr; + */ + SK_API sk_sp<SkFontMgr> SkFontMgr_New_FontConfig(FcConfig* fc); + ++struct _FcPattern; ++typedef struct _FcPattern FcPattern; ++class SkTypeface; ++SK_API sk_sp<SkTypeface> SkFontMgr_createTypefaceFromFcPattern(const sk_sp<SkFontMgr>& mgr, FcPattern* pattern); ++ + #endif // #ifndef SkFontMgr_fontconfig_DEFINED diff --git a/external/skia/inc/pch/precompiled_skia.cxx b/external/skia/inc/pch/precompiled_skia.cxx new file mode 100644 index 000000000..8892e30fd --- /dev/null +++ b/external/skia/inc/pch/precompiled_skia.cxx @@ -0,0 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "precompiled_skia.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/skia/inc/pch/precompiled_skia.hxx b/external/skia/inc/pch/precompiled_skia.hxx new file mode 100644 index 000000000..a28dd583e --- /dev/null +++ b/external/skia/inc/pch/precompiled_skia.hxx @@ -0,0 +1,960 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/* + This file has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such + manual changes will be rewritten by the next run of update_pch.sh (which presumably + also fixes all possible problems, so it's usually better to use it). + + Generated on 2020-06-30 17:38:10 using: + ./bin/update_pch external/skia skia --cutoff=1 --exclude:system --include:module --include:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./external/skia/inc/pch/precompiled_skia.hxx "make external/skia.build" --find-conflicts +*/ + +#if PCH_LEVEL >= 1 +#include <algorithm> +#include <assert.h> +#include <atomic> +#include <bitset> +#include <cctype> +#include <cfloat> +#include <chrono> +#include <cinttypes> +#include <climits> +#include <cmath> +#include <cstddef> +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <ctype.h> +#include <deque> +#include <errno.h> +#include <float.h> +#include <functional> +#include <inttypes.h> +#include <iterator> +#include <limits.h> +#include <limits> +#include <locale> +#include <memory> +#include <new> +#include <png.h> +#include <queue> +#include <set> +#include <skcms.h> +#include <sstream> +#include <stdarg.h> +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <string> +#include <thread> +#include <tuple> +#include <type_traits> +#include <unordered_map> +#include <unordered_set> +#include <utility> +#include <vector> +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#include <rtl/alloc.h> +#include <sal/log.hxx> +#endif // PCH_LEVEL >= 2 +// PCH_LEVEL >= 3 +#include <include/c/sk_canvas.h> +#include <include/c/sk_colorspace.h> +#include <include/c/sk_data.h> +#include <include/c/sk_image.h> +#include <include/c/sk_imageinfo.h> +#include <include/c/sk_maskfilter.h> +#include <include/c/sk_paint.h> +#include <include/c/sk_path.h> +#include <include/c/sk_picture.h> +#include <include/c/sk_shader.h> +#include <include/c/sk_surface.h> +#include <include/codec/SkAndroidCodec.h> +#include <include/codec/SkCodec.h> +#include <include/core/SkAnnotation.h> +#include <include/core/SkBBHFactory.h> +#include <include/core/SkBitmap.h> +#include <include/core/SkBlendMode.h> +#include <include/core/SkCanvas.h> +#include <include/core/SkColor.h> +#include <include/core/SkColorFilter.h> +#include <include/core/SkColorPriv.h> +#include <include/core/SkColorSpace.h> +#include <include/core/SkContourMeasure.h> +#include <include/core/SkCubicMap.h> +#include <include/core/SkData.h> +#include <include/core/SkDataTable.h> +#include <include/core/SkDeferredDisplayList.h> +#include <include/core/SkDeferredDisplayListRecorder.h> +#include <include/core/SkDocument.h> +#include <include/core/SkDrawLooper.h> +#include <include/core/SkDrawable.h> +#include <include/core/SkExecutor.h> +#include <include/core/SkFilterQuality.h> +#include <include/core/SkFlattenable.h> +#include <include/core/SkFont.h> +#include <include/core/SkFontLCDConfig.h> +#include <include/core/SkFontMetrics.h> +#include <include/core/SkFontMgr.h> +#include <include/core/SkGraphics.h> +#include <include/core/SkICC.h> +#include <include/core/SkImage.h> +#include <include/core/SkImageEncoder.h> +#include <include/core/SkImageFilter.h> +#include <include/core/SkImageGenerator.h> +#include <include/core/SkImageInfo.h> +#include <include/core/SkM44.h> +#include <include/core/SkMallocPixelRef.h> +#include <include/core/SkMaskFilter.h> +#include <include/core/SkMath.h> +#include <include/core/SkMatrix.h> +#include <include/core/SkMatrix44.h> +#include <include/core/SkOverdrawCanvas.h> +#include <include/core/SkPaint.h> +#include <include/core/SkPath.h> +#include <include/core/SkPathBuilder.h> +#include <include/core/SkPathEffect.h> +#include <include/core/SkPathMeasure.h> +#include <include/core/SkPicture.h> +#include <include/core/SkPictureRecorder.h> +#include <include/core/SkPixelRef.h> +#include <include/core/SkPixmap.h> +#include <include/core/SkPoint.h> +#include <include/core/SkPoint3.h> +#include <include/core/SkPromiseImageTexture.h> +#include <include/core/SkRRect.h> +#include <include/core/SkRSXform.h> +#include <include/core/SkRWBuffer.h> +#include <include/core/SkRasterHandleAllocator.h> +#include <include/core/SkRect.h> +#include <include/core/SkRefCnt.h> +#include <include/core/SkRegion.h> +#include <include/core/SkScalar.h> +#include <include/core/SkSerialProcs.h> +#include <include/core/SkShader.h> +#include <include/core/SkSize.h> +#include <include/core/SkStream.h> +#include <include/core/SkString.h> +#include <include/core/SkStrokeRec.h> +#include <include/core/SkSurface.h> +#include <include/core/SkSurfaceCharacterization.h> +#include <include/core/SkSurfaceProps.h> +#include <include/core/SkSwizzle.h> +#include <include/core/SkTextBlob.h> +#include <include/core/SkTileMode.h> +#include <include/core/SkTime.h> +#include <include/core/SkTraceMemoryDump.h> +#include <include/core/SkTypeface.h> +#include <include/core/SkTypes.h> +#include <include/core/SkUnPreMultiply.h> +#include <include/core/SkVertices.h> +#include <include/core/SkYUVAIndex.h> +#include <include/core/SkYUVASizeInfo.h> +#include <include/effects/Sk1DPathEffect.h> +#include <include/effects/Sk2DPathEffect.h> +#include <include/effects/SkAlphaThresholdFilter.h> +#include <include/effects/SkArithmeticImageFilter.h> +#include <include/effects/SkBlurDrawLooper.h> +#include <include/effects/SkBlurImageFilter.h> +#include <include/effects/SkBlurMaskFilter.h> +#include <include/effects/SkColorFilterImageFilter.h> +#include <include/effects/SkColorMatrix.h> +#include <include/effects/SkColorMatrixFilter.h> +#include <include/effects/SkComposeImageFilter.h> +#include <include/effects/SkCornerPathEffect.h> +#include <include/effects/SkDashPathEffect.h> +#include <include/effects/SkDiscretePathEffect.h> +#include <include/effects/SkDisplacementMapEffect.h> +#include <include/effects/SkDropShadowImageFilter.h> +#include <include/effects/SkGradientShader.h> +#include <include/effects/SkHighContrastFilter.h> +#include <include/effects/SkImageFilters.h> +#include <include/effects/SkImageSource.h> +#include <include/effects/SkLayerDrawLooper.h> +#include <include/effects/SkLightingImageFilter.h> +#include <include/effects/SkLumaColorFilter.h> +#include <include/effects/SkMagnifierImageFilter.h> +#include <include/effects/SkMatrixConvolutionImageFilter.h> +#include <include/effects/SkMergeImageFilter.h> +#include <include/effects/SkMorphologyImageFilter.h> +#include <include/effects/SkOffsetImageFilter.h> +#include <include/effects/SkOverdrawColorFilter.h> +#include <include/effects/SkPaintImageFilter.h> +#include <include/effects/SkPerlinNoiseShader.h> +#include <include/effects/SkPictureImageFilter.h> +#include <include/effects/SkRuntimeEffect.h> +#include <include/effects/SkShaderMaskFilter.h> +#include <include/effects/SkStrokeAndFillPathEffect.h> +#include <include/effects/SkTableColorFilter.h> +#include <include/effects/SkTableMaskFilter.h> +#include <include/effects/SkTileImageFilter.h> +#include <include/effects/SkTrimPathEffect.h> +#include <include/effects/SkXfermodeImageFilter.h> +#include <include/encode/SkJpegEncoder.h> +#include <include/encode/SkPngEncoder.h> +#include <include/encode/SkWebpEncoder.h> +#include <include/gpu/GrBackendDrawableInfo.h> +#include <include/gpu/GrBackendSemaphore.h> +#include <include/gpu/GrBackendSurface.h> +#include <include/gpu/GrConfig.h> +#include <include/gpu/GrContext.h> +#include <include/gpu/GrContextOptions.h> +#include <include/gpu/GrContextThreadSafeProxy.h> +#include <include/gpu/GrDriverBugWorkarounds.h> +#include <include/gpu/GrTypes.h> +#include <include/gpu/mock/GrMockTypes.h> +#include <include/gpu/vk/GrVkBackendContext.h> +#include <include/gpu/vk/GrVkExtensions.h> +#include <include/gpu/vk/GrVkMemoryAllocator.h> +#include <include/gpu/vk/GrVkTypes.h> +#include <include/pathops/SkPathOps.h> +#include <include/ports/SkRemotableFontMgr.h> +#include <include/private/GrContext_Base.h> +#include <include/private/GrImageContext.h> +#include <include/private/GrRecordingContext.h> +#include <include/private/GrResourceKey.h> +#include <include/private/GrSingleOwner.h> +#include <include/private/GrTypesPriv.h> +#include <include/private/GrVkTypesPriv.h> +#include <include/private/SkChecksum.h> +#include <include/private/SkColorData.h> +#include <include/private/SkDeque.h> +#include <include/private/SkEncodedInfo.h> +#include <include/private/SkFixed.h> +#include <include/private/SkFloatBits.h> +#include <include/private/SkFloatingPoint.h> +#include <include/private/SkHalf.h> +#include <include/private/SkIDChangeListener.h> +#include <include/private/SkImageInfoPriv.h> +#include <include/private/SkMacros.h> +#include <include/private/SkMalloc.h> +#include <include/private/SkMutex.h> +#include <include/private/SkNx.h> +#include <include/private/SkOnce.h> +#include <include/private/SkPathRef.h> +#include <include/private/SkSafe32.h> +#include <include/private/SkSemaphore.h> +#include <include/private/SkShadowFlags.h> +#include <include/private/SkSpinlock.h> +#include <include/private/SkTArray.h> +#include <include/private/SkTDArray.h> +#include <include/private/SkTFitsIn.h> +#include <include/private/SkTHash.h> +#include <include/private/SkTemplates.h> +#include <include/private/SkThreadAnnotations.h> +#include <include/private/SkThreadID.h> +#include <include/private/SkTo.h> +#include <include/private/SkVx.h> +#include <include/third_party/skcms/skcms.h> +#include <include/utils/SkBase64.h> +#include <include/utils/SkCamera.h> +#include <include/utils/SkCanvasStateUtils.h> +#include <include/utils/SkCustomTypeface.h> +#include <include/utils/SkEventTracer.h> +#include <include/utils/SkInterpolator.h> +#include <include/utils/SkNWayCanvas.h> +#include <include/utils/SkNoDrawCanvas.h> +#include <include/utils/SkNullCanvas.h> +#include <include/utils/SkPaintFilterCanvas.h> +#include <include/utils/SkParse.h> +#include <include/utils/SkParsePath.h> +#include <include/utils/SkRandom.h> +#include <include/utils/SkShadowUtils.h> +#include <include/utils/SkTextUtils.h> +#include <src/codec/SkAndroidCodecAdapter.h> +#include <src/codec/SkBmpBaseCodec.h> +#include <src/codec/SkBmpCodec.h> +#include <src/codec/SkBmpMaskCodec.h> +#include <src/codec/SkBmpRLECodec.h> +#include <src/codec/SkBmpStandardCodec.h> +#include <src/codec/SkCodecImageGenerator.h> +#include <src/codec/SkCodecPriv.h> +#include <src/codec/SkColorTable.h> +#include <src/codec/SkFrameHolder.h> +#include <src/codec/SkIcoCodec.h> +#include <src/codec/SkJpegCodec.h> +#include <src/codec/SkMaskSwizzler.h> +#include <src/codec/SkMasks.h> +#include <src/codec/SkPngCodec.h> +#include <src/codec/SkPngPriv.h> +#include <src/codec/SkRawCodec.h> +#include <src/codec/SkSampledCodec.h> +#include <src/codec/SkSampler.h> +#include <src/codec/SkStreamBuffer.h> +#include <src/codec/SkSwizzler.h> +#include <src/codec/SkWbmpCodec.h> +#include <src/codec/SkWebpCodec.h> +#include <src/core/SkAAClip.h> +#include <src/core/SkATrace.h> +#include <src/core/SkAdvancedTypefaceMetrics.h> +#include <src/core/SkAnalyticEdge.h> +#include <src/core/SkAnnotationKeys.h> +#include <src/core/SkAntiRun.h> +#include <src/core/SkArenaAlloc.h> +#include <src/core/SkAutoBlitterChoose.h> +#include <src/core/SkAutoMalloc.h> +#include <src/core/SkAutoPixmapStorage.h> +#include <src/core/SkBigPicture.h> +#include <src/core/SkBitmapCache.h> +#include <src/core/SkBitmapController.h> +#include <src/core/SkBitmapDevice.h> +#include <src/core/SkBitmapProcState.h> +#include <src/core/SkBlendModePriv.h> +#include <src/core/SkBlitRow.h> +#include <src/core/SkBlitter.h> +#include <src/core/SkBlurMask.h> +#include <src/core/SkBlurPriv.h> +#include <src/core/SkBuffer.h> +#include <src/core/SkCachedData.h> +#include <src/core/SkCanvasPriv.h> +#include <src/core/SkClipOpPriv.h> +#include <src/core/SkClipStack.h> +#include <src/core/SkClipStackDevice.h> +#include <src/core/SkColorFilterBase.h> +#include <src/core/SkColorFilterPriv.h> +#include <src/core/SkColorFilter_Matrix.h> +#include <src/core/SkColorSpacePriv.h> +#include <src/core/SkColorSpaceXformSteps.h> +#include <src/core/SkCompressedDataUtils.h> +#include <src/core/SkConvertPixels.h> +#include <src/core/SkCoreBlitters.h> +#include <src/core/SkCoverageModePriv.h> +#include <src/core/SkCpu.h> +#include <src/core/SkCubicClipper.h> +#include <src/core/SkDeferredDisplayListPriv.h> +#include <src/core/SkDescriptor.h> +#include <src/core/SkDevice.h> +#include <src/core/SkDiscardableMemory.h> +#include <src/core/SkDistanceFieldGen.h> +#include <src/core/SkDraw.h> +#include <src/core/SkDrawProcs.h> +#include <src/core/SkDrawShadowInfo.h> +#include <src/core/SkEdge.h> +#include <src/core/SkEdgeBuilder.h> +#include <src/core/SkEdgeClipper.h> +#include <src/core/SkEffectPriv.h> +#include <src/core/SkEndian.h> +#include <src/core/SkEnumerate.h> +#include <src/core/SkFDot6.h> +#include <src/core/SkFontDescriptor.h> +#include <src/core/SkFontPriv.h> +#include <src/core/SkFontStream.h> +#include <src/core/SkFuzzLogging.h> +#include <src/core/SkGaussFilter.h> +#include <src/core/SkGeometry.h> +#include <src/core/SkGlyph.h> +#include <src/core/SkGlyphBuffer.h> +#include <src/core/SkGlyphRun.h> +#include <src/core/SkGlyphRunPainter.h> +#include <src/core/SkGpuBlurUtils.h> +#include <src/core/SkICCPriv.h> +#include <src/core/SkIPoint16.h> +#include <src/core/SkImageFilterCache.h> +#include <src/core/SkImageFilterTypes.h> +#include <src/core/SkImageFilter_Base.h> +#include <src/core/SkImagePriv.h> +#include <src/core/SkLRUCache.h> +#include <src/core/SkLatticeIter.h> +#include <src/core/SkLeanWindows.h> +#include <src/core/SkLineClipper.h> +#include <src/core/SkLocalMatrixImageFilter.h> +#include <src/core/SkMD5.h> +#include <src/core/SkMSAN.h> +#include <src/core/SkMarkerStack.h> +#include <src/core/SkMask.h> +#include <src/core/SkMaskBlurFilter.h> +#include <src/core/SkMaskCache.h> +#include <src/core/SkMaskFilterBase.h> +#include <src/core/SkMaskGamma.h> +#include <src/core/SkMathPriv.h> +#include <src/core/SkMatrixImageFilter.h> +#include <src/core/SkMatrixPriv.h> +#include <src/core/SkMatrixProvider.h> +#include <src/core/SkMatrixUtils.h> +#include <src/core/SkMessageBus.h> +#include <src/core/SkMiniRecorder.h> +#include <src/core/SkMipMap.h> +#include <src/core/SkModeColorFilter.h> +#include <src/core/SkNextID.h> +#include <src/core/SkOSFile.h> +#include <src/core/SkOpts.h> +#include <src/core/SkPaintDefaults.h> +#include <src/core/SkPaintPriv.h> +#include <src/core/SkPathMakers.h> +#include <src/core/SkPathMeasurePriv.h> +#include <src/core/SkPathPriv.h> +#include <src/core/SkPictureCommon.h> +#include <src/core/SkPictureData.h> +#include <src/core/SkPictureFlat.h> +#include <src/core/SkPicturePlayback.h> +#include <src/core/SkPicturePriv.h> +#include <src/core/SkPictureRecord.h> +#include <src/core/SkPixelRefPriv.h> +#include <src/core/SkPixmapPriv.h> +#include <src/core/SkPointPriv.h> +#include <src/core/SkPtrRecorder.h> +#include <src/core/SkQuadClipper.h> +#include <src/core/SkRRectPriv.h> +#include <src/core/SkRTree.h> +#include <src/core/SkRasterClip.h> +#include <src/core/SkRasterPipeline.h> +#include <src/core/SkReadBuffer.h> +#include <src/core/SkRecord.h> +#include <src/core/SkRecordDraw.h> +#include <src/core/SkRecordOpts.h> +#include <src/core/SkRecordPattern.h> +#include <src/core/SkRecordedDrawable.h> +#include <src/core/SkRecorder.h> +#include <src/core/SkRecords.h> +#include <src/core/SkRectPriv.h> +#include <src/core/SkRegionPriv.h> +#include <src/core/SkRemoteGlyphCache.h> +#include <src/core/SkResourceCache.h> +#include <src/core/SkSafeMath.h> +#include <src/core/SkSafeRange.h> +#include <src/core/SkScaleToSides.h> +#include <src/core/SkScalerCache.h> +#include <src/core/SkScalerContext.h> +#include <src/core/SkScan.h> +#include <src/core/SkScanPriv.h> +#include <src/core/SkScopeExit.h> +#include <src/core/SkSharedMutex.h> +#include <src/core/SkSpan.h> +#include <src/core/SkSpecialImage.h> +#include <src/core/SkSpecialSurface.h> +#include <src/core/SkSpriteBlitter.h> +#include <src/core/SkStreamPriv.h> +#include <src/core/SkStrikeCache.h> +#include <src/core/SkStrikeForGPU.h> +#include <src/core/SkStrikeSpec.h> +#include <src/core/SkStringUtils.h> +#include <src/core/SkStroke.h> +#include <src/core/SkStrokerPriv.h> +#include <src/core/SkSurfacePriv.h> +#include <src/core/SkTDPQueue.h> +#include <src/core/SkTDynamicHash.h> +#include <src/core/SkTInternalLList.h> +#include <src/core/SkTLList.h> +#include <src/core/SkTLazy.h> +#include <src/core/SkTSearch.h> +#include <src/core/SkTSort.h> +#include <src/core/SkTTopoSort.h> +#include <src/core/SkTaskGroup.h> +#include <src/core/SkTextBlobPriv.h> +#include <src/core/SkTextBlobTrace.h> +#include <src/core/SkTextFormatParams.h> +#include <src/core/SkTraceEvent.h> +#include <src/core/SkTraceEventCommon.h> +#include <src/core/SkTypefaceCache.h> +#include <src/core/SkTypeface_remote.h> +#include <src/core/SkUtils.h> +#include <src/core/SkVM.h> +#include <src/core/SkValidationUtils.h> +#include <src/core/SkVertState.h> +#include <src/core/SkVerticesPriv.h> +#include <src/core/SkWriteBuffer.h> +#include <src/core/SkWritePixelsRec.h> +#include <src/core/SkWriter32.h> +#include <src/core/SkXfermodeInterpretation.h> +#include <src/core/SkXfermodePriv.h> +#include <src/core/SkYUVMath.h> +#include <src/core/SkYUVPlanesCache.h> +#include <src/core/SkZip.h> +#include <src/effects/SkDashImpl.h> +#include <src/effects/SkEmbossMask.h> +#include <src/effects/SkEmbossMaskFilter.h> +#include <src/effects/SkOpPE.h> +#include <src/effects/SkPackBits.h> +#include <src/effects/SkTrimPE.h> +#include <src/gpu/GrAHardwareBufferImageGenerator.h> +#include <src/gpu/GrAHardwareBufferUtils.h> +#include <src/gpu/GrAppliedClip.h> +#include <src/gpu/GrAuditTrail.h> +#include <src/gpu/GrAutoLocaleSetter.h> +#include <src/gpu/GrBackendSurfaceMutableStateImpl.h> +#include <src/gpu/GrBackendTextureImageGenerator.h> +#include <src/gpu/GrBackendUtils.h> +#include <src/gpu/GrBaseContextPriv.h> +#include <src/gpu/GrBitmapTextureMaker.h> +#include <src/gpu/GrBlend.h> +#include <src/gpu/GrBlockAllocator.h> +#include <src/gpu/GrBlurUtils.h> +#include <src/gpu/GrBuffer.h> +#include <src/gpu/GrBufferAllocPool.h> +#include <src/gpu/GrCaps.h> +#include <src/gpu/GrClientMappedBufferManager.h> +#include <src/gpu/GrClip.h> +#include <src/gpu/GrClipStackClip.h> +#include <src/gpu/GrColor.h> +#include <src/gpu/GrColorInfo.h> +#include <src/gpu/GrColorSpaceXform.h> +#include <src/gpu/GrContextPriv.h> +#include <src/gpu/GrContextThreadSafeProxyPriv.h> +#include <src/gpu/GrCoordTransform.h> +#include <src/gpu/GrCopyRenderTask.h> +#include <src/gpu/GrCpuBuffer.h> +#include <src/gpu/GrDataUtils.h> +#include <src/gpu/GrDefaultGeoProcFactory.h> +#include <src/gpu/GrDeferredProxyUploader.h> +#include <src/gpu/GrDistanceFieldGenFromVector.h> +#include <src/gpu/GrDrawOpAtlas.h> +#include <src/gpu/GrDrawOpTest.h> +#include <src/gpu/GrDrawingManager.h> +#include <src/gpu/GrDynamicAtlas.h> +#include <src/gpu/GrEagerVertexAllocator.h> +#include <src/gpu/GrFPArgs.h> +#include <src/gpu/GrFinishCallbacks.h> +#include <src/gpu/GrFixedClip.h> +#include <src/gpu/GrFragmentProcessor.h> +#include <src/gpu/GrGeometryProcessor.h> +#include <src/gpu/GrGlyph.h> +#include <src/gpu/GrGpu.h> +#include <src/gpu/GrGpuBuffer.h> +#include <src/gpu/GrGpuResource.h> +#include <src/gpu/GrGpuResourceCacheAccess.h> +#include <src/gpu/GrGpuResourcePriv.h> +#include <src/gpu/GrImageContextPriv.h> +#include <src/gpu/GrImageInfo.h> +#include <src/gpu/GrImageTextureMaker.h> +#include <src/gpu/GrManagedResource.h> +#include <src/gpu/GrMemoryPool.h> +#include <src/gpu/GrNativeRect.h> +#include <src/gpu/GrOnFlushResourceProvider.h> +#include <src/gpu/GrOpFlushState.h> +#include <src/gpu/GrOpsRenderPass.h> +#include <src/gpu/GrOpsTask.h> +#include <src/gpu/GrPaint.h> +#include <src/gpu/GrPath.h> +#include <src/gpu/GrPathProcessor.h> +#include <src/gpu/GrPathRenderer.h> +#include <src/gpu/GrPathRendererChain.h> +#include <src/gpu/GrPathRendering.h> +#include <src/gpu/GrPersistentCacheUtils.h> +#include <src/gpu/GrPipeline.h> +#include <src/gpu/GrPrimitiveProcessor.h> +#include <src/gpu/GrProcessor.h> +#include <src/gpu/GrProcessorAnalysis.h> +#include <src/gpu/GrProcessorSet.h> +#include <src/gpu/GrProcessorUnitTest.h> +#include <src/gpu/GrProgramDesc.h> +#include <src/gpu/GrProgramInfo.h> +#include <src/gpu/GrProxyProvider.h> +#include <src/gpu/GrRecordingContextPriv.h> +#include <src/gpu/GrRectanizerPow2.h> +#include <src/gpu/GrRectanizerSkyline.h> +#include <src/gpu/GrReducedClip.h> +#include <src/gpu/GrRenderTarget.h> +#include <src/gpu/GrRenderTargetContext.h> +#include <src/gpu/GrRenderTargetContextPriv.h> +#include <src/gpu/GrRenderTargetPriv.h> +#include <src/gpu/GrRenderTargetProxy.h> +#include <src/gpu/GrRenderTargetProxyPriv.h> +#include <src/gpu/GrRenderTask.h> +#include <src/gpu/GrResourceAllocator.h> +#include <src/gpu/GrResourceCache.h> +#include <src/gpu/GrResourceProvider.h> +#include <src/gpu/GrResourceProviderPriv.h> +#include <src/gpu/GrRingBuffer.h> +#include <src/gpu/GrSPIRVUniformHandler.h> +#include <src/gpu/GrSPIRVVaryingHandler.h> +#include <src/gpu/GrSWMaskHelper.h> +#include <src/gpu/GrSamplePatternDictionary.h> +#include <src/gpu/GrSamplerState.h> +#include <src/gpu/GrScissorState.h> +#include <src/gpu/GrSemaphore.h> +#include <src/gpu/GrShaderCaps.h> +#include <src/gpu/GrShaderUtils.h> +#include <src/gpu/GrShaderVar.h> +#include <src/gpu/GrSimpleMesh.h> +#include <src/gpu/GrSoftwarePathRenderer.h> +#include <src/gpu/GrStagingBuffer.h> +#include <src/gpu/GrStencilAttachment.h> +#include <src/gpu/GrStencilClip.h> +#include <src/gpu/GrStencilMaskHelper.h> +#include <src/gpu/GrStencilSettings.h> +#include <src/gpu/GrStyle.h> +#include <src/gpu/GrSurface.h> +#include <src/gpu/GrSurfaceContext.h> +#include <src/gpu/GrSurfaceContextPriv.h> +#include <src/gpu/GrSurfacePriv.h> +#include <src/gpu/GrSurfaceProxy.h> +#include <src/gpu/GrSurfaceProxyPriv.h> +#include <src/gpu/GrSurfaceProxyView.h> +#include <src/gpu/GrSwizzle.h> +#include <src/gpu/GrTestUtils.h> +#include <src/gpu/GrTexture.h> +#include <src/gpu/GrTextureAdjuster.h> +#include <src/gpu/GrTextureMaker.h> +#include <src/gpu/GrTexturePriv.h> +#include <src/gpu/GrTextureProducer.h> +#include <src/gpu/GrTextureProxy.h> +#include <src/gpu/GrTextureProxyCacheAccess.h> +#include <src/gpu/GrTextureProxyPriv.h> +#include <src/gpu/GrTextureRenderTargetProxy.h> +#include <src/gpu/GrTextureResolveRenderTask.h> +#include <src/gpu/GrTracing.h> +#include <src/gpu/GrTransferFromRenderTask.h> +#include <src/gpu/GrTriangulator.h> +#include <src/gpu/GrUniformDataManager.h> +#include <src/gpu/GrUserStencilSettings.h> +#include <src/gpu/GrVertexWriter.h> +#include <src/gpu/GrWaitRenderTask.h> +#include <src/gpu/GrWindowRectangles.h> +#include <src/gpu/GrXferProcessor.h> +#include <src/gpu/GrYUVProvider.h> +#include <src/gpu/SkGpuDevice.h> +#include <src/gpu/SkGr.h> +#include <src/gpu/ccpr/GrAutoMapVertexBuffer.h> +#include <src/gpu/ccpr/GrCCAtlas.h> +#include <src/gpu/ccpr/GrCCClipPath.h> +#include <src/gpu/ccpr/GrCCClipProcessor.h> +#include <src/gpu/ccpr/GrCCConicShader.h> +#include <src/gpu/ccpr/GrCCCoverageProcessor.h> +#include <src/gpu/ccpr/GrCCCubicShader.h> +#include <src/gpu/ccpr/GrCCDrawPathsOp.h> +#include <src/gpu/ccpr/GrCCFillGeometry.h> +#include <src/gpu/ccpr/GrCCFiller.h> +#include <src/gpu/ccpr/GrCCPathCache.h> +#include <src/gpu/ccpr/GrCCPathProcessor.h> +#include <src/gpu/ccpr/GrCCPerFlushResources.h> +#include <src/gpu/ccpr/GrCCPerOpsTaskPaths.h> +#include <src/gpu/ccpr/GrCCQuadraticShader.h> +#include <src/gpu/ccpr/GrCCStrokeGeometry.h> +#include <src/gpu/ccpr/GrCCStroker.h> +#include <src/gpu/ccpr/GrCoverageCountingPathRenderer.h> +#include <src/gpu/ccpr/GrGSCoverageProcessor.h> +#include <src/gpu/ccpr/GrOctoBounds.h> +#include <src/gpu/ccpr/GrSampleMaskProcessor.h> +#include <src/gpu/ccpr/GrStencilAtlasOp.h> +#include <src/gpu/ccpr/GrVSCoverageProcessor.h> +#include <src/gpu/effects/GrAtlasedShaderHelpers.h> +#include <src/gpu/effects/GrBezierEffect.h> +#include <src/gpu/effects/GrBicubicEffect.h> +#include <src/gpu/effects/GrBitmapTextGeoProc.h> +#include <src/gpu/effects/GrConvexPolyEffect.h> +#include <src/gpu/effects/GrCoverageSetOpXP.h> +#include <src/gpu/effects/GrCustomXfermode.h> +#include <src/gpu/effects/GrDisableColorXP.h> +#include <src/gpu/effects/GrDistanceFieldGeoProc.h> +#include <src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h> +#include <src/gpu/effects/GrMatrixConvolutionEffect.h> +#include <src/gpu/effects/GrMatrixEffect.h> +#include <src/gpu/effects/GrOvalEffect.h> +#include <src/gpu/effects/GrPorterDuffXferProcessor.h> +#include <src/gpu/effects/GrRRectEffect.h> +#include <src/gpu/effects/GrShadowGeoProc.h> +#include <src/gpu/effects/GrSkSLFP.h> +#include <src/gpu/effects/GrTextureEffect.h> +#include <src/gpu/effects/GrXfermodeFragmentProcessor.h> +#include <src/gpu/effects/GrYUVtoRGBEffect.h> +#include <src/gpu/effects/generated/GrAARectEffect.h> +#include <src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h> +#include <src/gpu/effects/generated/GrBlurredEdgeFragmentProcessor.h> +#include <src/gpu/effects/generated/GrCircleBlurFragmentProcessor.h> +#include <src/gpu/effects/generated/GrCircleEffect.h> +#include <src/gpu/effects/generated/GrClampFragmentProcessor.h> +#include <src/gpu/effects/generated/GrColorMatrixFragmentProcessor.h> +#include <src/gpu/effects/generated/GrComposeLerpEffect.h> +#include <src/gpu/effects/generated/GrConfigConversionEffect.h> +#include <src/gpu/effects/generated/GrConstColorProcessor.h> +#include <src/gpu/effects/generated/GrDeviceSpaceEffect.h> +#include <src/gpu/effects/generated/GrEllipseEffect.h> +#include <src/gpu/effects/generated/GrHSLToRGBFilterEffect.h> +#include <src/gpu/effects/generated/GrLumaColorFilterEffect.h> +#include <src/gpu/effects/generated/GrMagnifierEffect.h> +#include <src/gpu/effects/generated/GrMixerEffect.h> +#include <src/gpu/effects/generated/GrOverrideInputFragmentProcessor.h> +#include <src/gpu/effects/generated/GrRGBToHSLFilterEffect.h> +#include <src/gpu/effects/generated/GrRRectBlurEffect.h> +#include <src/gpu/effects/generated/GrRectBlurEffect.h> +#include <src/gpu/geometry/GrPathUtils.h> +#include <src/gpu/geometry/GrQuad.h> +#include <src/gpu/geometry/GrQuadBuffer.h> +#include <src/gpu/geometry/GrQuadUtils.h> +#include <src/gpu/geometry/GrRect.h> +#include <src/gpu/geometry/GrShape.h> +#include <src/gpu/geometry/GrStyledShape.h> +#include <src/gpu/gl/GrGLGpu.h> +#include <src/gpu/gl/GrGLTexture.h> +#include <src/gpu/gl/GrGLUtil.h> +#include <src/gpu/glsl/GrGLSL.h> +#include <src/gpu/glsl/GrGLSLBlend.h> +#include <src/gpu/glsl/GrGLSLColorSpaceXformHelper.h> +#include <src/gpu/glsl/GrGLSLFragmentProcessor.h> +#include <src/gpu/glsl/GrGLSLFragmentShaderBuilder.h> +#include <src/gpu/glsl/GrGLSLGeometryProcessor.h> +#include <src/gpu/glsl/GrGLSLPrimitiveProcessor.h> +#include <src/gpu/glsl/GrGLSLProgramBuilder.h> +#include <src/gpu/glsl/GrGLSLProgramDataManager.h> +#include <src/gpu/glsl/GrGLSLShaderBuilder.h> +#include <src/gpu/glsl/GrGLSLUniformHandler.h> +#include <src/gpu/glsl/GrGLSLVarying.h> +#include <src/gpu/glsl/GrGLSLVertexGeoBuilder.h> +#include <src/gpu/glsl/GrGLSLXferProcessor.h> +#include <src/gpu/gradients/GrGradientBitmapCache.h> +#include <src/gpu/gradients/GrGradientShader.h> +#include <src/gpu/gradients/generated/GrClampedGradientEffect.h> +#include <src/gpu/gradients/generated/GrDualIntervalGradientColorizer.h> +#include <src/gpu/gradients/generated/GrLinearGradientLayout.h> +#include <src/gpu/gradients/generated/GrRadialGradientLayout.h> +#include <src/gpu/gradients/generated/GrSingleIntervalGradientColorizer.h> +#include <src/gpu/gradients/generated/GrSweepGradientLayout.h> +#include <src/gpu/gradients/generated/GrTextureGradientColorizer.h> +#include <src/gpu/gradients/generated/GrTiledGradientEffect.h> +#include <src/gpu/gradients/generated/GrTwoPointConicalGradientLayout.h> +#include <src/gpu/gradients/generated/GrUnrolledBinaryGradientColorizer.h> +#include <src/gpu/mock/GrMockBuffer.h> +#include <src/gpu/mock/GrMockCaps.h> +#include <src/gpu/mock/GrMockGpu.h> +#include <src/gpu/mock/GrMockOpsRenderPass.h> +#include <src/gpu/mock/GrMockStencilAttachment.h> +#include <src/gpu/mock/GrMockTexture.h> +#include <src/gpu/ops/GrAAConvexPathRenderer.h> +#include <src/gpu/ops/GrAAConvexTessellator.h> +#include <src/gpu/ops/GrAAHairLinePathRenderer.h> +#include <src/gpu/ops/GrAALinearizingConvexPathRenderer.h> +#include <src/gpu/ops/GrAtlasTextOp.h> +#include <src/gpu/ops/GrClearOp.h> +#include <src/gpu/ops/GrDashLinePathRenderer.h> +#include <src/gpu/ops/GrDashOp.h> +#include <src/gpu/ops/GrDefaultPathRenderer.h> +#include <src/gpu/ops/GrDrawAtlasOp.h> +#include <src/gpu/ops/GrDrawOp.h> +#include <src/gpu/ops/GrDrawPathOp.h> +#include <src/gpu/ops/GrDrawVerticesOp.h> +#include <src/gpu/ops/GrDrawableOp.h> +#include <src/gpu/ops/GrFillRRectOp.h> +#include <src/gpu/ops/GrFillRectOp.h> +#include <src/gpu/ops/GrLatticeOp.h> +#include <src/gpu/ops/GrMeshDrawOp.h> +#include <src/gpu/ops/GrOp.h> +#include <src/gpu/ops/GrOvalOpFactory.h> +#include <src/gpu/ops/GrQuadPerEdgeAA.h> +#include <src/gpu/ops/GrRegionOp.h> +#include <src/gpu/ops/GrShadowRRectOp.h> +#include <src/gpu/ops/GrSimpleMeshDrawOpHelper.h> +#include <src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h> +#include <src/gpu/ops/GrSmallPathRenderer.h> +#include <src/gpu/ops/GrStencilAndCoverPathRenderer.h> +#include <src/gpu/ops/GrStencilPathOp.h> +#include <src/gpu/ops/GrStrokeRectOp.h> +#include <src/gpu/ops/GrTextureOp.h> +#include <src/gpu/ops/GrTriangulatingPathRenderer.h> +#include <src/gpu/tessellate/GrDrawAtlasPathOp.h> +#include <src/gpu/tessellate/GrFillPathShader.h> +#include <src/gpu/tessellate/GrMiddleOutPolygonTriangulator.h> +#include <src/gpu/tessellate/GrMidpointContourParser.h> +#include <src/gpu/tessellate/GrResolveLevelCounter.h> +#include <src/gpu/tessellate/GrStencilPathShader.h> +#include <src/gpu/tessellate/GrStrokeGeometry.h> +#include <src/gpu/tessellate/GrTessellatePathOp.h> +#include <src/gpu/tessellate/GrTessellationPathRenderer.h> +#include <src/gpu/tessellate/GrWangsFormula.h> +#include <src/gpu/text/GrAtlasManager.h> +#include <src/gpu/text/GrDistanceFieldAdjustTable.h> +#include <src/gpu/text/GrSDFMaskFilter.h> +#include <src/gpu/text/GrSDFTOptions.h> +#include <src/gpu/text/GrStrikeCache.h> +#include <src/gpu/text/GrTextBlob.h> +#include <src/gpu/text/GrTextBlobCache.h> +#include <src/gpu/text/GrTextTarget.h> +#include <src/gpu/vk/GrVkBuffer.h> +#include <src/gpu/vk/GrVkCaps.h> +#include <src/gpu/vk/GrVkCommandBuffer.h> +#include <src/gpu/vk/GrVkCommandPool.h> +#include <src/gpu/vk/GrVkDescriptorPool.h> +#include <src/gpu/vk/GrVkDescriptorSet.h> +#include <src/gpu/vk/GrVkDescriptorSetManager.h> +#include <src/gpu/vk/GrVkFramebuffer.h> +#include <src/gpu/vk/GrVkGpu.h> +#include <src/gpu/vk/GrVkImage.h> +#include <src/gpu/vk/GrVkImageLayout.h> +#include <src/gpu/vk/GrVkImageView.h> +#include <src/gpu/vk/GrVkInterface.h> +#include <src/gpu/vk/GrVkMemory.h> +#include <src/gpu/vk/GrVkMeshBuffer.h> +#include <src/gpu/vk/GrVkOpsRenderPass.h> +#include <src/gpu/vk/GrVkPipeline.h> +#include <src/gpu/vk/GrVkPipelineState.h> +#include <src/gpu/vk/GrVkPipelineStateBuilder.h> +#include <src/gpu/vk/GrVkPipelineStateDataManager.h> +#include <src/gpu/vk/GrVkRenderPass.h> +#include <src/gpu/vk/GrVkRenderTarget.h> +#include <src/gpu/vk/GrVkResourceProvider.h> +#include <src/gpu/vk/GrVkSampler.h> +#include <src/gpu/vk/GrVkSamplerYcbcrConversion.h> +#include <src/gpu/vk/GrVkSecondaryCBDrawContext.h> +#include <src/gpu/vk/GrVkSemaphore.h> +#include <src/gpu/vk/GrVkStencilAttachment.h> +#include <src/gpu/vk/GrVkTexture.h> +#include <src/gpu/vk/GrVkTextureRenderTarget.h> +#include <src/gpu/vk/GrVkTransferBuffer.h> +#include <src/gpu/vk/GrVkUniformBuffer.h> +#include <src/gpu/vk/GrVkUniformHandler.h> +#include <src/gpu/vk/GrVkUtil.h> +#include <src/gpu/vk/GrVkVaryingHandler.h> +#include <src/image/SkImage_Base.h> +#include <src/image/SkImage_Gpu.h> +#include <src/image/SkImage_GpuBase.h> +#include <src/image/SkImage_GpuYUVA.h> +#include <src/image/SkImage_Lazy.h> +#include <src/image/SkReadPixelsRec.h> +#include <src/image/SkSurface_Base.h> +#include <src/image/SkSurface_Gpu.h> +#include <src/images/SkImageEncoderPriv.h> +#include <src/lazy/SkDiscardableMemoryPool.h> +#include <src/pathops/SkAddIntersections.h> +#include <src/pathops/SkIntersectionHelper.h> +#include <src/pathops/SkIntersections.h> +#include <src/pathops/SkLineParameters.h> +#include <src/pathops/SkOpAngle.h> +#include <src/pathops/SkOpCoincidence.h> +#include <src/pathops/SkOpContour.h> +#include <src/pathops/SkOpEdgeBuilder.h> +#include <src/pathops/SkOpSegment.h> +#include <src/pathops/SkOpSpan.h> +#include <src/pathops/SkPathOpsBounds.h> +#include <src/pathops/SkPathOpsCommon.h> +#include <src/pathops/SkPathOpsConic.h> +#include <src/pathops/SkPathOpsCubic.h> +#include <src/pathops/SkPathOpsCurve.h> +#include <src/pathops/SkPathOpsDebug.h> +#include <src/pathops/SkPathOpsLine.h> +#include <src/pathops/SkPathOpsPoint.h> +#include <src/pathops/SkPathOpsQuad.h> +#include <src/pathops/SkPathOpsRect.h> +#include <src/pathops/SkPathOpsTSect.h> +#include <src/pathops/SkPathOpsTypes.h> +#include <src/pathops/SkPathWriter.h> +#include <src/pathops/SkReduceOrder.h> +#include <src/ports/SkOSLibrary.h> +#include <src/sfnt/SkOTTableTypes.h> +#include <src/sfnt/SkOTTable_OS_2.h> +#include <src/sfnt/SkOTTable_head.h> +#include <src/sfnt/SkOTTable_name.h> +#include <src/sfnt/SkOTUtils.h> +#include <src/shaders/SkBitmapProcShader.h> +#include <src/shaders/SkColorFilterShader.h> +#include <src/shaders/SkColorShader.h> +#include <src/shaders/SkComposeShader.h> +#include <src/shaders/SkEmptyShader.h> +#include <src/shaders/SkImageShader.h> +#include <src/shaders/SkLocalMatrixShader.h> +#include <src/shaders/SkPictureShader.h> +#include <src/shaders/SkShaderBase.h> +#include <src/shaders/gradients/Sk4fGradientBase.h> +#include <src/shaders/gradients/Sk4fLinearGradient.h> +#include <src/shaders/gradients/SkGradientShaderPriv.h> +#include <src/shaders/gradients/SkLinearGradient.h> +#include <src/shaders/gradients/SkRadialGradient.h> +#include <src/shaders/gradients/SkSweepGradient.h> +#include <src/shaders/gradients/SkTwoPointConicalGradient.h> +#include <src/sksl/GLSL.std.450.h> +#include <src/sksl/SkSLASTNode.h> +#include <src/sksl/SkSLByteCode.h> +#include <src/sksl/SkSLByteCodeGenerator.h> +#include <src/sksl/SkSLCFGGenerator.h> +#include <src/sksl/SkSLCPPCodeGenerator.h> +#include <src/sksl/SkSLCPPUniformCTypes.h> +#include <src/sksl/SkSLCompiler.h> +#include <src/sksl/SkSLContext.h> +#include <src/sksl/SkSLGLSLCodeGenerator.h> +#include <src/sksl/SkSLHCodeGenerator.h> +#include <src/sksl/SkSLIRGenerator.h> +#include <src/sksl/SkSLLexer.h> +#include <src/sksl/SkSLMetalCodeGenerator.h> +#include <src/sksl/SkSLOutputStream.h> +#include <src/sksl/SkSLParser.h> +#include <src/sksl/SkSLPipelineStageCodeGenerator.h> +#include <src/sksl/SkSLSPIRVCodeGenerator.h> +#include <src/sksl/SkSLSPIRVtoHLSL.h> +#include <src/sksl/SkSLSampleMatrix.h> +#include <src/sksl/SkSLSectionAndParameterHelper.h> +#include <src/sksl/SkSLString.h> +#include <src/sksl/SkSLStringStream.h> +#include <src/sksl/SkSLUtil.h> +#include <src/sksl/ir/SkSLBinaryExpression.h> +#include <src/sksl/ir/SkSLBoolLiteral.h> +#include <src/sksl/ir/SkSLBreakStatement.h> +#include <src/sksl/ir/SkSLConstructor.h> +#include <src/sksl/ir/SkSLContinueStatement.h> +#include <src/sksl/ir/SkSLDiscardStatement.h> +#include <src/sksl/ir/SkSLDoStatement.h> +#include <src/sksl/ir/SkSLEnum.h> +#include <src/sksl/ir/SkSLExpression.h> +#include <src/sksl/ir/SkSLExpressionStatement.h> +#include <src/sksl/ir/SkSLExtension.h> +#include <src/sksl/ir/SkSLExternalFunctionCall.h> +#include <src/sksl/ir/SkSLExternalValueReference.h> +#include <src/sksl/ir/SkSLField.h> +#include <src/sksl/ir/SkSLFieldAccess.h> +#include <src/sksl/ir/SkSLFloatLiteral.h> +#include <src/sksl/ir/SkSLForStatement.h> +#include <src/sksl/ir/SkSLFunctionCall.h> +#include <src/sksl/ir/SkSLFunctionDeclaration.h> +#include <src/sksl/ir/SkSLFunctionDefinition.h> +#include <src/sksl/ir/SkSLFunctionReference.h> +#include <src/sksl/ir/SkSLIfStatement.h> +#include <src/sksl/ir/SkSLIndexExpression.h> +#include <src/sksl/ir/SkSLIntLiteral.h> +#include <src/sksl/ir/SkSLInterfaceBlock.h> +#include <src/sksl/ir/SkSLLayout.h> +#include <src/sksl/ir/SkSLModifiers.h> +#include <src/sksl/ir/SkSLModifiersDeclaration.h> +#include <src/sksl/ir/SkSLNop.h> +#include <src/sksl/ir/SkSLNullLiteral.h> +#include <src/sksl/ir/SkSLPostfixExpression.h> +#include <src/sksl/ir/SkSLPrefixExpression.h> +#include <src/sksl/ir/SkSLProgram.h> +#include <src/sksl/ir/SkSLReturnStatement.h> +#include <src/sksl/ir/SkSLSection.h> +#include <src/sksl/ir/SkSLSetting.h> +#include <src/sksl/ir/SkSLSwitchCase.h> +#include <src/sksl/ir/SkSLSwitchStatement.h> +#include <src/sksl/ir/SkSLSwizzle.h> +#include <src/sksl/ir/SkSLSymbolTable.h> +#include <src/sksl/ir/SkSLTernaryExpression.h> +#include <src/sksl/ir/SkSLType.h> +#include <src/sksl/ir/SkSLUnresolvedFunction.h> +#include <src/sksl/ir/SkSLVarDeclarations.h> +#include <src/sksl/ir/SkSLVarDeclarationsStatement.h> +#include <src/sksl/ir/SkSLVariable.h> +#include <src/sksl/ir/SkSLVariableReference.h> +#include <src/sksl/ir/SkSLWhileStatement.h> +#include <src/utils/SkCanvasStack.h> +#include <src/utils/SkCharToGlyphCache.h> +#include <src/utils/SkDashPathPriv.h> +#include <src/utils/SkFloatToDecimal.h> +#include <src/utils/SkJSON.h> +#include <src/utils/SkJSONWriter.h> +#include <src/utils/SkMatrix22.h> +#include <src/utils/SkMultiPictureDocument.h> +#include <src/utils/SkMultiPictureDocumentPriv.h> +#include <src/utils/SkOSPath.h> +#include <src/utils/SkPatchUtils.h> +#include <src/utils/SkPolyUtils.h> +#include <src/utils/SkShadowTessellator.h> +#include <src/utils/SkShaperJSONWriter.h> +#include <src/utils/SkUTF.h> +#include <tools/gpu/vk/GrVulkanDefines.h> +#include <tools/gpu/vk/VkTestUtils.h> +#include <tools/sk_app/VulkanWindowContext.h> +#include <vulkan/vulkan_core.h> +#include <skia_compiler.hxx> +// PCH_LEVEL >= 4 +// PCH_LEVEL >= 5 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/skia/inc/skia_compiler.hxx b/external/skia/inc/skia_compiler.hxx new file mode 100644 index 000000000..a26ec29bd --- /dev/null +++ b/external/skia/inc/skia_compiler.hxx @@ -0,0 +1,13 @@ +/* + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef SKIA_COMPILER_H +#define SKIA_COMPILER_H + +#include <include/core/SkTypes.h> + +SK_API const char* skia_compiler_name(); + +#endif diff --git a/external/skia/lerp.patch b/external/skia/lerp.patch new file mode 100644 index 000000000..2062c21f2 --- /dev/null +++ b/external/skia/lerp.patch @@ -0,0 +1,12 @@ +diff --git a/src/shaders/SkPerlinNoiseShader.cpp b/src/shaders/SkPerlinNoiseShader.cpp +index 812dc1694f..60b8d617c6 100644 +--- a/src/shaders/SkPerlinNoiseShader.cpp ++++ b/src/shaders/SkPerlinNoiseShader.cpp +@@ -573,6 +573,7 @@ static SkScalar fade(SkScalar t) { + return t * t * t * (t * (t * 6 - 15) + 10); + } + ++#define lerp skia_lerp + static SkScalar lerp(SkScalar t, SkScalar a, SkScalar b) { + return a + t * (b - a); + } diff --git a/external/skia/libvulkan-name.patch.1 b/external/skia/libvulkan-name.patch.1 new file mode 100644 index 000000000..265d8daa1 --- /dev/null +++ b/external/skia/libvulkan-name.patch.1 @@ -0,0 +1,13 @@ +diff --git a/tools/gpu/vk/VkTestUtils.cpp b/tools/gpu/vk/VkTestUtils.cpp +index 5b7e8c29ae..1580136b5c 100644 +--- a/tools/gpu/vk/VkTestUtils.cpp ++++ b/tools/gpu/vk/VkTestUtils.cpp +@@ -13,7 +13,7 @@ + #if defined _WIN32 + #define SK_GPU_TOOLS_VK_LIBRARY_NAME "vulkan-1.dll" + #else +- #define SK_GPU_TOOLS_VK_LIBRARY_NAME "libvulkan.so" ++ #define SK_GPU_TOOLS_VK_LIBRARY_NAME "libvulkan.so.1" + #endif + #endif + diff --git a/external/skia/make-api-visible.patch.1 b/external/skia/make-api-visible.patch.1 new file mode 100644 index 000000000..bb574b762 --- /dev/null +++ b/external/skia/make-api-visible.patch.1 @@ -0,0 +1,56 @@ +diff --git a/tools/sk_app/unix/WindowContextFactory_unix.h b/tools/sk_app/unix/WindowContextFactory_unix.h +index 11bd2d2ac2..09c92dc417 100644 +--- a/tools/sk_app/unix/WindowContextFactory_unix.h ++++ b/tools/sk_app/unix/WindowContextFactory_unix.h +@@ -36,15 +36,15 @@ struct XlibWindowInfo { + int fHeight; + }; + +-std::unique_ptr<WindowContext> MakeVulkanForXlib(const XlibWindowInfo&, const DisplayParams&); ++SK_API std::unique_ptr<WindowContext> MakeVulkanForXlib(const XlibWindowInfo&, const DisplayParams&); + +-std::unique_ptr<WindowContext> MakeGLForXlib(const XlibWindowInfo&, const DisplayParams&); ++SK_API std::unique_ptr<WindowContext> MakeGLForXlib(const XlibWindowInfo&, const DisplayParams&); + + #ifdef SK_DAWN +-std::unique_ptr<WindowContext> MakeDawnVulkanForXlib(const XlibWindowInfo&, const DisplayParams&); ++SK_API std::unique_ptr<WindowContext> MakeDawnVulkanForXlib(const XlibWindowInfo&, const DisplayParams&); + #endif + +-std::unique_ptr<WindowContext> MakeRasterForXlib(const XlibWindowInfo&, const DisplayParams&); ++SK_API std::unique_ptr<WindowContext> MakeRasterForXlib(const XlibWindowInfo&, const DisplayParams&); + + } // namespace window_context_factory + +diff --git a/tools/sk_app/win/WindowContextFactory_win.h b/tools/sk_app/win/WindowContextFactory_win.h +index c05a4f0acf..fc27cd2afb 100644 +--- a/tools/sk_app/win/WindowContextFactory_win.h ++++ b/tools/sk_app/win/WindowContextFactory_win.h +@@ -20,21 +20,21 @@ struct DisplayParams; + + namespace window_context_factory { + +-std::unique_ptr<WindowContext> MakeVulkanForWin(HWND, const DisplayParams&); ++SK_API std::unique_ptr<WindowContext> MakeVulkanForWin(HWND, const DisplayParams&); + +-std::unique_ptr<WindowContext> MakeGLForWin(HWND, const DisplayParams&); ++SK_API std::unique_ptr<WindowContext> MakeGLForWin(HWND, const DisplayParams&); + +-std::unique_ptr<WindowContext> MakeANGLEForWin(HWND, const DisplayParams&); ++SK_API std::unique_ptr<WindowContext> MakeANGLEForWin(HWND, const DisplayParams&); + + #ifdef SK_DIRECT3D +-std::unique_ptr<WindowContext> MakeD3D12ForWin(HWND, const DisplayParams&); ++SK_API std::unique_ptr<WindowContext> MakeD3D12ForWin(HWND, const DisplayParams&); + #endif + + #ifdef SK_DAWN +-std::unique_ptr<WindowContext> MakeDawnD3D12ForWin(HWND, const DisplayParams&); ++SK_API std::unique_ptr<WindowContext> MakeDawnD3D12ForWin(HWND, const DisplayParams&); + #endif + +-std::unique_ptr<WindowContext> MakeRasterForWin(HWND, const DisplayParams&); ++SK_API std::unique_ptr<WindowContext> MakeRasterForWin(HWND, const DisplayParams&); + + } // namespace window_context_factory + diff --git a/external/skia/no-trace-resources-on-exit.patch.1 b/external/skia/no-trace-resources-on-exit.patch.1 new file mode 100644 index 000000000..5b8607d55 --- /dev/null +++ b/external/skia/no-trace-resources-on-exit.patch.1 @@ -0,0 +1,26 @@ +diff --git a/src/gpu/vk/GrVkCommandPool.h b/src/gpu/vk/GrVkCommandPool.h +index fd44d62e94..f9e90f185f 100644 +--- a/src/gpu/vk/GrVkCommandPool.h ++++ b/src/gpu/vk/GrVkCommandPool.h +@@ -41,7 +41,7 @@ public: + // returns true if close() has not been called + bool isOpen() const { return fOpen; } + +-#ifdef SK_DEBUG ++#ifdef SK_TRACE_MANAGED_RESOURCES + void dumpInfo() const override { + SkDebugf("GrVkCommandPool: %p (%d refs)\n", fCommandPool, this->getRefCnt()); + } +diff --git a/src/gpu/vk/GrVkResource.h b/src/gpu/vk/GrVkResource.h +index 7b9949ba1b..4e8fb48c7c 100644 +--- a/src/gpu/GrManagedResource.h ++++ b/src/gpu/GrManagedResource.h +@@ -17,7 +17,7 @@ class GrVkGpu; + + // uncomment to enable tracing of resource refs + #ifdef SK_DEBUG +-#define SK_TRACE_MANAGED_RESOURCES ++//#define SK_TRACE_MANAGED_RESOURCES + #endif + + /** \class GrManagedResource diff --git a/external/skia/operator-eq-bool.patch.1 b/external/skia/operator-eq-bool.patch.1 new file mode 100644 index 000000000..d6dc3c139 --- /dev/null +++ b/external/skia/operator-eq-bool.patch.1 @@ -0,0 +1,25 @@ +diff --git a/src/core/SkVM.cpp b/src/core/SkVM.cpp +index 654ab8f97c..e7b3137d8e 100644 +--- a/src/core/SkVM.cpp ++++ b/src/core/SkVM.cpp +@@ -1173,7 +1173,7 @@ namespace skvm { + // Map min channel to 0, max channel to s, and scale the middle proportionally. + auto scale = [&](auto c) { + // TODO: better to divide and check for non-finite result? +- return select(sat == 0.0f, 0.0f ++ return select(eq_op(0.0f, sat), 0.0f + , ((c - mn) * s) / sat); + }; + *r = scale(*r); +diff --git a/src/core/SkVM.h b/src/core/SkVM.h +index db5b273c45..5cf1ebba3c 100644 +--- a/src/core/SkVM.h ++++ b/src/core/SkVM.h +@@ -882,6 +882,7 @@ namespace skvm { + static inline I32 operator==(I32 x, I32 y) { return x->eq(x,y); } + static inline I32 operator==(I32 x, int y) { return x->eq(x,y); } + static inline I32 operator==(int x, I32 y) { return y->eq(x,y); } ++ static inline I32 eq_op(float x, F32 y) { return y->eq(x,y); } + + static inline I32 operator!=(I32 x, I32 y) { return x->neq(x,y); } + static inline I32 operator!=(I32 x, int y) { return x->neq(x,y); } diff --git a/external/skia/public-make-from-backend-texture.patch.1 b/external/skia/public-make-from-backend-texture.patch.1 new file mode 100644 index 000000000..7543ff816 --- /dev/null +++ b/external/skia/public-make-from-backend-texture.patch.1 @@ -0,0 +1,44 @@ +diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h +index bf151c05de..95e84022d4 100644 +--- a/include/core/SkSurface.h ++++ b/include/core/SkSurface.h +@@ -243,7 +243,7 @@ public: + RenderTargetReleaseProc releaseProc = nullptr, + ReleaseContext releaseContext = nullptr); + +-#if GR_TEST_UTILS ++//#if GR_TEST_UTILS + // TODO: Remove this. + static sk_sp<SkSurface> MakeFromBackendTextureAsRenderTarget(GrContext* context, + const GrBackendTexture& backendTexture, +@@ -252,7 +252,7 @@ public: + SkColorType colorType, + sk_sp<SkColorSpace> colorSpace, + const SkSurfaceProps* surfaceProps); +-#endif ++//#endif + + #if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26 + /** Private. +diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp +index 87c7a81b16..1842487030 100644 +--- a/src/image/SkSurface_Gpu.cpp ++++ b/src/image/SkSurface_Gpu.cpp +@@ -666,7 +666,7 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext* context, + return sk_make_sp<SkSurface_Gpu>(std::move(device)); + } + +-#if GR_TEST_UTILS ++//#if GR_TEST_UTILS + sk_sp<SkSurface> SkSurface::MakeFromBackendTextureAsRenderTarget(GrContext* context, + const GrBackendTexture& tex, + GrSurfaceOrigin origin, +@@ -700,7 +700,7 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendTextureAsRenderTarget(GrContext* cont + } + return sk_make_sp<SkSurface_Gpu>(std::move(device)); + } +-#endif ++//#endif + + #if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26 + sk_sp<SkSurface> SkSurface::MakeFromAHardwareBuffer(GrContext* context, diff --git a/external/skia/share-grcontext.patch.1 b/external/skia/share-grcontext.patch.1 new file mode 100644 index 000000000..1c7da21d6 --- /dev/null +++ b/external/skia/share-grcontext.patch.1 @@ -0,0 +1,591 @@ +diff --git a/tools/sk_app/VulkanWindowContext.cpp b/tools/sk_app/VulkanWindowContext.cpp +index 970c67ec0c..371bd8ab0c 100644 +--- a/tools/sk_app/VulkanWindowContext.cpp ++++ b/tools/sk_app/VulkanWindowContext.cpp +@@ -24,8 +24,10 @@ + #undef CreateSemaphore + #endif + +-#define GET_PROC(F) f ## F = (PFN_vk ## F) fGetInstanceProcAddr(fInstance, "vk" #F) +-#define GET_DEV_PROC(F) f ## F = (PFN_vk ## F) fGetDeviceProcAddr(fDevice, "vk" #F) ++#define GET_PROC(F) f ## F = (PFN_vk ## F) fGetInstanceProcAddr(fShared->fInstance, "vk" #F) ++#define GET_DEV_PROC(F) f ## F = (PFN_vk ## F) fGetDeviceProcAddr(fShared->fDevice, "vk" #F) ++#define GET_PROC_GLOBAL(F) fGlobalShared->f ## F = (PFN_vk ## F) fGetInstanceProcAddr(fGlobalShared->fInstance, "vk" #F) ++#define GET_DEV_PROC_GLOBAL(F) fGlobalShared->f ## F = (PFN_vk ## F) fGetDeviceProcAddr(fGlobalShared->fDevice, "vk" #F) + + namespace sk_app { + +@@ -49,6 +51,14 @@ VulkanWindowContext::VulkanWindowContext(const DisplayParams& params, + } + + void VulkanWindowContext::initializeContext() { ++ fShared = fGlobalShared; ++ if( !fShared ) ++ { ++ // TODO do we need a mutex? ++ ++ fGlobalShared = sk_make_sp<Shared>(); ++ Shared* d = fGlobalShared.get(); // shorter variable name ++ + // any config code here (particularly for msaa)? + + PFN_vkGetInstanceProcAddr getInstanceProc = fGetInstanceProcAddr; +@@ -62,24 +72,25 @@ void VulkanWindowContext::initializeContext() { + }; + GrVkBackendContext backendContext; + GrVkExtensions extensions; +- VkPhysicalDeviceFeatures2 features; +- if (!sk_gpu_test::CreateVkBackendContext(getProc, &backendContext, &extensions, &features, +- &fDebugCallback, &fPresentQueueIndex, fCanPresentFn)) { +- sk_gpu_test::FreeVulkanFeaturesStructs(&features); ++ if (!sk_gpu_test::CreateVkBackendContext(getProc, &backendContext, &extensions, &d->features, ++ &d->fDebugCallback, &d->fPresentQueueIndex, fCanPresentFn)) { ++ sk_gpu_test::FreeVulkanFeaturesStructs(&d->features); ++ fGlobalShared.reset(); + return; + } + + if (!extensions.hasExtension(VK_KHR_SURFACE_EXTENSION_NAME, 25) || + !extensions.hasExtension(VK_KHR_SWAPCHAIN_EXTENSION_NAME, 68)) { +- sk_gpu_test::FreeVulkanFeaturesStructs(&features); ++ sk_gpu_test::FreeVulkanFeaturesStructs(&d->features); ++ fGlobalShared.reset(); + return; + } + +- fInstance = backendContext.fInstance; +- fPhysicalDevice = backendContext.fPhysicalDevice; +- fDevice = backendContext.fDevice; +- fGraphicsQueueIndex = backendContext.fGraphicsQueueIndex; +- fGraphicsQueue = backendContext.fQueue; ++ d->fInstance = backendContext.fInstance; ++ d->fPhysicalDevice = backendContext.fPhysicalDevice; ++ d->fDevice = backendContext.fDevice; ++ d->fGraphicsQueueIndex = backendContext.fGraphicsQueueIndex; ++ d->fGraphicsQueue = backendContext.fQueue; + + PFN_vkGetPhysicalDeviceProperties localGetPhysicalDeviceProperties = + reinterpret_cast<PFN_vkGetPhysicalDeviceProperties>( +@@ -87,21 +98,30 @@ void VulkanWindowContext::initializeContext() { + backendContext.fInstance, + VK_NULL_HANDLE)); + if (!localGetPhysicalDeviceProperties) { +- sk_gpu_test::FreeVulkanFeaturesStructs(&features); ++ sk_gpu_test::FreeVulkanFeaturesStructs(&d->features); ++ fGlobalShared.reset(); + return; + } +- VkPhysicalDeviceProperties physDeviceProperties; +- localGetPhysicalDeviceProperties(backendContext.fPhysicalDevice, &physDeviceProperties); +- uint32_t physDevVersion = physDeviceProperties.apiVersion; ++ localGetPhysicalDeviceProperties(backendContext.fPhysicalDevice, &d->physDeviceProperties); ++ uint32_t physDevVersion = d->physDeviceProperties.apiVersion; + +- fInterface.reset(new GrVkInterface(backendContext.fGetProc, fInstance, fDevice, ++ d->fInterface.reset(new GrVkInterface(backendContext.fGetProc, d->fInstance, d->fDevice, + backendContext.fInstanceVersion, physDevVersion, + &extensions)); + +- GET_PROC(DestroyInstance); +- if (fDebugCallback != VK_NULL_HANDLE) { +- GET_PROC(DestroyDebugReportCallbackEXT); ++ d->fContext = GrContext::MakeVulkan(backendContext, fDisplayParams.fGrContextOptions); ++ ++ GET_PROC_GLOBAL(DestroyInstance); ++ GET_DEV_PROC_GLOBAL(DestroyDevice); ++ if (fGlobalShared->fDebugCallback != VK_NULL_HANDLE) { ++ GET_PROC_GLOBAL(DestroyDebugReportCallbackEXT); + } ++ ++ fShared = fGlobalShared; ++ } // if( !fShared ) ++ ++ fContext = fShared->fContext; ++ + GET_PROC(DestroySurfaceKHR); + GET_PROC(GetPhysicalDeviceSurfaceSupportKHR); + GET_PROC(GetPhysicalDeviceSurfaceCapabilitiesKHR); +@@ -109,7 +129,6 @@ void VulkanWindowContext::initializeContext() { + GET_PROC(GetPhysicalDeviceSurfacePresentModesKHR); + GET_DEV_PROC(DeviceWaitIdle); + GET_DEV_PROC(QueueWaitIdle); +- GET_DEV_PROC(DestroyDevice); + GET_DEV_PROC(CreateSwapchainKHR); + GET_DEV_PROC(DestroySwapchainKHR); + GET_DEV_PROC(GetSwapchainImagesKHR); +@@ -117,46 +136,44 @@ void VulkanWindowContext::initializeContext() { + GET_DEV_PROC(QueuePresentKHR); + GET_DEV_PROC(GetDeviceQueue); + +- fContext = GrContext::MakeVulkan(backendContext, fDisplayParams.fGrContextOptions); ++ // No actual window, used just to create the shared GrContext. ++ if(fCreateVkSurfaceFn == nullptr) ++ return; + +- fSurface = fCreateVkSurfaceFn(fInstance); ++ fSurface = fCreateVkSurfaceFn(fShared->fInstance); + if (VK_NULL_HANDLE == fSurface) { + this->destroyContext(); +- sk_gpu_test::FreeVulkanFeaturesStructs(&features); + return; + } + ++ // create presentQueue ++ fGetDeviceQueue(fShared->fDevice, fShared->fPresentQueueIndex, 0, &fPresentQueue); ++ + VkBool32 supported; +- VkResult res = fGetPhysicalDeviceSurfaceSupportKHR(fPhysicalDevice, fPresentQueueIndex, ++ VkResult res = fGetPhysicalDeviceSurfaceSupportKHR(fShared->fPhysicalDevice, fShared->fPresentQueueIndex, + fSurface, &supported); + if (VK_SUCCESS != res) { + this->destroyContext(); +- sk_gpu_test::FreeVulkanFeaturesStructs(&features); + return; + } + + if (!this->createSwapchain(-1, -1, fDisplayParams)) { + this->destroyContext(); +- sk_gpu_test::FreeVulkanFeaturesStructs(&features); + return; + } +- +- // create presentQueue +- fGetDeviceQueue(fDevice, fPresentQueueIndex, 0, &fPresentQueue); +- sk_gpu_test::FreeVulkanFeaturesStructs(&features); + } + + bool VulkanWindowContext::createSwapchain(int width, int height, + const DisplayParams& params) { + // check for capabilities + VkSurfaceCapabilitiesKHR caps; +- VkResult res = fGetPhysicalDeviceSurfaceCapabilitiesKHR(fPhysicalDevice, fSurface, &caps); ++ VkResult res = fGetPhysicalDeviceSurfaceCapabilitiesKHR(fShared->fPhysicalDevice, fSurface, &caps); + if (VK_SUCCESS != res) { + return false; + } + + uint32_t surfaceFormatCount; +- res = fGetPhysicalDeviceSurfaceFormatsKHR(fPhysicalDevice, fSurface, &surfaceFormatCount, ++ res = fGetPhysicalDeviceSurfaceFormatsKHR(fShared->fPhysicalDevice, fSurface, &surfaceFormatCount, + nullptr); + if (VK_SUCCESS != res) { + return false; +@@ -164,14 +181,14 @@ bool VulkanWindowContext::createSwapchain(int width, int height, + + SkAutoMalloc surfaceFormatAlloc(surfaceFormatCount * sizeof(VkSurfaceFormatKHR)); + VkSurfaceFormatKHR* surfaceFormats = (VkSurfaceFormatKHR*)surfaceFormatAlloc.get(); +- res = fGetPhysicalDeviceSurfaceFormatsKHR(fPhysicalDevice, fSurface, &surfaceFormatCount, ++ res = fGetPhysicalDeviceSurfaceFormatsKHR(fShared->fPhysicalDevice, fSurface, &surfaceFormatCount, + surfaceFormats); + if (VK_SUCCESS != res) { + return false; + } + + uint32_t presentModeCount; +- res = fGetPhysicalDeviceSurfacePresentModesKHR(fPhysicalDevice, fSurface, &presentModeCount, ++ res = fGetPhysicalDeviceSurfacePresentModesKHR(fShared->fPhysicalDevice, fSurface, &presentModeCount, + nullptr); + if (VK_SUCCESS != res) { + return false; +@@ -179,7 +196,7 @@ bool VulkanWindowContext::createSwapchain(int width, int height, + + SkAutoMalloc presentModeAlloc(presentModeCount * sizeof(VkPresentModeKHR)); + VkPresentModeKHR* presentModes = (VkPresentModeKHR*)presentModeAlloc.get(); +- res = fGetPhysicalDeviceSurfacePresentModesKHR(fPhysicalDevice, fSurface, &presentModeCount, ++ res = fGetPhysicalDeviceSurfacePresentModesKHR(fShared->fPhysicalDevice, fSurface, &presentModeCount, + presentModes); + if (VK_SUCCESS != res) { + return false; +@@ -286,8 +303,8 @@ bool VulkanWindowContext::createSwapchain(int width, int height, + swapchainCreateInfo.imageArrayLayers = 1; + swapchainCreateInfo.imageUsage = usageFlags; + +- uint32_t queueFamilies[] = { fGraphicsQueueIndex, fPresentQueueIndex }; +- if (fGraphicsQueueIndex != fPresentQueueIndex) { ++ uint32_t queueFamilies[] = { fShared->fGraphicsQueueIndex, fShared->fPresentQueueIndex }; ++ if (fShared->fGraphicsQueueIndex != fShared->fPresentQueueIndex) { + swapchainCreateInfo.imageSharingMode = VK_SHARING_MODE_CONCURRENT; + swapchainCreateInfo.queueFamilyIndexCount = 2; + swapchainCreateInfo.pQueueFamilyIndices = queueFamilies; +@@ -303,18 +320,18 @@ bool VulkanWindowContext::createSwapchain(int width, int height, + swapchainCreateInfo.clipped = true; + swapchainCreateInfo.oldSwapchain = fSwapchain; + +- res = fCreateSwapchainKHR(fDevice, &swapchainCreateInfo, nullptr, &fSwapchain); ++ res = fCreateSwapchainKHR(fShared->fDevice, &swapchainCreateInfo, nullptr, &fSwapchain); + if (VK_SUCCESS != res) { + return false; + } + + // destroy the old swapchain + if (swapchainCreateInfo.oldSwapchain != VK_NULL_HANDLE) { +- fDeviceWaitIdle(fDevice); ++ fDeviceWaitIdle(fShared->fDevice); + + this->destroyBuffers(); + +- fDestroySwapchainKHR(fDevice, swapchainCreateInfo.oldSwapchain, nullptr); ++ fDestroySwapchainKHR(fShared->fDevice, swapchainCreateInfo.oldSwapchain, nullptr); + } + + this->createBuffers(swapchainCreateInfo.imageFormat, colorType, +@@ -325,10 +342,10 @@ bool VulkanWindowContext::createSwapchain(int width, int height, + + void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType, + VkSharingMode sharingMode) { +- fGetSwapchainImagesKHR(fDevice, fSwapchain, &fImageCount, nullptr); ++ fGetSwapchainImagesKHR(fShared->fDevice, fSwapchain, &fImageCount, nullptr); + SkASSERT(fImageCount); + fImages = new VkImage[fImageCount]; +- fGetSwapchainImagesKHR(fDevice, fSwapchain, &fImageCount, fImages); ++ fGetSwapchainImagesKHR(fShared->fDevice, fSwapchain, &fImageCount, fImages); + + // set up initial image layouts and create surfaces + fImageLayouts = new VkImageLayout[fImageCount]; +@@ -343,7 +360,7 @@ void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType, + info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; + info.fFormat = format; + info.fLevelCount = 1; +- info.fCurrentQueueFamily = fPresentQueueIndex; ++ info.fCurrentQueueFamily = fShared->fPresentQueueIndex; + info.fSharingMode = sharingMode; + + if (fSampleCount == 1) { +@@ -375,8 +392,8 @@ void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType, + fBackbuffers = new BackbufferInfo[fImageCount + 1]; + for (uint32_t i = 0; i < fImageCount + 1; ++i) { + fBackbuffers[i].fImageIndex = -1; +- SkDEBUGCODE(VkResult result = )GR_VK_CALL(fInterface, +- CreateSemaphore(fDevice, &semaphoreInfo, nullptr, ++ SkDEBUGCODE(VkResult result = )GR_VK_CALL(fShared->fInterface, ++ CreateSemaphore(fShared->fDevice, &semaphoreInfo, nullptr, + &fBackbuffers[i].fRenderSemaphore)); + SkASSERT(result == VK_SUCCESS); + } +@@ -388,8 +405,8 @@ void VulkanWindowContext::destroyBuffers() { + if (fBackbuffers) { + for (uint32_t i = 0; i < fImageCount + 1; ++i) { + fBackbuffers[i].fImageIndex = -1; +- GR_VK_CALL(fInterface, +- DestroySemaphore(fDevice, ++ GR_VK_CALL(fShared->fInterface, ++ DestroySemaphore(fShared->fDevice, + fBackbuffers[i].fRenderSemaphore, + nullptr)); + } +@@ -414,41 +431,59 @@ VulkanWindowContext::~VulkanWindowContext() { + void VulkanWindowContext::destroyContext() { + if (this->isValid()) { + fQueueWaitIdle(fPresentQueue); +- fDeviceWaitIdle(fDevice); ++ fDeviceWaitIdle(fShared->fDevice); + + this->destroyBuffers(); + + if (VK_NULL_HANDLE != fSwapchain) { +- fDestroySwapchainKHR(fDevice, fSwapchain, nullptr); ++ fDestroySwapchainKHR(fShared->fDevice, fSwapchain, nullptr); + fSwapchain = VK_NULL_HANDLE; + } + + if (VK_NULL_HANDLE != fSurface) { +- fDestroySurfaceKHR(fInstance, fSurface, nullptr); ++ fDestroySurfaceKHR(fShared->fInstance, fSurface, nullptr); + fSurface = VK_NULL_HANDLE; + } + } + + fContext.reset(); +- fInterface.reset(); ++ fShared.reset(); ++ ++ checkDestroyShared(); ++} ++ ++void VulkanWindowContext::checkDestroyShared() ++{ ++ if(!fGlobalShared || !fGlobalShared->unique()) // TODO mutex? ++ return; ++#ifndef SK_TRACE_VK_RESOURCES ++ if(!fGlobalShared->fContext->unique()) ++ return; ++#endif ++ SkASSERT(fGlobalShared->fContext->unique()); ++ fGlobalShared->fContext.reset(); ++ fGlobalShared->fInterface.reset(); + +- if (VK_NULL_HANDLE != fDevice) { +- fDestroyDevice(fDevice, nullptr); +- fDevice = VK_NULL_HANDLE; ++ if (VK_NULL_HANDLE != fGlobalShared->fDevice) { ++ fGlobalShared->fDestroyDevice(fGlobalShared->fDevice, nullptr); ++ fGlobalShared->fDevice = VK_NULL_HANDLE; + } + + #ifdef SK_ENABLE_VK_LAYERS +- if (fDebugCallback != VK_NULL_HANDLE) { +- fDestroyDebugReportCallbackEXT(fInstance, fDebugCallback, nullptr); ++ if (fGlobalShared->fDebugCallback != VK_NULL_HANDLE) { ++ fGlobalShared->fDestroyDebugReportCallbackEXT(fGlobalShared->fInstance, fDebugCallback, nullptr); + } + #endif + +- fPhysicalDevice = VK_NULL_HANDLE; ++ fGlobalShared->fPhysicalDevice = VK_NULL_HANDLE; + +- if (VK_NULL_HANDLE != fInstance) { +- fDestroyInstance(fInstance, nullptr); +- fInstance = VK_NULL_HANDLE; ++ if (VK_NULL_HANDLE != fGlobalShared->fInstance) { ++ fGlobalShared->fDestroyInstance(fGlobalShared->fInstance, nullptr); ++ fGlobalShared->fInstance = VK_NULL_HANDLE; + } ++ ++ sk_gpu_test::FreeVulkanFeaturesStructs(&fGlobalShared->features); ++ fGlobalShared.reset(); + } + + VulkanWindowContext::BackbufferInfo* VulkanWindowContext::getAvailableBackbuffer() { +@@ -474,35 +509,35 @@ sk_sp<SkSurface> VulkanWindowContext::getBackbufferSurface() { + semaphoreInfo.pNext = nullptr; + semaphoreInfo.flags = 0; + VkSemaphore semaphore; +- SkDEBUGCODE(VkResult result = )GR_VK_CALL(fInterface, CreateSemaphore(fDevice, &semaphoreInfo, ++ SkDEBUGCODE(VkResult result = )GR_VK_CALL(fShared->fInterface, CreateSemaphore(fShared->fDevice, &semaphoreInfo, + nullptr, &semaphore)); + SkASSERT(result == VK_SUCCESS); + + // acquire the image +- VkResult res = fAcquireNextImageKHR(fDevice, fSwapchain, UINT64_MAX, ++ VkResult res = fAcquireNextImageKHR(fShared->fDevice, fSwapchain, UINT64_MAX, + semaphore, VK_NULL_HANDLE, + &backbuffer->fImageIndex); + if (VK_ERROR_SURFACE_LOST_KHR == res) { + // need to figure out how to create a new vkSurface without the platformData* + // maybe use attach somehow? but need a Window +- GR_VK_CALL(fInterface, DestroySemaphore(fDevice, semaphore, nullptr)); ++ GR_VK_CALL(fShared->fInterface, DestroySemaphore(fShared->fDevice, semaphore, nullptr)); + return nullptr; + } + if (VK_ERROR_OUT_OF_DATE_KHR == res) { + // tear swapchain down and try again + if (!this->createSwapchain(-1, -1, fDisplayParams)) { +- GR_VK_CALL(fInterface, DestroySemaphore(fDevice, semaphore, nullptr)); ++ GR_VK_CALL(fShared->fInterface, DestroySemaphore(fShared->fDevice, semaphore, nullptr)); + return nullptr; + } + backbuffer = this->getAvailableBackbuffer(); + + // acquire the image +- res = fAcquireNextImageKHR(fDevice, fSwapchain, UINT64_MAX, ++ res = fAcquireNextImageKHR(fShared->fDevice, fSwapchain, UINT64_MAX, + semaphore, VK_NULL_HANDLE, + &backbuffer->fImageIndex); + + if (VK_SUCCESS != res) { +- GR_VK_CALL(fInterface, DestroySemaphore(fDevice, semaphore, nullptr)); ++ GR_VK_CALL(fShared->fInterface, DestroySemaphore(fShared->fDevice, semaphore, nullptr)); + return nullptr; + } + } +@@ -528,7 +563,7 @@ void VulkanWindowContext::swapBuffers() { + GrFlushInfo info; + info.fNumSemaphores = 1; + info.fSignalSemaphores = &beSemaphore; +- GrBackendSurfaceMutableState presentState(VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, fPresentQueueIndex); ++ GrBackendSurfaceMutableState presentState(VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, fShared->fPresentQueueIndex); + surface->flush(info, &presentState); + surface->getContext()->submit(); + +@@ -548,4 +583,6 @@ void VulkanWindowContext::swapBuffers() { + fQueuePresentKHR(fPresentQueue, &presentInfo); + } + ++SK_API sk_sp<VulkanWindowContext::Shared> VulkanWindowContext::fGlobalShared; ++ + } //namespace sk_app +diff --git a/tools/sk_app/VulkanWindowContext.h b/tools/sk_app/VulkanWindowContext.h +index 5e245aff70..c6c866372f 100644 +--- a/tools/sk_app/VulkanWindowContext.h ++++ b/tools/sk_app/VulkanWindowContext.h +@@ -19,18 +19,36 @@ + #include "tools/gpu/vk/VkTestUtils.h" + #include "tools/sk_app/WindowContext.h" + ++#include <cassert> ++ + class GrRenderTarget; + + namespace sk_app { + +-class VulkanWindowContext : public WindowContext { ++class SK_API VulkanWindowContext : public WindowContext { ++ struct Shared; + public: + ~VulkanWindowContext() override; + ++ class SharedGrContext { ++ public: ++ SharedGrContext() {} ++ GrContext* getGrContext() { return shared ? shared->fContext.get() : nullptr; } ++ ~SharedGrContext() { shared.reset(); checkDestroyShared(); } ++ bool operator!() const { return !shared; } ++ void reset() { shared.reset(); } ++ private: ++ friend class VulkanWindowContext; ++ SharedGrContext(sk_sp<Shared>& sh ) : shared( sh ) {} ++ sk_sp<Shared> shared; ++ }; ++ ++ static SharedGrContext getSharedGrContext() { return SharedGrContext( fGlobalShared ); } ++ + sk_sp<SkSurface> getBackbufferSurface() override; + void swapBuffers() override; + +- bool isValid() override { return fDevice != VK_NULL_HANDLE; } ++ bool isValid() override { return fSurface != VK_NULL_HANDLE; } + + void resize(int w, int h) override { + this->createSwapchain(w, h, fDisplayParams); +@@ -50,9 +68,15 @@ public: + VulkanWindowContext(const DisplayParams&, CreateVkSurfaceFn, CanPresentFn, + PFN_vkGetInstanceProcAddr, PFN_vkGetDeviceProcAddr); + ++ static const VkPhysicalDeviceProperties& getPhysDeviceProperties() { ++ assert( fGlobalShared != nullptr ); ++ return fGlobalShared->physDeviceProperties; ++ } ++ + private: + void initializeContext(); + void destroyContext(); ++ static void checkDestroyShared(); + + struct BackbufferInfo { + uint32_t fImageIndex; // image this is associated with +@@ -64,11 +88,6 @@ private: + void createBuffers(VkFormat format, SkColorType colorType, VkSharingMode); + void destroyBuffers(); + +- VkInstance fInstance = VK_NULL_HANDLE; +- VkPhysicalDevice fPhysicalDevice = VK_NULL_HANDLE; +- VkDevice fDevice = VK_NULL_HANDLE; +- VkDebugReportCallbackEXT fDebugCallback = VK_NULL_HANDLE; +- + // Create functions + CreateVkSurfaceFn fCreateVkSurfaceFn; + CanPresentFn fCanPresentFn; +@@ -90,20 +109,44 @@ private: + PFN_vkAcquireNextImageKHR fAcquireNextImageKHR = nullptr; + PFN_vkQueuePresentKHR fQueuePresentKHR = nullptr; + +- PFN_vkDestroyInstance fDestroyInstance = nullptr; + PFN_vkDeviceWaitIdle fDeviceWaitIdle = nullptr; +- PFN_vkDestroyDebugReportCallbackEXT fDestroyDebugReportCallbackEXT = nullptr; + PFN_vkQueueWaitIdle fQueueWaitIdle = nullptr; +- PFN_vkDestroyDevice fDestroyDevice = nullptr; + PFN_vkGetDeviceQueue fGetDeviceQueue = nullptr; + ++ // We need to use just one GrContext, so share all the relevant data. ++ struct Shared : public SkRefCnt ++ { ++ PFN_vkDestroyInstance fDestroyInstance = nullptr; ++ PFN_vkDestroyDevice fDestroyDevice = nullptr; ++ PFN_vkDestroyDebugReportCallbackEXT fDestroyDebugReportCallbackEXT = nullptr; ++ ++ VkInstance fInstance = VK_NULL_HANDLE; ++ VkPhysicalDevice fPhysicalDevice = VK_NULL_HANDLE; ++ VkDevice fDevice = VK_NULL_HANDLE; ++ VkDebugReportCallbackEXT fDebugCallback = VK_NULL_HANDLE; ++ + sk_sp<const GrVkInterface> fInterface; + +- VkSurfaceKHR fSurface; +- VkSwapchainKHR fSwapchain; ++ // Original code had this as a function-local variable, but that seems wrong. ++ // It should exist as long as the context exists. ++ VkPhysicalDeviceFeatures2 features; ++ ++ // Store this to make it accessible. ++ VkPhysicalDeviceProperties physDeviceProperties; ++ + uint32_t fGraphicsQueueIndex; + VkQueue fGraphicsQueue; + uint32_t fPresentQueueIndex; ++ ++ sk_sp<GrContext> fContext; ++ }; ++ ++ sk_sp<Shared> fShared; ++ ++ static sk_sp<Shared> fGlobalShared; ++ ++ VkSurfaceKHR fSurface; ++ VkSwapchainKHR fSwapchain; + VkQueue fPresentQueue; + + uint32_t fImageCount; +diff --git a/tools/sk_app/unix/VulkanWindowContext_unix.cpp b/tools/sk_app/unix/VulkanWindowContext_unix.cpp +index 6f0ce0aceb..877578cede 100644 +--- a/tools/sk_app/unix/VulkanWindowContext_unix.cpp ++++ b/tools/sk_app/unix/VulkanWindowContext_unix.cpp +@@ -30,7 +30,7 @@ std::unique_ptr<WindowContext> MakeVulkanForXlib(const XlibWindowInfo& info, + return nullptr; + } + +- auto createVkSurface = [&info, instProc](VkInstance instance) -> VkSurfaceKHR { ++ VulkanWindowContext::CreateVkSurfaceFn createVkSurface = [&info, instProc](VkInstance instance) -> VkSurfaceKHR { + static PFN_vkCreateXcbSurfaceKHR createXcbSurfaceKHR = nullptr; + if (!createXcbSurfaceKHR) { + createXcbSurfaceKHR = +@@ -54,6 +54,9 @@ std::unique_ptr<WindowContext> MakeVulkanForXlib(const XlibWindowInfo& info, + + return surface; + }; ++ // Allow creating just the shared context, without an associated window. ++ if(info.fWindow == None) ++ createVkSurface = nullptr; + + auto canPresent = [&info, instProc](VkInstance instance, VkPhysicalDevice physDev, + uint32_t queueFamilyIndex) { +@@ -76,7 +79,7 @@ std::unique_ptr<WindowContext> MakeVulkanForXlib(const XlibWindowInfo& info, + }; + std::unique_ptr<WindowContext> ctx( + new VulkanWindowContext(displayParams, createVkSurface, canPresent, instProc, devProc)); +- if (!ctx->isValid()) { ++ if (!ctx->isValid() && createVkSurface != nullptr) { + return nullptr; + } + return ctx; +diff --git a/tools/sk_app/win/VulkanWindowContext_win.cpp b/tools/sk_app/win/VulkanWindowContext_win.cpp +index 909c96127b..35e063ae28 100644 +--- a/tools/sk_app/win/VulkanWindowContext_win.cpp ++++ b/tools/sk_app/win/VulkanWindowContext_win.cpp +@@ -30,7 +30,7 @@ std::unique_ptr<WindowContext> MakeVulkanForWin(HWND hwnd, const DisplayParams& + return nullptr; + } + +- auto createVkSurface = [hwnd, instProc] (VkInstance instance) -> VkSurfaceKHR { ++ VulkanWindowContext::CreateVkSurfaceFn createVkSurface = [hwnd, instProc] (VkInstance instance) -> VkSurfaceKHR { + static PFN_vkCreateWin32SurfaceKHR createWin32SurfaceKHR = nullptr; + if (!createWin32SurfaceKHR) { + createWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR) +@@ -54,6 +54,9 @@ std::unique_ptr<WindowContext> MakeVulkanForWin(HWND hwnd, const DisplayParams& + + return surface; + }; ++ // Allow creating just the shared context, without an associated window. ++ if(hwnd == nullptr) ++ createVkSurface = nullptr; + + auto canPresent = [instProc] (VkInstance instance, VkPhysicalDevice physDev, + uint32_t queueFamilyIndex) { +@@ -71,7 +74,7 @@ std::unique_ptr<WindowContext> MakeVulkanForWin(HWND hwnd, const DisplayParams& + + std::unique_ptr<WindowContext> ctx( + new VulkanWindowContext(params, createVkSurface, canPresent, instProc, devProc)); +- if (!ctx->isValid()) { ++ if (!ctx->isValid() && createVkSurface != nullptr) { + return nullptr; + } + return ctx; diff --git a/external/skia/source/SkMemory_malloc.cxx b/external/skia/source/SkMemory_malloc.cxx new file mode 100644 index 000000000..9e2da3c20 --- /dev/null +++ b/external/skia/source/SkMemory_malloc.cxx @@ -0,0 +1,68 @@ +/* + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "include/core/SkTypes.h" +#include "include/private/SkMalloc.h" + +#include <sal/log.hxx> +#include <rtl/alloc.h> + +// Based on SkMemory_malloc.cpp : + +static inline void sk_out_of_memory(size_t size) +{ + SAL_WARN("skia", "sk_out_of_memory (asked for " << size << " bytes)"); + abort(); +} + +static inline void* throw_on_failure(size_t size, void* p) +{ + if (size > 0 && p == nullptr) + { + // If we've got a nullptr here, the only reason we should have failed is running out of RAM. + sk_out_of_memory(size); + } + return p; +} + +void sk_abort_no_print() +{ + SAL_WARN("skia", "sk_abort_no_print"); + abort(); +} + +void sk_out_of_memory(void) +{ + SAL_WARN("skia", "sk_out_of_memory"); + abort(); +} + +void* sk_realloc_throw(void* addr, size_t size) +{ + return throw_on_failure(size, rtl_reallocateMemory(addr, size)); +} + +void sk_free(void* p) { rtl_freeMemory(p); } + +void* sk_malloc_flags(size_t size, unsigned flags) +{ + void* p; + if (flags & SK_MALLOC_ZERO_INITIALIZE) + { + p = rtl_allocateZeroMemory(size); + } + else + { + p = rtl_allocateMemory(size); + } + if (flags & SK_MALLOC_THROW) + { + return throw_on_failure(size, p); + } + else + { + return p; + } +} diff --git a/external/skia/source/skia_compiler.cxx b/external/skia/source/skia_compiler.cxx new file mode 100644 index 000000000..6339a4a4f --- /dev/null +++ b/external/skia/source/skia_compiler.cxx @@ -0,0 +1,20 @@ +/* + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <skia_compiler.hxx> + +// Get the type of compiler that Skia is compiled with. +const char* skia_compiler_name() +{ +#if defined __clang__ + return "Clang"; +#elif defined __GNUC__ + return "GCC"; +#elif defined _MSC_VER + return "MSVC"; +#else + return "?"; +#endif +} diff --git a/external/skia/windows-do-not-modify-logfont.patch.0 b/external/skia/windows-do-not-modify-logfont.patch.0 new file mode 100644 index 000000000..30c5c1e96 --- /dev/null +++ b/external/skia/windows-do-not-modify-logfont.patch.0 @@ -0,0 +1,29 @@ +--- ./src/ports/SkFontHost_win.cpp ++++ ./src/ports/SkFontHost_win.cpp +@@ -349,7 +349,7 @@ static bool FindByLogFont(SkTypeface* face, void* ctx) { + */ + SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONT& origLF) { + LOGFONT lf = origLF; +- make_canonical(&lf); ++// make_canonical(&lf); + sk_sp<SkTypeface> face = SkTypefaceCache::FindByProcAndRef(FindByLogFont, &lf); + if (!face) { + face = LogFontTypeface::Make(lf); +@@ -363,7 +363,7 @@ SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONT& origLF) { + */ + sk_sp<SkTypeface> SkCreateFontMemResourceTypefaceFromLOGFONT(const LOGFONT& origLF, HANDLE fontMemResource) { + LOGFONT lf = origLF; +- make_canonical(&lf); ++// make_canonical(&lf); + // We'll never get a cache hit, so no point in putting this in SkTypefaceCache. + return FontMemResourceTypeface::Make(lf, fontMemResource); + } +@@ -686,7 +686,7 @@ SkScalerContext_GDI::SkScalerContext_GDI(sk_sp<LogFontTypeface> rawTypeface, + + LOGFONT lf = typeface->fLogFont; + lf.lfHeight = -SkScalarTruncToInt(gdiTextSize); +- lf.lfQuality = compute_quality(fRec); ++// lf.lfQuality = compute_quality(fRec); + fFont = CreateFontIndirect(&lf); + if (!fFont) { + return; diff --git a/external/skia/windows-force-unicode-api.patch.0 b/external/skia/windows-force-unicode-api.patch.0 new file mode 100644 index 000000000..f73de176d --- /dev/null +++ b/external/skia/windows-force-unicode-api.patch.0 @@ -0,0 +1,31 @@ +diff --git a/include/ports/SkTypeface_win.h b/include/ports/SkTypeface_win.h +index f659adf0e9..34446fc7a1 100644 +--- ./include/ports/SkTypeface_win.h ++++ ./include/ports/SkTypeface_win.h +@@ -26,7 +26,7 @@ typedef LOGFONTA LOGFONT; + * corresponding typeface for the specified logfont. The caller is responsible + * for calling unref() when it is finished. + */ +-SK_API SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONT&); ++SK_API SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONTW&); + + /** + * Copy the LOGFONT associated with this typeface into the lf parameter. Note +@@ -34,7 +34,7 @@ SK_API SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONT&); + * not track this (the paint does). + * typeface may be NULL, in which case we return the logfont for the default font. + */ +-SK_API void SkLOGFONTFromTypeface(const SkTypeface* typeface, LOGFONT* lf); ++SK_API void SkLOGFONTFromTypeface(const SkTypeface* typeface, LOGFONTW* lf); + + /** + * Set an optional callback to ensure that the data behind a LOGFONT is loaded. +@@ -42,7 +42,7 @@ SK_API void SkLOGFONTFromTypeface(const SkTypeface* typeface, LOGFONT* lf); + * Normally this is null, and is only required if the font data needs to be + * remotely (re)loaded. + */ +-SK_API void SkTypeface_SetEnsureLOGFONTAccessibleProc(void (*)(const LOGFONT&)); ++SK_API void SkTypeface_SetEnsureLOGFONTAccessibleProc(void (*)(const LOGFONTW&)); + + // Experimental! + // diff --git a/external/skia/windows-raster-surface-no-copies.patch.1 b/external/skia/windows-raster-surface-no-copies.patch.1 new file mode 100644 index 000000000..0c5804d85 --- /dev/null +++ b/external/skia/windows-raster-surface-no-copies.patch.1 @@ -0,0 +1,39 @@ +diff --git a/tools/sk_app/win/RasterWindowContext_win.cpp b/tools/sk_app/win/RasterWindowContext_win.cpp +index 9548220ce6..49f1f9ed17 100644 +--- a/tools/sk_app/win/RasterWindowContext_win.cpp ++++ b/tools/sk_app/win/RasterWindowContext_win.cpp +@@ -55,7 +55,7 @@ void RasterWindowContext_win::resize(int w, int h) { + fWidth = w; + fHeight = h; + fBackbufferSurface.reset(); +- const size_t bmpSize = sizeof(BITMAPINFOHEADER) + w * h * sizeof(uint32_t); ++ const size_t bmpSize = sizeof(BITMAPINFO); + fSurfaceMemory.reset(bmpSize); + BITMAPINFO* bmpInfo = reinterpret_cast<BITMAPINFO*>(fSurfaceMemory.get()); + ZeroMemory(bmpInfo, sizeof(BITMAPINFO)); +@@ -65,11 +65,12 @@ void RasterWindowContext_win::resize(int w, int h) { + bmpInfo->bmiHeader.biPlanes = 1; + bmpInfo->bmiHeader.biBitCount = 32; + bmpInfo->bmiHeader.biCompression = BI_RGB; +- void* pixels = bmpInfo->bmiColors; ++ // Do not use a packed DIB bitmap, SkSurface_Raster::onNewImageSnapshot() does ++ // a deep copy if it does not own the pixels. + + SkImageInfo info = SkImageInfo::Make(w, h, fDisplayParams.fColorType, kPremul_SkAlphaType, + fDisplayParams.fColorSpace); +- fBackbufferSurface = SkSurface::MakeRasterDirect(info, pixels, sizeof(uint32_t) * w); ++ fBackbufferSurface = SkSurface::MakeRaster(info); + } + + sk_sp<SkSurface> RasterWindowContext_win::getBackbufferSurface() { return fBackbufferSurface; } +@@ -77,7 +78,9 @@ sk_sp<SkSurface> RasterWindowContext_win::getBackbufferSurface() { return fBackb + void RasterWindowContext_win::swapBuffers() { + BITMAPINFO* bmpInfo = reinterpret_cast<BITMAPINFO*>(fSurfaceMemory.get()); + HDC dc = GetDC(fWnd); +- StretchDIBits(dc, 0, 0, fWidth, fHeight, 0, 0, fWidth, fHeight, bmpInfo->bmiColors, bmpInfo, ++ SkPixmap pixmap; ++ fBackbufferSurface->peekPixels(&pixmap); ++ StretchDIBits(dc, 0, 0, fWidth, fHeight, 0, 0, fWidth, fHeight, pixmap.addr(), bmpInfo, + DIB_RGB_COLORS, SRCCOPY); + ReleaseDC(fWnd, dc); + } diff --git a/external/skia/windows-text-gamma.patch.0 b/external/skia/windows-text-gamma.patch.0 new file mode 100644 index 000000000..624636b7d --- /dev/null +++ b/external/skia/windows-text-gamma.patch.0 @@ -0,0 +1,70 @@ +--- ./src/ports/SkFontHost_win.cpp.sav 2020-03-18 10:26:52.470184300 +0100 ++++ ./src/ports/SkFontHost_win.cpp 2020-03-18 12:08:04.598406700 +0100 +@@ -1215,17 +1215,23 @@ + // since the caller may require A8 for maskfilters, we can't check for BW + // ... until we have the caller tell us that explicitly + const SkGdiRGB* src = (const SkGdiRGB*)bits; ++#if defined(SK_GAMMA_APPLY_TO_A8) + if (fPreBlend.isApplicable()) { + RGBToA8<true>(src, srcRB, glyph, fPreBlend.fG); +- } else { ++ } else ++#endif ++ { + RGBToA8<false>(src, srcRB, glyph, fPreBlend.fG); + } + } else { // LCD16 + const SkGdiRGB* src = (const SkGdiRGB*)bits; + SkASSERT(SkMask::kLCD16_Format == glyph.fMaskFormat); ++#if defined(SK_GAMMA_APPLY_TO_A8) + if (fPreBlend.isApplicable()) { + RGBToLcd16<true>(src, srcRB, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); +- } else { ++ } else ++#endif ++ { + RGBToLcd16<false>(src, srcRB, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + } + } +--- ./src/ports/SkScalerContext_win_dw.cpp ++++ ./src/ports/SkScalerContext_win_dw.cpp +@@ -1132,27 +1132,36 @@ void SkScalerContext_DW::generateImage(const SkGlyph& glyph) { + BilevelToBW(src, glyph); + } else if (!isLCD(fRec)) { + if (textureType == DWRITE_TEXTURE_ALIASED_1x1) { ++#if defined(SK_GAMMA_APPLY_TO_A8) + if (fPreBlend.isApplicable()) { + GrayscaleToA8<true>(src, glyph, fPreBlend.fG); +- } else { ++ } else ++#endif ++ { + GrayscaleToA8<false>(src, glyph, fPreBlend.fG); + } + } else { ++#if defined(SK_GAMMA_APPLY_TO_A8) + if (fPreBlend.isApplicable()) { + RGBToA8<true>(src, glyph, fPreBlend.fG); +- } else { ++ } else ++#endif ++ { + RGBToA8<false>(src, glyph, fPreBlend.fG); + } + } + } else { + SkASSERT(SkMask::kLCD16_Format == glyph.fMaskFormat); ++#if defined(SK_GAMMA_APPLY_TO_A8) + if (fPreBlend.isApplicable()) { + if (fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag) { + RGBToLcd16<true, false>(src, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + } else { + RGBToLcd16<true, true>(src, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + } +- } else { ++ } else ++#endif ++ { + if (fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag) { + RGBToLcd16<false, false>(src, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + } else { diff --git a/external/skia/windows-typeface-directwrite.patch.0 b/external/skia/windows-typeface-directwrite.patch.0 new file mode 100644 index 000000000..56e8209ce --- /dev/null +++ b/external/skia/windows-typeface-directwrite.patch.0 @@ -0,0 +1,48 @@ +--- ./include/ports/SkTypeface_win.h ++++ ./include/ports/SkTypeface_win.h +@@ -75,5 +75,13 @@ SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWriteRenderer(sk_sp<SkRemotableFontM + */ + SK_API sk_sp<SkRemotableFontMgr> SkRemotableFontMgr_New_DirectWrite(); + ++struct IDWriteFontFace; ++struct IDWriteFont; ++struct IDWriteFontFamily; ++SK_API SkTypeface* SkCreateTypefaceDirectWrite(sk_sp<SkFontMgr> fontMgr, ++ IDWriteFontFace* fontFace, ++ IDWriteFont* font, ++ IDWriteFontFamily* fontFamily); ++ + #endif // SK_BUILD_FOR_WIN + #endif // SkTypeface_win_DEFINED +--- ./src/ports/SkFontMgr_win_dw.cpp ++++ ./src/ports/SkFontMgr_win_dw.cpp +@@ -320,6 +320,10 @@ private: + + friend class SkFontStyleSet_DirectWrite; + friend class FontFallbackRenderer; ++ friend SK_API SkTypeface* SkCreateTypefaceDirectWrite(sk_sp<SkFontMgr> fontMgr, ++ IDWriteFontFace* fontFace, ++ IDWriteFont* font, ++ IDWriteFontFamily* fontFamily); + }; + + class SkFontStyleSet_DirectWrite : public SkFontStyleSet { +@@ -1215,6 +1219,18 @@ SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWrite(IDWriteFactory* factory, + defaultFamilyName, defaultFamilyNameLen); + } + ++SkTypeface* SkCreateTypefaceDirectWrite(sk_sp<SkFontMgr> fontMgr, ++ IDWriteFontFace* fontFace, ++ IDWriteFont* font, ++ IDWriteFontFamily* fontFamily) ++{ ++ SkFontMgr_DirectWrite* mgr = dynamic_cast<SkFontMgr_DirectWrite*>(fontMgr.get()); ++ if(!mgr) ++ return nullptr; ++ sk_sp<SkTypeface> typeface = mgr->makeTypefaceFromDWriteFont(fontFace, font, fontFamily); ++ return typeface.release(); ++} ++ + #include "include/ports/SkFontMgr_indirect.h" + SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWriteRenderer(sk_sp<SkRemotableFontMgr> proxy) { + sk_sp<SkFontMgr> impl(SkFontMgr_New_DirectWrite()); |