Skip to content

Commit

Permalink
Merge branch 'main' into skwasm_scene
Browse files Browse the repository at this point in the history
  • Loading branch information
eyebrowsoffire committed Apr 10, 2023
2 parents 6a41070 + 664d96b commit 2d52b90
Show file tree
Hide file tree
Showing 36 changed files with 569 additions and 384 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@04df1262e6247151b5ac09cd2c303ac36ad3f62b
uses: github/codeql-action/upload-sarif@d186a2a36cc67bfa1b860e6170d37fb9634742c7
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/third_party_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@04df1262e6247151b5ac09cd2c303ac36ad3f62b
uses: github/codeql-action/upload-sarif@d186a2a36cc67bfa1b860e6170d37fb9634742c7
with:
sarif_file: osvReport.sarif
20 changes: 10 additions & 10 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ vars = {
'llvm_git': 'https://llvm.googlesource.com',
# OCMock is for testing only so there is no google clone
'ocmock_git': 'https://github.com/erikdoe/ocmock.git',
'skia_revision': '557d71a445acf27a5154575bd5862df1671708de',
'skia_revision': '7635aa1d11c238dbb641242c2667ce64d1bf0d60',

# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
Expand Down Expand Up @@ -48,7 +48,7 @@ vars = {
# Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS
# You can use //tools/dart/create_updated_flutter_deps.py to produce
# updated revision list of existing dependencies.
'dart_revision': '36ace2c92e0ac43c1274450026a7ede1ca5f740d',
'dart_revision': '0c85a16bac6d93810c724b16258462e7a57261d3',

# WARNING: DO NOT EDIT MANUALLY
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py
Expand All @@ -58,12 +58,12 @@ vars = {
'dart_browser_launcher_rev': 'ba4e02851d2e3d5b2889c6b44f6189baea584ce1',
'dart_clock_rev': '93d9f56106fdba330bc8fade194038a5561ec730',
'dart_collection_rev': '9db854d03529ccf8d0d665868ded65a4c1403c0f',
'dart_devtools_rev': '0d0b7c113bf7bde43181564820d56bd95173ff94',
'dart_devtools_rev': '026f0adf03725fbab24d601ac74c811808f258e5',
'dart_libprotobuf_rev': '24487dd1045c7f3d64a21f38a3f0c06cc4cf2edb',
'dart_perfetto_rev': 'b8da07095979310818f0efde2ef3c69ea70d62c5',
'dart_protobuf_gn_rev': 'f872f05cb0378eef9a7a2609076929f0f35b4141',
'dart_protobuf_rev': 'b90a4c44d56075eb23ee38ae56ce0febfd7f280f',
'dart_pub_rev': '196e89e5716d64b2954021e6ac9bb5a20d975fc6',
'dart_pub_rev': '3e2c92a8bb74935302de52b80b870bf66963756d',
'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50',
'dart_watcher_rev': '00aa79b0ff5562c9dafb0525891e2e69c51be06d',
'dart_webdev_rev': 'e887316c2352524baaf3b2e5aadd15ba0773edf6',
Expand Down Expand Up @@ -272,7 +272,7 @@ deps = {
Var('github_git') + '/google/flatbuffers.git' + '@' + '0a80646371179f8a7a5c1f42c31ee1d44dcf6709',

'src/third_party/icu':
Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '7698bff409f232537fb6e621a430500c0a81682f',
Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'd8daa943f64cd5dd2a55e9baf2e655ab4bfa5ae9',

'src/third_party/khronos':
Var('chromium_git') + '/chromium/src/third_party/khronos.git' + '@' + '676d544d2b8f48903b7da9fceffaa534a5613978',
Expand Down Expand Up @@ -314,7 +314,7 @@ deps = {
Var('chromium_git') + '/external/github.com/WebAssembly/binaryen.git@b9b5f162ca8bf5b899ff0f0351491d7d403d7ed9',

'src/third_party/dart/third_party/devtools':
{'packages': [{'version': 'git_revision:0d0b7c113bf7bde43181564820d56bd95173ff94', 'package': 'dart/third_party/flutter/devtools'}], 'dep_type': 'cipd'},
{'packages': [{'version': 'git_revision:026f0adf03725fbab24d601ac74c811808f258e5', 'package': 'dart/third_party/flutter/devtools'}], 'dep_type': 'cipd'},

'src/third_party/dart/third_party/pkg/args':
Var('dart_git') + '/args.git@5ac2ba1d93f037c7aee2975703bf071f88597a76',
Expand Down Expand Up @@ -350,7 +350,7 @@ deps = {
Var('dart_git') + '/csslib.git@5836863a4e73da8fb88b9a65901eb653339b1196',

'src/third_party/dart/third_party/pkg/dart_style':
Var('dart_git') + '/dart_style.git@568333db2650e77c0f96ebc77969c9469cf514f0',
Var('dart_git') + '/dart_style.git@33efb2560c62b7b7bf330009cd757495b0e1456a',

'src/third_party/dart/third_party/pkg/dartdoc':
Var('dart_git') + '/dartdoc.git@1a7952b13858ed307185a28f9b4ea861c0abb1c5',
Expand Down Expand Up @@ -386,7 +386,7 @@ deps = {
Var('dart_git') + '/json_rpc_2.git@5da270592006e4d43fd5a6ac736829f955881240',

'src/third_party/dart/third_party/pkg/linter':
Var('dart_git') + '/linter.git@b56190503725de2125b626ff1b3423192fa1f7ae',
Var('dart_git') + '/linter.git@c0942721fcc1feeff278f95626cb5d27a654301e',

'src/third_party/dart/third_party/pkg/logging':
Var('dart_git') + '/logging.git@787030a2b3d0d5d53ce57f1c7dc74f27ecb07b0b',
Expand Down Expand Up @@ -832,7 +832,7 @@ deps = {
'packages': [
{
'package': 'fuchsia/sdk/core/mac-amd64',
'version': 'f16HBH4MJdaKy7HlfDR0naUyEH1SZ0DUJINh2WDEYaYC'
'version': 'fYBjzwm0fO7kzBMlyCfH-qIn9nXuswFtsRZM2V1iikAC'
}
],
'condition': 'host_os == "mac" and not download_fuchsia_sdk',
Expand All @@ -842,7 +842,7 @@ deps = {
'packages': [
{
'package': 'fuchsia/sdk/core/linux-amd64',
'version': 'rQKj0gZPJNATiErM86LM5BALaHqREfrozRBvIuYO9u0C'
'version': 'P15HfBhD19GOwL0lzTL9wwfWmEv8KUWOg6Krsav-HeUC'
}
],
'condition': 'host_os == "linux" and not download_fuchsia_sdk',
Expand Down
2 changes: 2 additions & 0 deletions ci/licenses_golden/excluded_files
Original file line number Diff line number Diff line change
Expand Up @@ -2593,6 +2593,7 @@
../../../third_party/skia/fuzz/README.md
../../../third_party/skia/gn/BUILD.bazel
../../../third_party/skia/gn/__init__.py
../../../third_party/skia/gn/bazel_build.py
../../../third_party/skia/gn/call.py
../../../third_party/skia/gn/checkdir.py
../../../third_party/skia/gn/codesign_ios.py
Expand Down Expand Up @@ -2801,6 +2802,7 @@
../../../third_party/skia/src/pathops/BUILD.bazel
../../../third_party/skia/src/pdf/BUILD.bazel
../../../third_party/skia/src/ports/BUILD.bazel
../../../third_party/skia/src/ports/fontations/BUILD.bazel
../../../third_party/skia/src/sfnt/BUILD.bazel
../../../third_party/skia/src/shaders/BUILD.bazel
../../../third_party/skia/src/shaders/gradients/BUILD.bazel
Expand Down
4 changes: 1 addition & 3 deletions ci/licenses_golden/licenses_fuchsia
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Signature: a57b45b6f9cae417a50db00de7755852
Signature: 6223c2269ce52a64e24a9b227c951cd2

====================================================================================================
LIBRARY: fuchsia_sdk
Expand Down Expand Up @@ -2245,7 +2245,6 @@ ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.io/file2.fidl + ../../../fuchsia
ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.io/io.fidl + ../../../fuchsia/sdk/linux/LICENSE
ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.io/node-protocols.fidl + ../../../fuchsia/sdk/linux/LICENSE
ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.io/node2.fidl + ../../../fuchsia/sdk/linux/LICENSE
ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.io/rights-request.fidl + ../../../fuchsia/sdk/linux/LICENSE
ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.kernel/kernel-counter.fidl + ../../../fuchsia/sdk/linux/LICENSE
ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.kernel/kernel-debug.fidl + ../../../fuchsia/sdk/linux/LICENSE
ORIGIN: ../../../fuchsia/sdk/linux/fidl/fuchsia.kernel/kernel-stats.fidl + ../../../fuchsia/sdk/linux/LICENSE
Expand Down Expand Up @@ -2566,7 +2565,6 @@ FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.io/file2.fidl
FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.io/io.fidl
FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.io/node-protocols.fidl
FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.io/node2.fidl
FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.io/rights-request.fidl
FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.kernel/kernel-counter.fidl
FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.kernel/kernel-debug.fidl
FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.kernel/kernel-stats.fidl
Expand Down
16 changes: 9 additions & 7 deletions ci/licenses_golden/licenses_skia
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Signature: cfc62da1662358812ed5c4e4991bba84
Signature: cdea7059d6c6d6bf47a9c0508ea988d5

====================================================================================================
LIBRARY: etc1
Expand Down Expand Up @@ -1073,7 +1073,6 @@ ORIGIN: ../../../third_party/skia/src/core/SkPtrRecorder.h + ../../../third_part
ORIGIN: ../../../third_party/skia/src/core/SkStroke.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/core/SkWriter32.h + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/ports/SkFontMgr_empty_factory.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/ports/SkImageEncoder_CG.cpp + ../../../third_party/skia/LICENSE
TYPE: LicenseType.bsd
FILE: ../../../third_party/skia/include/core/SkMallocPixelRef.h
FILE: ../../../third_party/skia/include/core/SkPixelRef.h
Expand All @@ -1089,7 +1088,6 @@ FILE: ../../../third_party/skia/src/core/SkPtrRecorder.h
FILE: ../../../third_party/skia/src/core/SkStroke.cpp
FILE: ../../../third_party/skia/src/core/SkWriter32.h
FILE: ../../../third_party/skia/src/ports/SkFontMgr_empty_factory.cpp
FILE: ../../../third_party/skia/src/ports/SkImageEncoder_CG.cpp
----------------------------------------------------------------------------------------------------
Copyright 2008 The Android Open Source Project

Expand Down Expand Up @@ -1516,7 +1514,6 @@ ORIGIN: ../../../third_party/skia/src/pdf/SkPDFTypes.cpp + ../../../third_party/
ORIGIN: ../../../third_party/skia/src/pdf/SkPDFUtils.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/pdf/SkPDFUtils.h + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/ports/SkGlobalInitialization_default.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/ports/SkImageEncoder_WIC.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/ports/SkMemory_malloc.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/ports/SkScalerContext_win_dw.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/shaders/SkBitmapProcShader.cpp + ../../../third_party/skia/LICENSE
Expand Down Expand Up @@ -1701,7 +1698,6 @@ FILE: ../../../third_party/skia/src/pdf/SkPDFTypes.cpp
FILE: ../../../third_party/skia/src/pdf/SkPDFUtils.cpp
FILE: ../../../third_party/skia/src/pdf/SkPDFUtils.h
FILE: ../../../third_party/skia/src/ports/SkGlobalInitialization_default.cpp
FILE: ../../../third_party/skia/src/ports/SkImageEncoder_WIC.cpp
FILE: ../../../third_party/skia/src/ports/SkMemory_malloc.cpp
FILE: ../../../third_party/skia/src/ports/SkScalerContext_win_dw.cpp
FILE: ../../../third_party/skia/src/shaders/SkBitmapProcShader.cpp
Expand Down Expand Up @@ -8336,7 +8332,7 @@ ORIGIN: ../../../third_party/skia/src/gpu/graphite/ClearBuffersTask.cpp + ../../
ORIGIN: ../../../third_party/skia/src/gpu/graphite/ClearBuffersTask.h + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/graphite/ClientMappedBufferManager.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/graphite/ClientMappedBufferManager.h + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/graphite/ClipStack.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/graphite/ClipStack_graphite.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/graphite/ClipStack_graphite.h + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/graphite/CommandTypes.h + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/graphite/ComputePipeline.cpp + ../../../third_party/skia/LICENSE
Expand Down Expand Up @@ -8558,7 +8554,7 @@ FILE: ../../../third_party/skia/src/gpu/graphite/ClearBuffersTask.cpp
FILE: ../../../third_party/skia/src/gpu/graphite/ClearBuffersTask.h
FILE: ../../../third_party/skia/src/gpu/graphite/ClientMappedBufferManager.cpp
FILE: ../../../third_party/skia/src/gpu/graphite/ClientMappedBufferManager.h
FILE: ../../../third_party/skia/src/gpu/graphite/ClipStack.cpp
FILE: ../../../third_party/skia/src/gpu/graphite/ClipStack_graphite.cpp
FILE: ../../../third_party/skia/src/gpu/graphite/ClipStack_graphite.h
FILE: ../../../third_party/skia/src/gpu/graphite/CommandTypes.h
FILE: ../../../third_party/skia/src/gpu/graphite/ComputePipeline.cpp
Expand Down Expand Up @@ -9005,13 +9001,16 @@ ORIGIN: ../../../third_party/skia/src/gpu/graphite/compute/ComputeStep.h + ../..
ORIGIN: ../../../third_party/skia/src/gpu/graphite/compute/DispatchGroup.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/graphite/compute/DispatchGroup.h + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/graphite/geom/EdgeAAQuad.h + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/graphite/vk/VulkanSampler.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/gpu/graphite/vk/VulkanSampler.h + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/image/SkImage_AndroidFactories.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/image/SkImage_Base.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/image/SkImage_LazyFactories.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/image/SkImage_Raster.h + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/image/SkImage_RasterFactories.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/image/SkSurface_Base.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/image/SkSurface_Null.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/ports/fontations/src/main.rs + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/sksl/analysis/SkSLGetLoopControlFlowInfo.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/sksl/analysis/SkSLGetReturnComplexity.cpp + ../../../third_party/skia/LICENSE
ORIGIN: ../../../third_party/skia/src/sksl/analysis/SkSLIsDynamicallyUniformExpression.cpp + ../../../third_party/skia/LICENSE
Expand Down Expand Up @@ -9075,13 +9074,16 @@ FILE: ../../../third_party/skia/src/gpu/graphite/compute/ComputeStep.h
FILE: ../../../third_party/skia/src/gpu/graphite/compute/DispatchGroup.cpp
FILE: ../../../third_party/skia/src/gpu/graphite/compute/DispatchGroup.h
FILE: ../../../third_party/skia/src/gpu/graphite/geom/EdgeAAQuad.h
FILE: ../../../third_party/skia/src/gpu/graphite/vk/VulkanSampler.cpp
FILE: ../../../third_party/skia/src/gpu/graphite/vk/VulkanSampler.h
FILE: ../../../third_party/skia/src/image/SkImage_AndroidFactories.cpp
FILE: ../../../third_party/skia/src/image/SkImage_Base.cpp
FILE: ../../../third_party/skia/src/image/SkImage_LazyFactories.cpp
FILE: ../../../third_party/skia/src/image/SkImage_Raster.h
FILE: ../../../third_party/skia/src/image/SkImage_RasterFactories.cpp
FILE: ../../../third_party/skia/src/image/SkSurface_Base.cpp
FILE: ../../../third_party/skia/src/image/SkSurface_Null.cpp
FILE: ../../../third_party/skia/src/ports/fontations/src/main.rs
FILE: ../../../third_party/skia/src/sksl/analysis/SkSLGetLoopControlFlowInfo.cpp
FILE: ../../../third_party/skia/src/sksl/analysis/SkSLGetReturnComplexity.cpp
FILE: ../../../third_party/skia/src/sksl/analysis/SkSLIsDynamicallyUniformExpression.cpp
Expand Down
2 changes: 1 addition & 1 deletion ci/licenses_golden/licenses_third_party
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Signature: ebfbb865c0d379c6f6a67c729bd472ee
Signature: 1508e5e502e910e32403bc9d0801d291

====================================================================================================
LIBRARY: angle
Expand Down
3 changes: 3 additions & 0 deletions common/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ declare_args() {

# Whether to build host-side development artifacts.
flutter_build_engine_artifacts = true

# Whether to include backtrace support.
enable_backtrace = true
}

# feature_defines_list ---------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion flow/layer_snapshot_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
#include "flutter/fml/logging.h"
#include "flutter/fml/time/time_delta.h"

#include "third_party/skia/include/core/SkImageEncoder.h"
#include "third_party/skia/include/core/SkData.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
#include "third_party/skia/include/core/SkRect.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkSerialProcs.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/core/SkSurfaceCharacterization.h"
Expand Down
5 changes: 3 additions & 2 deletions flow/layers/offscreen_surface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

#include "flutter/flow/layers/offscreen_surface.h"

#include "third_party/skia/include/core/SkImageEncoder.h"
#include "third_party/skia/include/core/SkColorSpace.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
#include "third_party/skia/include/core/SkPixmap.h"
#include "third_party/skia/include/core/SkSerialProcs.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/core/SkSurfaceCharacterization.h"
#include "third_party/skia/include/utils/SkBase64.h"

Expand Down
3 changes: 3 additions & 0 deletions flow/layers/offscreen_surface.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

#include "flutter/display_list/dl_canvas.h"
#include "flutter/display_list/skia/dl_sk_canvas.h"
#include "third_party/skia/include/core/SkData.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkSize.h"
#include "third_party/skia/include/core/SkSurface.h"

class GrDirectContext;
Expand Down
4 changes: 2 additions & 2 deletions fml/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ source_set("fml") {
"wakeable.h",
]

if (is_mac || is_linux || is_win || (is_ios && is_debug)) {
if (enable_backtrace) {
sources += [ "backtrace.cc" ]
} else {
sources += [ "backtrace_stub.cc" ]
Expand All @@ -116,7 +116,7 @@ source_set("fml") {
"//third_party/icu",
]

if (is_mac || is_linux || is_win || (is_ios && is_debug)) {
if (enable_backtrace) {
# This abseil dependency is only used by backtrace.cc.
deps += [ "//third_party/abseil-cpp/absl/debugging:symbolize" ]
}
Expand Down
20 changes: 6 additions & 14 deletions impeller/entity/shaders/gaussian_blur/gaussian_blur.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,13 @@ void main() {

for (float16_t i = -blur_info.blur_radius; i <= blur_info.blur_radius;
i += 2.0hf) {
float16_t w1 = IPGaussian(i, blur_info.blur_sigma);
float16_t w2 = IPGaussian(i + 1.0hf, blur_info.blur_sigma);
float16_t gaussian = w1 + w2;

f16vec2 offset_1 = blur_info.blur_uv_offset * i;
f16vec2 offset_2 = offset_1 + blur_info.blur_uv_offset;
vec2 pos_c1 = v_texture_coords + offset_1;
vec2 pos_c2 = v_texture_coords + offset_2;

vec2 coords = (w1 * pos_c1 + w2 * pos_c2) / gaussian;

float16_t gaussian = IPGaussian(i, blur_info.blur_sigma);
gaussian_integral += gaussian;
total_color += gaussian * Sample(texture_sampler, // sampler
coords // texture coordinates
);
total_color +=
gaussian * Sample(texture_sampler, // sampler
v_texture_coords + blur_info.blur_uv_offset *
i // texture coordinates
);
}

frag_color = total_color / gaussian_integral;
Expand Down
4 changes: 2 additions & 2 deletions impeller/toolkit/egl/display.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ std::unique_ptr<Config> Display::ChooseConfig(ConfigDescriptor config) const {
if (sample_count > 1) {
attributes.push_back(EGL_SAMPLE_BUFFERS);
attributes.push_back(1);
attributes.push_back(EGL_SAMPLES);
attributes.push_back(sample_count);
}
attributes.push_back(EGL_SAMPLES);
attributes.push_back(sample_count);
}

// termination sentinel must be present.
Expand Down

0 comments on commit 2d52b90

Please sign in to comment.