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

Comments

[web] Fix extra canvas generation due to context access#17710

Merged
ferhatb merged 3 commits intoflutter:masterfrom
ferhatb:canvas_regression
Apr 14, 2020
Merged

[web] Fix extra canvas generation due to context access#17710
ferhatb merged 3 commits intoflutter:masterfrom
ferhatb:canvas_regression

Conversation

@ferhatb
Copy link
Contributor

@ferhatb ferhatb commented Apr 14, 2020

No description provided.

@ferhatb ferhatb requested a review from yjbanov April 14, 2020 21:01
if (paragraph._drawOnCanvas && _childOverdraw == false) {
// !Do not move this assignment above this if clause since, accessing
// context will generate extra <canvas> tags.
html.CanvasRenderingContext2D ctx = _canvasPool.context;
Copy link
Contributor

Choose a reason for hiding this comment

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

You can move it even lower, into if (style != _cachedLastStyle), but not sure if it will make much difference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants