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

Conversation

@yjbanov
Copy link
Contributor

@yjbanov yjbanov commented Jan 12, 2022

Only paint text into canvas if there is already a canvas. Do not create a canvas just for text.

This PR includes some clean-ups:

  • Replace CanvasPool.isEmpty/isNotEmpty with hasCanvas (the pool can be full of canvases and still return true from isEmpty, which is surprising).
  • Rename drawOnCanvas to canDrawOnCanvas.

Fixes flutter/flutter#96498

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Jan 12, 2022
@flutter-dashboard

This comment was marked as outdated.

@skia-gold

This comment was marked as outdated.

@flutter-dashboard

This comment was marked as outdated.

Copy link
Contributor

@eyebrowsoffire eyebrowsoffire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@skia-gold
Copy link

Gold has detected about 7 new digest(s) on patchset 1.
View them at https://flutter-engine-gold.skia.org/cl/github/30804

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #30804 at sha 23e3f7d

@ditman ditman added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Apr 18, 2022
Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed goldens too. Most of them were related to text anti-aliasing (as usual) and shadow rendering. One of the golden tests for span backgrounds showed a small artifact (only with large fonts), seemed like a browser rounding error:

Screen Shot 2022-04-18 at 11 56 23 AM

@fluttergithubbot fluttergithubbot merged commit cd81d43 into flutter:main Apr 18, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 18, 2022
justinmc pushed a commit to justinmc/engine that referenced this pull request Apr 20, 2022
CaseyHillers pushed a commit to CaseyHillers/engine that referenced this pull request Apr 22, 2022
CaseyHillers pushed a commit that referenced this pull request Apr 22, 2022
…es (#32867)

* [web] do not allocate canvases just for text (#30804)

* [web:a11y] fix traversal and hit-test orders (#32712)

* [web:a11y] implement traversal and hit-test orders
* remove unused intersectionIndicesNew
* canvaskit: fix platform view offset and scene host initialization
* remove "we" in a bunch of comments

Co-authored-by: Yegor <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

platform-web Code specifically for the web engine waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. will affect goldens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[web - html] pictures containing just text generate a canvas

5 participants