diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/third_party/skia/gn | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/skia/gn')
19 files changed, 204 insertions, 83 deletions
diff --git a/chromium/third_party/skia/gn/BUILD.gn b/chromium/third_party/skia/gn/BUILD.gn index 04e2f8f536d..894d3121be5 100644 --- a/chromium/third_party/skia/gn/BUILD.gn +++ b/chromium/third_party/skia/gn/BUILD.gn @@ -15,6 +15,7 @@ declare_args() { extra_ldflags = [] malloc = "" + werror = false xcode_sysroot = "" } @@ -97,9 +98,6 @@ config("default") { "/utf-8", # Set Source and Executable character sets to UTF-8. ] cflags_cc += [ "/std:c++17" ] - if (is_clang) { - cflags += [ "-fms-compatibility-version=19" ] # 2015 - } defines += [ "_CRT_SECURE_NO_WARNINGS", # Disables warnings about sscanf(). "_HAS_EXCEPTIONS=0", # Disables exceptions in MSVC STL. @@ -152,17 +150,6 @@ config("default") { "-mfpu=neon", "-mthumb", ] - } else if (current_cpu == "loongson3a") { - asmflags += [ "-march=loongson3a" ] - cflags += [ - "-march=loongson3a", - - # Causes an internal compiler error. - "-DSKCMS_PORTABLE", - ] - } else if (current_cpu == "mips64el") { - asmflags += [ "-march=mips64" ] - cflags += [ "-march=mips64" ] } else if (current_cpu == "x86" && !is_win) { asmflags += [ "-m32" ] cflags += [ @@ -435,12 +422,17 @@ config("warnings") { "-Wno-unused-template", "-Wno-zero-as-null-pointer-constant", "-Wno-thread-safety-negative", + "-Wno-non-c-typedef-for-linkage", # Dawn, not Skia per se. ] cflags_cc += [ "-Wno-abstract-vbase-init", "-Wno-weak-vtables", ] + # Turn back on after -Wno-conversion. + # This only affects public headers... see :warnings_except_public_headers. + cflags += [ "-Wsign-conversion" ] + # We are unlikely to want to fix these. cflags += [ "-Wno-covered-switch-default", @@ -488,13 +480,13 @@ config("warnings") { "-Wdeprecated-writable-str", ] } - if (!is_win || is_clang) { - cflags += [ "-Wno-implicit-fallthrough" ] - } } config("warnings_except_public_headers") { if (!is_win || is_clang) { - cflags = [ "-Wno-unused-parameter" ] + cflags = [ + "-Wno-sign-conversion", + "-Wno-unused-parameter", + ] } } diff --git a/chromium/third_party/skia/gn/BUILDCONFIG.gn b/chromium/third_party/skia/gn/BUILDCONFIG.gn index 5fb933aa81f..cc2e16e25f2 100644 --- a/chromium/third_party/skia/gn/BUILDCONFIG.gn +++ b/chromium/third_party/skia/gn/BUILDCONFIG.gn @@ -29,8 +29,6 @@ declare_args() { clang_win = "" clang_win_version = "" - - werror = false } declare_args() { is_debug = !is_official_build diff --git a/chromium/third_party/skia/gn/compile_processors.py b/chromium/third_party/skia/gn/compile_processors.py index 922b6539de1..c006532df4f 100755 --- a/chromium/third_party/skia/gn/compile_processors.py +++ b/chromium/third_party/skia/gn/compile_processors.py @@ -11,14 +11,21 @@ import sys skslc = sys.argv[1] clangFormat = sys.argv[2] -processors = sys.argv[3:] +fetchClangFormat = sys.argv[3] +processors = sys.argv[4:] + +exeSuffix = '.exe' if sys.platform.startswith('win') else ''; + for p in processors: print("Recompiling " + p + "...") try: + if not os.path.isfile(clangFormat + exeSuffix): + subprocess.check_call([sys.executable, fetchClangFormat]); + noExt, _ = os.path.splitext(p) head, tail = os.path.split(noExt) targetDir = os.path.join(head, "generated") - if not os.path.exists(targetDir): + if not os.path.isdir(targetDir): os.mkdir(targetDir) target = os.path.join(targetDir, tail) subprocess.check_output([skslc, p, target + ".h"]) diff --git a/chromium/third_party/skia/gn/core.gni b/chromium/third_party/skia/gn/core.gni index 2a01d410460..7f2d32d2af7 100644 --- a/chromium/third_party/skia/gn/core.gni +++ b/chromium/third_party/skia/gn/core.gni @@ -58,6 +58,7 @@ skia_core_public = [ "$_include/core/SkOverdrawCanvas.h", "$_include/core/SkPaint.h", "$_include/core/SkPath.h", + "$_include/core/SkPathBuilder.h", "$_include/core/SkPathEffect.h", "$_include/core/SkPathMeasure.h", "$_include/core/SkPixelRef.h", @@ -234,8 +235,10 @@ skia_core_sources = [ "$_src/core/SkImageFilter_Base.h", "$_src/core/SkImageGenerator.cpp", "$_src/core/SkImageInfo.cpp", + "$_src/core/SkLRUCache.h", "$_src/core/SkLatticeIter.cpp", "$_src/core/SkLatticeIter.h", + "$_src/core/SkLegacyGpuBlurUtils.cpp", "$_src/core/SkLineClipper.cpp", "$_src/core/SkLocalMatrixImageFilter.cpp", "$_src/core/SkLocalMatrixImageFilter.h", @@ -270,7 +273,6 @@ skia_core_sources = [ "$_src/core/SkOSFile.h", "$_src/core/SkOpts.cpp", "$_src/core/SkOpts.h", - "$_src/core/SkOpts_skx.cpp", "$_src/core/SkOrderedReadBuffer.h", "$_src/core/SkOverdrawCanvas.cpp", "$_src/core/SkPaint.cpp", @@ -278,6 +280,7 @@ skia_core_sources = [ "$_src/core/SkPaintPriv.cpp", "$_src/core/SkPaintPriv.h", "$_src/core/SkPath.cpp", + "$_src/core/SkPathBuilder.cpp", "$_src/core/SkPathEffect.cpp", "$_src/core/SkPathMeasure.cpp", "$_src/core/SkPathPriv.h", @@ -301,7 +304,6 @@ skia_core_sources = [ "$_src/core/SkRasterPipelineBlitter.cpp", "$_src/core/SkReadBuffer.cpp", "$_src/core/SkReadBuffer.h", - "$_src/core/SkReader32.h", "$_src/core/SkRecord.cpp", "$_src/core/SkRecordDraw.cpp", "$_src/core/SkRecordOpts.cpp", diff --git a/chromium/third_party/skia/gn/flutter_defines.gni b/chromium/third_party/skia/gn/flutter_defines.gni index e400fc3d2dc..90d6933726f 100644 --- a/chromium/third_party/skia/gn/flutter_defines.gni +++ b/chromium/third_party/skia/gn/flutter_defines.gni @@ -11,11 +11,11 @@ flutter_defines = [ # Remove software rasterizers to save some code size. "SK_DISABLE_AAA", - # Flutter doesn't deserialize anything. - "SK_DISABLE_READBUFFER", + # Flutter doesn't deserialize effects. "SK_DISABLE_EFFECT_DESERIALIZATION", # Staging + "SK_SUPPORT_LEGACY_MATRIX_FACTORIES", # Fast low-precision software rendering isn't a priority for Flutter. "SK_DISABLE_LEGACY_SHADERCONTEXT", diff --git a/chromium/third_party/skia/gn/gm.gni b/chromium/third_party/skia/gn/gm.gni index c4266a17e0e..4ae72fb4070 100644 --- a/chromium/third_party/skia/gn/gm.gni +++ b/chromium/third_party/skia/gn/gm.gni @@ -156,6 +156,7 @@ gm_sources = [ "$_gm/emptypath.cpp", "$_gm/encode.cpp", "$_gm/encode_alpha_jpeg.cpp", + "$_gm/encode_color_types.cpp", "$_gm/encode_platform.cpp", "$_gm/encode_srgb.cpp", "$_gm/exoticformats.cpp", @@ -348,6 +349,7 @@ gm_sources = [ "$_gm/stroketext.cpp", "$_gm/subsetshader.cpp", "$_gm/surface.cpp", + "$_gm/swizzle.cpp", "$_gm/tablecolorfilter.cpp", "$_gm/tallstretchedbitmaps.cpp", "$_gm/tessellation.cpp", @@ -384,16 +386,15 @@ gm_sources = [ "$_gm/vertices.cpp", "$_gm/verylargebitmap.cpp", "$_gm/wacky_yuv_formats.cpp", + "$_gm/widebuttcaps.cpp", "$_gm/windowrectangles.cpp", "$_gm/xfermodeimagefilter.cpp", "$_gm/xfermodes.cpp", "$_gm/xfermodes2.cpp", "$_gm/xfermodes3.cpp", + "$_gm/ycbcrimage.cpp", "$_gm/yuv420_odd_dim.cpp", "$_gm/yuvtorgbeffect.cpp", ] -gl_gm_sources = [ - "$_gm/atlastext.cpp", - "$_gm/rectangletexture.cpp", -] +gl_gm_sources = [ "$_gm/rectangletexture.cpp" ] diff --git a/chromium/third_party/skia/gn/gn_to_bp.py b/chromium/third_party/skia/gn/gn_to_bp.py index 4dac40dee15..4256993fe23 100755 --- a/chromium/third_party/skia/gn/gn_to_bp.py +++ b/chromium/third_party/skia/gn/gn_to_bp.py @@ -169,7 +169,6 @@ cc_defaults { cc_defaults { name: "skia_deps", shared_libs: [ - "libandroidicu", "libdng_sdk", "libexpat", "libft2", @@ -230,10 +229,15 @@ cc_defaults { "skia_deps", "skia_pgo_no_profile_use" ], + shared_libs: [ + "libandroidicu", + "libharfbuzz_ng", + ], static_libs: [ "libskia", ], cflags: [ + "-DSK_SHAPER_HARFBUZZ_AVAILABLE", "-Wno-implicit-fallthrough", "-Wno-unused-parameter", "-Wno-unused-variable", @@ -284,30 +288,31 @@ cc_test { # We'll run GN to get the main source lists and include directories for Skia. def generate_args(target_os, enable_gpu): d = { - 'is_official_build': 'true', + 'is_official_build': 'true', # gn_to_bp_utils' GetArchSources will take care of architecture-specific # files. - 'target_cpu': '"none"', + 'target_cpu': '"none"', - 'skia_enable_android_utils': 'true', + 'skia_enable_android_utils': 'true', # Use the custom FontMgr, as the framework will handle fonts. - 'skia_enable_fontmgr_custom': 'false', - 'skia_enable_fontmgr_custom_empty': 'true', - 'skia_enable_fontmgr_android': 'false', - 'skia_enable_fontmgr_win': 'false', - 'skia_enable_fontmgr_win_gdi': 'false', - 'skia_use_fonthost_mac': 'false', + 'skia_enable_fontmgr_custom_directory': 'false', + 'skia_enable_fontmgr_custom_embedded': 'false', + 'skia_enable_fontmgr_custom_empty': 'true', + 'skia_enable_fontmgr_android': 'false', + 'skia_enable_fontmgr_win': 'false', + 'skia_enable_fontmgr_win_gdi': 'false', + 'skia_use_fonthost_mac': 'false', # enable features used in skia_nanobench - 'skia_enable_sksl_interpreter': 'true', - 'skia_tools_require_resources': 'true', - - 'skia_use_freetype': 'true', - 'skia_use_fontconfig': 'false', - 'skia_use_fixed_gamma_text': 'true', - 'skia_include_multiframe_procs': 'false', - 'skia_libgifcodec_path': '"third_party/libgifcodec"', + 'skia_enable_sksl_interpreter': 'true', + 'skia_tools_require_resources': 'true', + + 'skia_use_freetype': 'true', + 'skia_use_fontconfig': 'false', + 'skia_use_fixed_gamma_text': 'true', + 'skia_include_multiframe_procs': 'false', + 'skia_libgifcodec_path': '"third_party/libgifcodec"', } d['target_os'] = target_os if target_os == '"android"': @@ -490,7 +495,8 @@ with open('Android.bp', 'w') as Android_bp: defs['sse41'] + defs['sse42'] + defs['avx' ] + - defs['hsw' ])), + defs['hsw' ] + + defs['skx' ])), 'dm_includes' : bpfmt(8, dm_includes), 'dm_srcs' : bpfmt(8, dm_srcs), diff --git a/chromium/third_party/skia/gn/gn_to_bp_utils.py b/chromium/third_party/skia/gn/gn_to_bp_utils.py index 088be3617c0..3deeb2bcd8a 100755 --- a/chromium/third_party/skia/gn/gn_to_bp_utils.py +++ b/chromium/third_party/skia/gn/gn_to_bp_utils.py @@ -36,7 +36,12 @@ def GrabDependentValues(js, name, value_type, list_to_extend, exclude): # Skia components, gms, tests, etc). for dep in js['targets'][name]['deps']: if 'modules' in dep: - continue # Modules require special handling -- skip for now. + skip = True + for white_list in ['skshaper', 'skparagraph']: + if white_list in dep: + skip = False + if skip: + continue # Modules require special handling -- skip for now. if 'third_party' in dep: continue # We've handled all third-party DEPS as static or shared_libs. if 'none' in dep: diff --git a/chromium/third_party/skia/gn/gpu.gni b/chromium/third_party/skia/gn/gpu.gni index 2310000a0b3..789a2614140 100644 --- a/chromium/third_party/skia/gn/gpu.gni +++ b/chromium/third_party/skia/gn/gpu.gni @@ -11,6 +11,7 @@ skia_gpu_sources = [ "$_include/gpu/GrBackendDrawableInfo.h", "$_include/gpu/GrBackendSemaphore.h", "$_include/gpu/GrBackendSurface.h", + "$_include/gpu/GrBackendSurfaceMutableState.h", "$_include/gpu/GrConfig.h", "$_include/gpu/GrContext.h", "$_include/gpu/GrContextOptions.h", @@ -35,8 +36,10 @@ skia_gpu_sources = [ "$_src/gpu/GrAuditTrail.h", "$_src/gpu/GrAutoLocaleSetter.h", "$_src/gpu/GrBackendSurface.cpp", + "$_src/gpu/GrBackendSurfaceMutableStateImpl.h", "$_src/gpu/GrBackendTextureImageGenerator.cpp", "$_src/gpu/GrBackendTextureImageGenerator.h", + "$_src/gpu/GrBackendUtils.h", "$_src/gpu/GrBaseContextPriv.h", "$_src/gpu/GrBitmapTextureMaker.cpp", "$_src/gpu/GrBitmapTextureMaker.h", @@ -105,6 +108,7 @@ skia_gpu_sources = [ "$_src/gpu/GrGpuResource.h", "$_src/gpu/GrGpuResourceCacheAccess.h", "$_src/gpu/GrGpuResourcePriv.h", + "$_src/gpu/GrHashMapWithCache.h", "$_src/gpu/GrImageContext.cpp", "$_src/gpu/GrImageContextPriv.h", "$_src/gpu/GrImageInfo.h", @@ -151,6 +155,9 @@ skia_gpu_sources = [ "$_src/gpu/GrProxyProvider.h", "$_src/gpu/GrRecordingContext.cpp", "$_src/gpu/GrRecordingContextPriv.h", + "$_src/gpu/GrRectanizer.h", + "$_src/gpu/GrRectanizerPow2.cpp", + "$_src/gpu/GrRectanizerPow2.h", "$_src/gpu/GrRectanizerSkyline.cpp", "$_src/gpu/GrRectanizerSkyline.h", "$_src/gpu/GrReducedClip.cpp", @@ -174,6 +181,8 @@ skia_gpu_sources = [ "$_src/gpu/GrResourceProvider.cpp", "$_src/gpu/GrResourceProvider.h", "$_src/gpu/GrResourceProviderPriv.h", + "$_src/gpu/GrRingBuffer.cpp", + "$_src/gpu/GrRingBuffer.h", "$_src/gpu/GrSPIRVUniformHandler.cpp", "$_src/gpu/GrSPIRVUniformHandler.h", "$_src/gpu/GrSPIRVVaryingHandler.cpp", @@ -244,6 +253,8 @@ skia_gpu_sources = [ "$_src/gpu/GrTransferFromRenderTask.h", "$_src/gpu/GrTriangulator.cpp", "$_src/gpu/GrTriangulator.h", + "$_src/gpu/GrUniformDataManager.cpp", + "$_src/gpu/GrUniformDataManager.h", "$_src/gpu/GrUserStencilSettings.h", "$_src/gpu/GrWaitRenderTask.cpp", "$_src/gpu/GrWaitRenderTask.h", @@ -275,6 +286,8 @@ skia_gpu_sources = [ "$_src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h", "$_src/gpu/effects/GrMatrixConvolutionEffect.cpp", "$_src/gpu/effects/GrMatrixConvolutionEffect.h", + "$_src/gpu/effects/GrMatrixEffect.cpp", + "$_src/gpu/effects/GrMatrixEffect.h", "$_src/gpu/effects/GrOvalEffect.cpp", "$_src/gpu/effects/GrOvalEffect.h", "$_src/gpu/effects/GrPorterDuffXferProcessor.cpp", @@ -321,14 +334,10 @@ skia_gpu_sources = [ "$_src/gpu/effects/generated/GrLumaColorFilterEffect.h", "$_src/gpu/effects/generated/GrMagnifierEffect.cpp", "$_src/gpu/effects/generated/GrMagnifierEffect.h", - "$_src/gpu/effects/generated/GrMatrixEffect.cpp", - "$_src/gpu/effects/generated/GrMatrixEffect.h", "$_src/gpu/effects/generated/GrMixerEffect.cpp", "$_src/gpu/effects/generated/GrMixerEffect.h", "$_src/gpu/effects/generated/GrOverrideInputFragmentProcessor.cpp", "$_src/gpu/effects/generated/GrOverrideInputFragmentProcessor.h", - "$_src/gpu/effects/generated/GrPremulInputFragmentProcessor.cpp", - "$_src/gpu/effects/generated/GrPremulInputFragmentProcessor.h", "$_src/gpu/effects/generated/GrRGBToHSLFilterEffect.cpp", "$_src/gpu/effects/generated/GrRGBToHSLFilterEffect.h", "$_src/gpu/effects/generated/GrRRectBlurEffect.cpp", @@ -359,8 +368,6 @@ skia_gpu_sources = [ "$_src/gpu/ops/GrAtlasTextOp.h", "$_src/gpu/ops/GrClearOp.cpp", "$_src/gpu/ops/GrClearOp.h", - "$_src/gpu/ops/GrClearStencilClipOp.cpp", - "$_src/gpu/ops/GrClearStencilClipOp.h", "$_src/gpu/ops/GrDashLinePathRenderer.cpp", "$_src/gpu/ops/GrDashLinePathRenderer.h", "$_src/gpu/ops/GrDashOp.cpp", @@ -439,8 +446,11 @@ skia_gpu_sources = [ "$_src/gpu/tessellate/GrMiddleOutPolygonTriangulator.h", "$_src/gpu/tessellate/GrMidpointContourParser.h", "$_src/gpu/tessellate/GrPathShader.h", + "$_src/gpu/tessellate/GrResolveLevelCounter.h", "$_src/gpu/tessellate/GrStencilPathShader.cpp", "$_src/gpu/tessellate/GrStencilPathShader.h", + "$_src/gpu/tessellate/GrStrokeGeometry.cpp", + "$_src/gpu/tessellate/GrStrokeGeometry.h", "$_src/gpu/tessellate/GrTessellatePathOp.cpp", "$_src/gpu/tessellate/GrTessellatePathOp.h", "$_src/gpu/tessellate/GrTessellationPathRenderer.cpp", @@ -455,14 +465,14 @@ skia_gpu_sources = [ "$_src/gpu/text/GrDistanceFieldAdjustTable.h", "$_src/gpu/text/GrSDFMaskFilter.cpp", "$_src/gpu/text/GrSDFMaskFilter.h", + "$_src/gpu/text/GrSDFTOptions.cpp", + "$_src/gpu/text/GrSDFTOptions.h", "$_src/gpu/text/GrStrikeCache.cpp", "$_src/gpu/text/GrStrikeCache.h", "$_src/gpu/text/GrTextBlob.cpp", "$_src/gpu/text/GrTextBlob.h", "$_src/gpu/text/GrTextBlobCache.cpp", "$_src/gpu/text/GrTextBlobCache.h", - "$_src/gpu/text/GrTextContext.cpp", - "$_src/gpu/text/GrTextContext.h", "$_src/gpu/text/GrTextTarget.h", # GLSL @@ -741,16 +751,20 @@ skia_direct3d_sources = [ "$_include/gpu/d3d/GrD3DTypes.h", "$_include/gpu/d3d/GrD3DTypesMinimal.h", "$_include/private/GrD3DTypesPriv.h", - "$_src/gpu/d3d/GrD3DAttachmentViewManager.cpp", - "$_src/gpu/d3d/GrD3DAttachmentViewManager.h", "$_src/gpu/d3d/GrD3DBuffer.cpp", "$_src/gpu/d3d/GrD3DBuffer.h", "$_src/gpu/d3d/GrD3DCaps.cpp", "$_src/gpu/d3d/GrD3DCaps.h", "$_src/gpu/d3d/GrD3DCommandList.cpp", "$_src/gpu/d3d/GrD3DCommandList.h", + "$_src/gpu/d3d/GrD3DConstantRingBuffer.cpp", + "$_src/gpu/d3d/GrD3DConstantRingBuffer.h", + "$_src/gpu/d3d/GrD3DCpuDescriptorManager.cpp", + "$_src/gpu/d3d/GrD3DCpuDescriptorManager.h", "$_src/gpu/d3d/GrD3DDescriptorHeap.cpp", "$_src/gpu/d3d/GrD3DDescriptorHeap.h", + "$_src/gpu/d3d/GrD3DDescriptorTableManager.cpp", + "$_src/gpu/d3d/GrD3DDescriptorTableManager.h", "$_src/gpu/d3d/GrD3DGpu.cpp", "$_src/gpu/d3d/GrD3DGpu.h", "$_src/gpu/d3d/GrD3DOpsRenderPass.cpp", @@ -759,6 +773,8 @@ skia_direct3d_sources = [ "$_src/gpu/d3d/GrD3DPipelineState.h", "$_src/gpu/d3d/GrD3DPipelineStateBuilder.cpp", "$_src/gpu/d3d/GrD3DPipelineStateBuilder.h", + "$_src/gpu/d3d/GrD3DPipelineStateDataManager.cpp", + "$_src/gpu/d3d/GrD3DPipelineStateDataManager.h", "$_src/gpu/d3d/GrD3DRenderTarget.cpp", "$_src/gpu/d3d/GrD3DRenderTarget.h", "$_src/gpu/d3d/GrD3DResourceProvider.cpp", @@ -863,13 +879,3 @@ skia_native_gpu_sources = [ "$_src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp", "$_src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp", ] - -skia_atlas_text_sources = [ - "$_include/atlastext/SkAtlasTextContext.h", - "$_include/atlastext/SkAtlasTextFont.h", - "$_include/atlastext/SkAtlasTextRenderer.h", - "$_include/atlastext/SkAtlasTextTarget.h", - "$_src/atlastext/SkAtlasTextContext.cpp", - "$_src/atlastext/SkAtlasTextTarget.cpp", - "$_src/atlastext/SkInternalAtlasTextContext.cpp", -] diff --git a/chromium/third_party/skia/gn/opts.gni b/chromium/third_party/skia/gn/opts.gni index 4c0cead1122..3d0f3896f3a 100644 --- a/chromium/third_party/skia/gn/opts.gni +++ b/chromium/third_party/skia/gn/opts.gni @@ -18,3 +18,4 @@ sse41 = [ "$_src/opts/SkOpts_sse41.cpp" ] sse42 = [ "$_src/opts/SkOpts_sse42.cpp" ] avx = [ "$_src/opts/SkOpts_avx.cpp" ] hsw = [ "$_src/opts/SkOpts_hsw.cpp" ] +skx = [ "$_src/opts/SkOpts_skx.cpp" ] diff --git a/chromium/third_party/skia/gn/rm.py b/chromium/third_party/skia/gn/rm.py new file mode 100755 index 00000000000..daac924ba85 --- /dev/null +++ b/chromium/third_party/skia/gn/rm.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python +# +# Copyright 2016 Google Inc. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import os +import shutil +import sys + +dst, = sys.argv[1:] + +if os.path.exists(dst): + if os.path.isdir(dst): + shutil.rmtree(dst) + else: + os.remove(dst) diff --git a/chromium/third_party/skia/gn/run_sksllex.py b/chromium/third_party/skia/gn/run_sksllex.py index 5a970df784d..cc427ff51a7 100755 --- a/chromium/third_party/skia/gn/run_sksllex.py +++ b/chromium/third_party/skia/gn/run_sksllex.py @@ -11,11 +11,19 @@ import sys sksllex = sys.argv[1] clangFormat = sys.argv[2] -src = sys.argv[3] +fetchClangFormat = sys.argv[3] +src = sys.argv[4] + +exeSuffix = '.exe' if sys.platform.startswith('win') else ''; + try: subprocess.check_output([sksllex, src + "/sksl/lex/sksl.lex", "Lexer", "Token", src + "/sksl/SkSLLexer.h", src + "/sksl/SkSLLexer.cpp"]) + + if not os.path.isfile(clangFormat + exeSuffix): + subprocess.check_call([sys.executable, fetchClangFormat]); + subprocess.check_call(clangFormat + " -i \"" + src + "/sksl/SkSLLexer.h\"", shell=True) subprocess.check_call(clangFormat + " -i \"" + src + diff --git a/chromium/third_party/skia/gn/samples.gni b/chromium/third_party/skia/gn/samples.gni index ae173e5058c..b80073b704c 100644 --- a/chromium/third_party/skia/gn/samples.gni +++ b/chromium/third_party/skia/gn/samples.gni @@ -43,6 +43,7 @@ samples_sources = [ "$_samplecode/SampleFillType.cpp", "$_samplecode/SampleFilter2.cpp", "$_samplecode/SampleFilterQuality.cpp", + "$_samplecode/SampleFitCubicToCircle.cpp", "$_samplecode/SampleFlutterAnimate.cpp", "$_samplecode/SampleGlyphTransform.cpp", "$_samplecode/SampleGradients.cpp", diff --git a/chromium/third_party/skia/gn/shared_sources.gni b/chromium/third_party/skia/gn/shared_sources.gni index 71500113a63..e710a0e0b6f 100644 --- a/chromium/third_party/skia/gn/shared_sources.gni +++ b/chromium/third_party/skia/gn/shared_sources.gni @@ -26,4 +26,5 @@ skia_opts = { sse42_sources = sse42 avx_sources = avx hsw_sources = hsw + skx_sources = skx } diff --git a/chromium/third_party/skia/gn/skia.gni b/chromium/third_party/skia/gn/skia.gni index a649bf2bf28..f4b35e83060 100644 --- a/chromium/third_party/skia/gn/skia.gni +++ b/chromium/third_party/skia/gn/skia.gni @@ -23,6 +23,7 @@ declare_args() { skia_enable_gpu = true skia_enable_pdf = true skia_enable_skottie = !(is_win && is_component_build) + skia_enable_skrive = true skia_enable_sksl_interpreter = is_skia_dev_build skia_enable_skvm_jit = is_skia_dev_build && ((target_cpu == "x64" && (is_linux || is_mac)) || @@ -48,7 +49,7 @@ declare_args() { skia_use_ffmpeg = false skia_use_fixed_gamma_text = is_android skia_use_fontconfig = is_linux - skia_use_fonthost_mac = is_mac + skia_use_fonthost_mac = is_mac || is_ios skia_use_freetype = is_android || is_fuchsia || is_linux skia_use_harfbuzz = true skia_use_gl = !is_fuchsia @@ -92,11 +93,13 @@ declare_args() { } declare_args() { - skia_enable_atlas_text = is_skia_dev_build && skia_enable_gpu skia_enable_fontmgr_android = skia_use_expat && skia_use_freetype - skia_enable_fontmgr_custom = - is_linux && skia_use_freetype && !skia_use_fontconfig - skia_enable_fontmgr_custom_empty = is_fuchsia && skia_use_freetype + skia_enable_fontmgr_custom_directory = skia_use_freetype && !is_fuchsia + skia_enable_fontmgr_custom_embedded = skia_use_freetype && !is_fuchsia + skia_enable_fontmgr_custom_empty = skia_use_freetype + skia_enable_fontmgr_fontconfig = skia_use_freetype && skia_use_fontconfig + skia_enable_fontmgr_FontConfigInterface = + skia_use_freetype && skia_use_fontconfig skia_enable_nvpr = !skia_enable_flutter_defines skia_enable_spirv_validation = is_skia_dev_build && is_debug && !skia_use_dawn skia_use_dng_sdk = @@ -108,5 +111,30 @@ declare_args() { skia_use_vma = skia_use_vulkan } +declare_args() { + # skia_fontmgr_factory should define SkFontMgr::Factory() + if (skia_enable_fontmgr_empty) { + skia_fontmgr_factory = "src/ports/SkFontMgr_empty_factory.cpp" + } else if (is_android && skia_enable_fontmgr_android) { + skia_fontmgr_factory = "src/ports/SkFontMgr_android_factory.cpp" + } else if (is_win && skia_enable_fontmgr_win) { + skia_fontmgr_factory = "src/ports/SkFontMgr_win_dw_factory.cpp" + } else if ((is_mac || is_ios) && skia_use_fonthost_mac) { + skia_fontmgr_factory = "src/ports/SkFontMgr_mac_ct_factory.cpp" + } else if (skia_enable_fontmgr_fontconfig) { + skia_fontmgr_factory = "src/ports/SkFontMgr_fontconfig_factory.cpp" + } else if (skia_enable_fontmgr_custom_directory) { + skia_fontmgr_factory = "src/ports/SkFontMgr_custom_directory_factory.cpp" + } else if (skia_enable_fontmgr_custom_embedded) { + skia_fontmgr_factory = "src/ports/SkFontMgr_custom_embedded_factory.cpp" + } else if (skia_enable_fontmgr_custom_empty) { + skia_fontmgr_factory = "src/ports/SkFontMgr_custom_empty_factory.cpp" + } else { + #"src/ports/SkFontMgr_FontConfigInterface_factory.cpp" #WontFix + #"src/ports/SkFontMgr_win_gdi_factory.cpp" # WontFix + skia_fontmgr_factory = "src/ports/SkFontMgr_empty_factory.cpp" + } +} + # Our tools require static linking (they use non-exported symbols), and the GPU backend. skia_enable_tools = skia_enable_tools && !is_component_build && skia_enable_gpu diff --git a/chromium/third_party/skia/gn/sksl.gni b/chromium/third_party/skia/gn/sksl.gni index 7653c34304d..104c4af5550 100644 --- a/chromium/third_party/skia/gn/sksl.gni +++ b/chromium/third_party/skia/gn/sksl.gni @@ -7,34 +7,70 @@ _src = get_path_info("../src", "abspath") skia_sksl_sources = [ + "$_src/sksl/SkSLASTFile.h", "$_src/sksl/SkSLASTNode.cpp", + "$_src/sksl/SkSLASTNode.h", "$_src/sksl/SkSLByteCode.cpp", + "$_src/sksl/SkSLByteCode.h", "$_src/sksl/SkSLByteCodeGenerator.cpp", + "$_src/sksl/SkSLByteCodeGenerator.h", "$_src/sksl/SkSLCFGGenerator.cpp", + "$_src/sksl/SkSLCFGGenerator.h", "$_src/sksl/SkSLCompiler.cpp", + "$_src/sksl/SkSLCompiler.h", + "$_src/sksl/SkSLContext.h", + "$_src/sksl/SkSLDefines.h", + "$_src/sksl/SkSLErrorReporter.h", + "$_src/sksl/SkSLExternalValue.h", + "$_src/sksl/SkSLFileOutputStream.h", "$_src/sksl/SkSLIRGenerator.cpp", + "$_src/sksl/SkSLIRGenerator.h", "$_src/sksl/SkSLLexer.cpp", + "$_src/sksl/SkSLLexer.h", + "$_src/sksl/SkSLMemoryLayout.h", + "$_src/sksl/SkSLOutputStream.h", "$_src/sksl/SkSLParser.cpp", + "$_src/sksl/SkSLParser.h", + "$_src/sksl/SkSLPosition.h", "$_src/sksl/SkSLSampleMatrix.cpp", + "$_src/sksl/SkSLSampleMatrix.h", "$_src/sksl/SkSLSectionAndParameterHelper.cpp", + "$_src/sksl/SkSLSectionAndParameterHelper.h", "$_src/sksl/SkSLString.cpp", + "$_src/sksl/SkSLString.h", + "$_src/sksl/SkSLStringStream.h", "$_src/sksl/SkSLUtil.cpp", + "$_src/sksl/SkSLUtil.h", "$_src/sksl/ir/SkSLSetting.cpp", + "$_src/sksl/ir/SkSLSetting.h", "$_src/sksl/ir/SkSLSymbolTable.cpp", + "$_src/sksl/ir/SkSLSymbolTable.h", "$_src/sksl/ir/SkSLType.cpp", + "$_src/sksl/ir/SkSLType.h", "$_src/sksl/ir/SkSLVariableReference.cpp", + "$_src/sksl/ir/SkSLVariableReference.h", ] skia_sksl_gpu_sources = [ "$_src/sksl/SkSLCPPCodeGenerator.cpp", + "$_src/sksl/SkSLCPPCodeGenerator.h", "$_src/sksl/SkSLCPPUniformCTypes.cpp", + "$_src/sksl/SkSLCPPUniformCTypes.h", + "$_src/sksl/SkSLCodeGenerator.h", "$_src/sksl/SkSLGLSLCodeGenerator.cpp", + "$_src/sksl/SkSLGLSLCodeGenerator.h", "$_src/sksl/SkSLHCodeGenerator.cpp", + "$_src/sksl/SkSLHCodeGenerator.h", "$_src/sksl/SkSLMetalCodeGenerator.cpp", + "$_src/sksl/SkSLMetalCodeGenerator.h", "$_src/sksl/SkSLOutputStream.cpp", + "$_src/sksl/SkSLOutputStream.h", "$_src/sksl/SkSLPipelineStageCodeGenerator.cpp", + "$_src/sksl/SkSLPipelineStageCodeGenerator.h", "$_src/sksl/SkSLSPIRVCodeGenerator.cpp", + "$_src/sksl/SkSLSPIRVCodeGenerator.h", "$_src/sksl/SkSLSPIRVtoHLSL.cpp", + "$_src/sksl/SkSLSPIRVtoHLSL.h", ] skia_gpu_processor_sources = [ @@ -53,10 +89,8 @@ skia_gpu_processor_sources = [ "$_src/gpu/effects/GrHSLToRGBFilterEffect.fp", "$_src/gpu/effects/GrLumaColorFilterEffect.fp", "$_src/gpu/effects/GrMagnifierEffect.fp", - "$_src/gpu/effects/GrMatrixEffect.fp", "$_src/gpu/effects/GrMixerEffect.fp", "$_src/gpu/effects/GrOverrideInputFragmentProcessor.fp", - "$_src/gpu/effects/GrPremulInputFragmentProcessor.fp", "$_src/gpu/effects/GrRGBToHSLFilterEffect.fp", "$_src/gpu/effects/GrRRectBlurEffect.fp", "$_src/gpu/effects/GrRectBlurEffect.fp", diff --git a/chromium/third_party/skia/gn/tests.gni b/chromium/third_party/skia/gn/tests.gni index 63354fc526d..70ef573bbcb 100644 --- a/chromium/third_party/skia/gn/tests.gni +++ b/chromium/third_party/skia/gn/tests.gni @@ -15,7 +15,9 @@ tests_sources = [ "$_tests/ApplyGammaTest.cpp", "$_tests/ArenaAllocTest.cpp", "$_tests/AsADashTest.cpp", + "$_tests/BRDTest.cpp", "$_tests/BackendAllocationTest.cpp", + "$_tests/BackendSurfaceMutableStateTest.cpp", "$_tests/BadIcoTest.cpp", "$_tests/BitSetTest.cpp", "$_tests/BitmapCopyTest.cpp", @@ -101,6 +103,7 @@ tests_sources = [ "$_tests/GrCCPRTest.cpp", "$_tests/GrContextAbandonTest.cpp", "$_tests/GrContextFactoryTest.cpp", + "$_tests/GrContextOOM.cpp", "$_tests/GrFinishedFlushTest.cpp", "$_tests/GrMemoryPoolTest.cpp", "$_tests/GrMeshTest.cpp", @@ -111,6 +114,7 @@ tests_sources = [ "$_tests/GrQuadBufferTest.cpp", "$_tests/GrQuadCropTest.cpp", "$_tests/GrStyledShapeTest.cpp", + "$_tests/GrSubmittedFlushTest.cpp", "$_tests/GrSurfaceTest.cpp", "$_tests/GrTAllocatorTest.cpp", "$_tests/GrTRecorderTest.cpp", @@ -182,7 +186,9 @@ tests_sources = [ "$_tests/PaintImageFilterTest.cpp", "$_tests/PaintTest.cpp", "$_tests/ParametricStageTest.cpp", + "$_tests/ParseColorTest.cpp", "$_tests/ParsePathTest.cpp", + "$_tests/PathBuilderTest.cpp", "$_tests/PathCoverageTest.cpp", "$_tests/PathMeasureTest.cpp", "$_tests/PathRendererCacheTests.cpp", @@ -209,7 +215,6 @@ tests_sources = [ "$_tests/RandomTest.cpp", "$_tests/ReadPixelsTest.cpp", "$_tests/ReadWriteAlphaTest.cpp", - "$_tests/Reader32Test.cpp", "$_tests/RecordDrawTest.cpp", "$_tests/RecordOptsTest.cpp", "$_tests/RecordPatternTest.cpp", diff --git a/chromium/third_party/skia/gn/toolchain/BUILD.gn b/chromium/third_party/skia/gn/toolchain/BUILD.gn index 1832835f1ab..45177109462 100644 --- a/chromium/third_party/skia/gn/toolchain/BUILD.gn +++ b/chromium/third_party/skia/gn/toolchain/BUILD.gn @@ -42,9 +42,12 @@ declare_args() { dlsymutil_pool_depth = exec_script("num_cpus.py", [], "value") } +# For 'shell' see https://ninja-build.org/manual.html#ref_rule_command if (host_os == "win") { - stamp = "cmd.exe /c echo >" + shell = "cmd.exe /c " + stamp = "$shell echo >" } else { + shell = "" stamp = "touch" } @@ -64,10 +67,10 @@ toolchain("msvc") { if (target_cpu == "x86") { # Toolchain asset includes a script that configures for x86 building. # We don't support x86 builds with local MSVC installations. - env_setup = "cmd /c $win_sdk/bin/SetEnv.cmd /x86 && " + env_setup = "$shell $win_sdk/bin/SetEnv.cmd /x86 && " } else if (target_cpu == "arm64") { # ARM64 compiler is incomplete - it relies on DLLs located in the host toolchain directory. - env_setup = "cmd /C set \"PATH=%PATH%;$win_vc\\Tools\\MSVC\\$win_toolchain_version\\bin\\HostX64\\x64\" && " + env_setup = "$shell set \"PATH=%PATH%;$win_vc\\Tools\\MSVC\\$win_toolchain_version\\bin\\HostX64\\x64\" && " } cl_m32_flag = "" @@ -266,7 +269,8 @@ template("gcc_like_toolchain") { } else { rspfile = "{{output}}.rsp" rspfile_content = "{{inputs}}" - command = "$ar rcs {{output}} @$rspfile" + rm_py = rebase_path("../rm.py") + command = "$shell python \"$rm_py\" \"{{output}}\" && $ar rcs {{output}} @$rspfile" } outputs = diff --git a/chromium/third_party/skia/gn/utils.gni b/chromium/third_party/skia/gn/utils.gni index 1b968fc3c13..9b181dcb692 100644 --- a/chromium/third_party/skia/gn/utils.gni +++ b/chromium/third_party/skia/gn/utils.gni @@ -81,6 +81,10 @@ skia_utils_sources = [ "$_src/utils/SkWhitelistTypefaces.cpp", #mac + "$_src/utils/mac/SkCGBase.h", + "$_src/utils/mac/SkCGGeometry.h", + "$_src/utils/mac/SkCTFontSmoothBehavior.cpp", + "$_src/utils/mac/SkCTFontSmoothBehavior.h", "$_src/utils/mac/SkCreateCGImageRef.cpp", "$_src/utils/mac/SkUniqueCFRef.h", |