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

Conversation

@ditman
Copy link
Member

@ditman ditman commented Apr 18, 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
Lands #30804, which had some issues with golden files.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Apr 18, 2022
@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/32744

@ditman ditman requested a review from yjbanov April 18, 2022 18:09
@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #32744 at sha 4fb6474

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

@ditman
Copy link
Member Author

ditman commented Apr 18, 2022

The original is behaving properly again. Landing that one!

@ditman ditman closed this Apr 18, 2022
@ditman ditman deleted the fix-text-no-canvas branch April 18, 2022 19:06
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 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

3 participants