Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 15d5979

Browse files
skia-flutter-autorolleyebrowsoffirejonahwilliams
authored
Roll Skia from dfb838747295 to 9e51c2c9e231 (26 revisions) (#38827)
* Roll Skia from dfb838747295 to 9e51c2c9e231 (26 revisions) https://skia.googlesource.com/skia.git/+log/dfb838747295..9e51c2c9e231 2023-01-12 kjlubick@google.com Roll CanvasKit to 0.38.0 2023-01-12 jonahwilliams@google.com Allow clients to cache sample count and stencil params 2023-01-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 0a9529c8cd2d to 4053bc460f32 (6 revisions) 2023-01-12 herb@google.com Fix stack alignment for SkAutoSTArray 2023-01-12 kjlubick@google.com Remove SkBudgeted in favor of skgpu::Budgeted 2023-01-12 johnstiles@google.com Implement comma operator in RP codegen. 2023-01-12 johnstiles@google.com Allow cloning from another stack with an offset-from-top. 2023-01-12 fmalita@chromium.org [skottie] Initial text editing experiment 2023-01-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 46e3e213b046 to 1f9e50edd4d4 (9 revisions) 2023-01-12 kjlubick@google.com [base] Fold GrConfig.h into SkTypes.h 2023-01-12 kjlubick@google.com Break out metal headers used by C++ and ObjC code 2023-01-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll SK Tool from 77e7d61086a2 to 65176286ea26 2023-01-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 154fb3872c36 to 0a9529c8cd2d (9 revisions) 2023-01-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from eab5947427ad to 410d8ba51f95 (17 revisions) 2023-01-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Skia Infra from 8bedae1a44a2 to 77e7d61086a2 (4 revisions) 2023-01-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll Dawn from 410b5acc7f3f to 46e3e213b046 (14 revisions) 2023-01-12 kyslov@google.com jpegr codec: get image origin from EXIF metadata 2023-01-12 ccameron@chromium.org Enable Jpeg gainmaps on Android 2023-01-11 johnstiles@google.com Add transpose support to RP codegen. 2023-01-11 johnstiles@google.com Add transpose support to the RP builder. 2023-01-11 jvanverth@google.com Some fixes to address null color attachment crash. 2023-01-11 johnstiles@google.com Create a RP transpose op, based on swizzle. 2023-01-11 kjlubick@google.com Remove two shim files 2023-01-11 kjlubick@google.com [canvaskit] Fix return value of Paragraph ranges 2023-01-11 kjlubick@google.com Disable JpegGainmapTest on WASM build 2023-01-11 skia-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 93e4d1cd4725 to 154fb3872c36 (2 revisions) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC aaclarke@google.com,herb@google.com,jacksongardner@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md * Adjust to changes to CanvasKit getRectsForRange API. * remove unused commit * Roll CIPD CanvasKit and fix some unit tests. * Adjustments to direction API and unit tests. Co-authored-by: Jackson Gardner <jacksongardner@google.com> Co-authored-by: jonahwilliams <jonahwilliams@google.com>
1 parent f3f0536 commit 15d5979

File tree

7 files changed

+40
-33
lines changed

7 files changed

+40
-33
lines changed

DEPS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ vars = {
1818
'llvm_git': 'https://llvm.googlesource.com',
1919
# OCMock is for testing only so there is no google clone
2020
'ocmock_git': 'https://github.com/erikdoe/ocmock.git',
21-
'skia_revision': 'dfb838747295b9109343e6f536b25e9fa3fe933e',
21+
'skia_revision': '9e51c2c9e231cf1350a476c2b1695066144593ce',
2222

2323
# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
2424
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
25-
'canvaskit_cipd_instance': 'ztaLvbs5GPmlAwUosC7VVp7EQnNVknRpNuKdv7vmzaAC',
25+
'canvaskit_cipd_instance': '61aeJQ9laGfEFF_Vlc_u0MCkqB6xb2hAYHRBxKH-Uw4C',
2626

2727
# Do not download the Emscripten SDK by default.
2828
# This prevents us from downloading the Emscripten toolchain for builds

ci/licenses_golden/licenses_skia

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: fa9e0cdd5cd2189db5a01faa94515a3d
1+
Signature: 6fb22ea5d126038c1276ad346f1fb34b
22

33
====================================================================================================
44
LIBRARY: etc1
@@ -1216,7 +1216,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12161216

12171217
====================================================================================================
12181218
LIBRARY: skia
1219-
ORIGIN: ../../../third_party/skia/include/gpu/GrConfig.h + ../../../third_party/skia/LICENSE
12201219
ORIGIN: ../../../third_party/skia/include/gpu/GrTypes.h + ../../../third_party/skia/LICENSE
12211220
ORIGIN: ../../../third_party/skia/src/core/SkImageInfo.cpp + ../../../third_party/skia/LICENSE
12221221
ORIGIN: ../../../third_party/skia/src/core/SkRasterClip.cpp + ../../../third_party/skia/LICENSE
@@ -1239,7 +1238,6 @@ ORIGIN: ../../../third_party/skia/src/gpu/ganesh/geometry/GrRect.h + ../../../th
12391238
ORIGIN: ../../../third_party/skia/src/ports/SkDebug_win.cpp + ../../../third_party/skia/LICENSE
12401239
ORIGIN: ../../../third_party/skia/src/text/gpu/Glyph.h + ../../../third_party/skia/LICENSE
12411240
TYPE: LicenseType.bsd
1242-
FILE: ../../../third_party/skia/include/gpu/GrConfig.h
12431241
FILE: ../../../third_party/skia/include/gpu/GrTypes.h
12441242
FILE: ../../../third_party/skia/src/core/SkImageInfo.cpp
12451243
FILE: ../../../third_party/skia/src/core/SkRasterClip.cpp
@@ -8924,15 +8922,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
89248922

89258923
====================================================================================================
89268924
LIBRARY: skia
8927-
ORIGIN: ../../../third_party/skia/include/private/SkDeque.h + ../../../third_party/skia/LICENSE
89288925
ORIGIN: ../../../third_party/skia/include/private/SkMalloc.h + ../../../third_party/skia/LICENSE
8929-
ORIGIN: ../../../third_party/skia/include/private/SkTo.h + ../../../third_party/skia/LICENSE
89308926
ORIGIN: ../../../third_party/skia/src/core/SkDiscardableMemory.h + ../../../third_party/skia/LICENSE
89318927
ORIGIN: ../../../third_party/skia/src/core/SkFloatingPoint.cpp + ../../../third_party/skia/LICENSE
89328928
TYPE: LicenseType.bsd
8933-
FILE: ../../../third_party/skia/include/private/SkDeque.h
89348929
FILE: ../../../third_party/skia/include/private/SkMalloc.h
8935-
FILE: ../../../third_party/skia/include/private/SkTo.h
89368930
FILE: ../../../third_party/skia/src/core/SkDiscardableMemory.h
89378931
FILE: ../../../third_party/skia/src/core/SkFloatingPoint.cpp
89388932
----------------------------------------------------------------------------------------------------

lib/web_ui/dev/canvaskit_lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Specifies the version of CanvasKit to use for Flutter Web apps.
22
#
33
# See `lib/web_ui/README.md` for how to update this file.
4-
canvaskit_version: "0.37.1"
4+
canvaskit_version: "0.38.0"

lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2167,6 +2167,16 @@ extension SkLineMetricsExtension on SkLineMetrics {
21672167
external double get lineNumber;
21682168
}
21692169

2170+
@JS()
2171+
@anonymous
2172+
@staticInterop
2173+
class SkRectWithDirection {}
2174+
2175+
extension SkRectWithDirectionExtension on SkRectWithDirection {
2176+
external Float32List rect;
2177+
external SkTextDirection dir;
2178+
}
2179+
21702180
@JS()
21712181
@anonymous
21722182
@staticInterop
@@ -2182,13 +2192,13 @@ extension SkParagraphExtension on SkParagraph {
21822192
external double getMaxIntrinsicWidth();
21832193
external double getMinIntrinsicWidth();
21842194
external double getMaxWidth();
2185-
external /* List<Float32List> */ List<Object?> getRectsForRange(
2195+
external /* List<SkRectWithDirection> */ List<Object?> getRectsForRange(
21862196
int start,
21872197
int end,
21882198
SkRectHeightStyle heightStyle,
21892199
SkRectWidthStyle widthStyle,
21902200
);
2191-
external /* List<Float32List> */ List<Object?> getRectsForPlaceholders();
2201+
external /* List<SkRectWithDirection> */ List<Object?> getRectsForPlaceholders();
21922202
external SkTextPosition getGlyphPositionAtCoordinate(
21932203
double x,
21942204
double y,

lib/web_ui/lib/src/engine/canvaskit/text.dart

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import 'dart:typed_data';
77
import 'package:meta/meta.dart';
88
import 'package:ui/ui.dart' as ui;
99

10-
import '../safe_browser_api.dart';
1110
import '../util.dart';
1211
import 'canvaskit_api.dart';
1312
import 'font_fallbacks.dart';
@@ -631,7 +630,7 @@ class CkParagraph extends SkiaObject<SkParagraph> implements ui.Paragraph {
631630
_width = paragraph.getMaxWidth();
632631
_boxesForPlaceholders =
633632
skRectsToTextBoxes(
634-
paragraph.getRectsForPlaceholders().cast<Float32List>());
633+
paragraph.getRectsForPlaceholders().cast<SkRectWithDirection>());
635634
} catch (e) {
636635
printWarning('CanvasKit threw an exception while laying '
637636
'out the paragraph. The font was "${_paragraphStyle._fontFamily}". '
@@ -732,23 +731,23 @@ class CkParagraph extends SkiaObject<SkParagraph> implements ui.Paragraph {
732731
}
733732

734733
final SkParagraph paragraph = _ensureInitialized(_lastLayoutConstraints!);
735-
final List<Float32List> skRects = paragraph.getRectsForRange(
734+
final List<SkRectWithDirection> skRects = paragraph.getRectsForRange(
736735
start,
737736
end,
738737
toSkRectHeightStyle(boxHeightStyle),
739738
toSkRectWidthStyle(boxWidthStyle),
740-
).cast<Float32List>();
739+
).cast<SkRectWithDirection>();
741740

742741
return skRectsToTextBoxes(skRects);
743742
}
744743

745-
List<ui.TextBox> skRectsToTextBoxes(List<Float32List> skRects) {
744+
List<ui.TextBox> skRectsToTextBoxes(List<SkRectWithDirection> skRects) {
746745
final List<ui.TextBox> result = <ui.TextBox>[];
747746

748747
for (int i = 0; i < skRects.length; i++) {
749-
final Float32List rect = skRects[i];
750-
final int skTextDirection =
751-
getJsProperty(getJsProperty(rect, 'direction'), 'value');
748+
final SkRectWithDirection skRect = skRects[i];
749+
final Float32List rect = skRect.rect;
750+
final int skTextDirection = skRect.dir.value.toInt();
752751
result.add(ui.TextBox.fromLTRBD(
753752
rect[0],
754753
rect[1],

lib/web_ui/lib/src/engine/configuration.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import 'dom.dart';
5151
/// The version of CanvasKit used by the web engine by default.
5252
// DO NOT EDIT THE NEXT LINE OF CODE MANUALLY
5353
// See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
54-
const String _canvaskitVersion = '0.37.1';
54+
const String _canvaskitVersion = '0.38.0';
5555

5656
/// The Web Engine configuration for the current application.
5757
FlutterConfiguration get configuration =>

lib/web_ui/test/canvaskit/canvaskit_api_test.dart

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,8 +1669,14 @@ void _paragraphTests() {
16691669
expectAlmost(paragraph.getMaxIntrinsicWidth(), 263);
16701670
expectAlmost(paragraph.getMinIntrinsicWidth(), 135);
16711671
expectAlmost(paragraph.getMaxWidth(), 500);
1672+
final SkRectWithDirection rectWithDirection =
1673+
paragraph.getRectsForRange(
1674+
1,
1675+
3,
1676+
canvasKit.RectHeightStyle.Tight,
1677+
canvasKit.RectWidthStyle.Max).single! as SkRectWithDirection;
16721678
expect(
1673-
paragraph.getRectsForRange(1, 3, canvasKit.RectHeightStyle.Tight, canvasKit.RectWidthStyle.Max).single,
1679+
rectWithDirection.rect,
16741680
hasLength(4),
16751681
);
16761682
expect(paragraph.getRectsForPlaceholders(), hasLength(1));
@@ -1739,17 +1745,15 @@ void _paragraphTests() {
17391745
final SkParagraph paragraph = builder.build();
17401746
paragraph.layout(500);
17411747

1742-
expect(
1743-
paragraph.getRectsForRange(
1744-
0,
1745-
1,
1746-
canvasKit.RectHeightStyle.Strut,
1747-
canvasKit.RectWidthStyle.Tight,
1748-
),
1749-
<List<double>>[
1750-
<double>[0, 0, 13.770000457763672, 75],
1751-
],
1752-
);
1748+
final List<SkRectWithDirection> rects = paragraph.getRectsForRange(
1749+
0,
1750+
1,
1751+
canvasKit.RectHeightStyle.Strut,
1752+
canvasKit.RectWidthStyle.Tight,
1753+
).cast<SkRectWithDirection>();
1754+
expect(rects.length, 1);
1755+
final SkRectWithDirection rect = rects.first;
1756+
expect(rect.rect, <double>[0, 0, 13.770000457763672, 75]);
17531757
});
17541758

17551759
test('TextHeightBehavior', () {

0 commit comments

Comments
 (0)