Cull simple non-empty canvas text drawing outside of the clip#61305
Open
squelart wants to merge 1 commit intoWebKit:mainfrom
Open
Cull simple non-empty canvas text drawing outside of the clip#61305squelart wants to merge 1 commit intoWebKit:mainfrom
squelart wants to merge 1 commit intoWebKit:mainfrom
Conversation
https://bugs.webkit.org/show_bug.cgi?id=306394 rdar://172308695 Reviewed by NOBODY (OOPS!). In simple cases where no-frills text would be drawn on top of a canvas, it's easy and fast to check if the text does NOT intersect with the current clip, in which case the whole operation can safely be skipped. As an exception, if the textRect is computed to be empty (zero width or height), it is assumed to be of unknown but actually-non-empty size, so the optimization is just skipped. This may be used by some websites to obscure privacy-sensitive texts. * LayoutTests/fast/canvas/fillText-edge-clip-expected.html: Added. * LayoutTests/fast/canvas/fillText-edge-clip-shadow-expected.html: Added. * LayoutTests/fast/canvas/fillText-edge-clip-shadow.html: Added. * LayoutTests/fast/canvas/fillText-edge-clip.html: Added. * LayoutTests/fast/canvas/fillText-edge-expected.html: Added. * LayoutTests/fast/canvas/fillText-edge-shadow-expected.html: Added. * LayoutTests/fast/canvas/fillText-edge-shadow.html: Added. * LayoutTests/fast/canvas/fillText-edge.html: Added. * LayoutTests/fast/canvas/fillText-empty-clip-expected.html: Added. * LayoutTests/fast/canvas/fillText-empty-clip.html: Added. * LayoutTests/platform/win/TestExpectations: * Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):
Collaborator
|
EWS run on current version of this PR (hash a37ac2d) Details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 ios-apple
a37ac2d
a37ac2d