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

[Impeller] remove SDF code paths. #41754

Merged
merged 5 commits into from
May 5, 2023

Conversation

jonahwilliams
Copy link
Contributor

From my investigations, we're not likely to be able to use SDF in the near term. To make planned refactors of the text rendering easier to land, I've moved the primary piece of code for generating the SDFs into a new TU for testing.

The shader itself has been deleted so that we don't ship + register it.

@jonahwilliams jonahwilliams requested a review from dnfield May 4, 2023 23:31
@dnfield
Copy link
Contributor

dnfield commented May 4, 2023

Why not just delete it entirely? It'll be in the git history if we really need it.

@jonahwilliams
Copy link
Contributor Author

I was keeping it around for youuuu 😂. Deleting sgtm

@jonahwilliams jonahwilliams changed the title [Impeller] remove SDF code paths to test only [Impeller] remove SDF code paths. May 5, 2023
@jonahwilliams jonahwilliams added waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. autosubmit Merge PR when tree becomes green via auto submit App labels May 5, 2023
@auto-submit auto-submit bot merged commit 6e4a9b3 into flutter:main May 5, 2023
@jonahwilliams jonahwilliams deleted the text_atlas_refactor branch May 5, 2023 23:45
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 6, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 6, 2023
…126188)

flutter/engine@b7c79b4...332f532

2023-05-06 [email protected] Roll Skia from bc0197405951 to 2e622658996c (1 revision) (flutter/engine#41789)
2023-05-05 [email protected] [Impeller] remove SDF code paths. (flutter/engine#41754)
2023-05-05 [email protected] Roll Fuchsia Linux SDK from jbpFz7qSikrKiRanC... to leCRDVJ8szOS2LsPV... (flutter/engine#41788)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from jbpFz7qSikrK to leCRDVJ8szOS

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

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
auto-submit bot pushed a commit that referenced this pull request May 10, 2023
Creates a separate atlas context and cache for color and alpha bitmap glyphs. Removes SDF shader and uses separate shader for full color glyphs.

Requires #41754

Fixes flutter/flutter#116818
Fixes flutter/flutter#126101

This also fixes #39383 but for light text on a dark background. This problem crops up when we switch to a full color atlas. In this context, the chosen glyph color is important. But with the alpha channel only atlas, its irrelevant.

See diff:

![image](https://user-images.githubusercontent.com/8975114/236598809-f4434764-cd16-4489-9644-4e9a370de7ee.png)

Example app:

```dart
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

void main() =>
  runApp(
    Container(
      alignment: Alignment.center,
     child: Text(
      '''
 (Unicode Conference)� ا�ذ� س�ع�د �� 10-12 آذار 1997 ب�د��ة ��ا����ت�س� أ��ا��ا. � س�ج�ع ا��ؤت�ر ب�� خبراء �� �ا�ة �طاعات ا�ص�اعة ع�� ا�شب�ة ا�عا���ة ا�تر��ت �������د� ح�ث ستت�� ع�� ا�صع�د�� ا�د��� �ا��ح�� ع�� حد س�اء ��ا�شة سب� استخدا� �����د �� ا��ظ� ا��ائ�ة ����ا �خص ا�تطب��ات ا�حاس�ب�ة� ا�خط�ط� تص��� ا��ص�ص �ا�ح�سبة �تعددة ا��غات.

������������� � � � �''',
textDirection: TextDirection.rtl, style: TextStyle(fontSize: 24, color: Colors.white),
     ),
    ),
  );

```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants