WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 59967
Avoid wasted cycles updating paths when popping the context stack
https://bugs.webkit.org/show_bug.cgi?id=59967
Summary
Avoid wasted cycles updating paths when popping the context stack
Simon Fraser (smfr)
Reported
2011-05-02 15:24:13 PDT
CanvasRenderingContext2D::restore() does m_path.transform(state().m_transform); which is a waste of cycles if the path is empty, or the transform is identity.
Attachments
Patch
(1.56 KB, patch)
2011-05-02 15:49 PDT
,
Simon Fraser (smfr)
mitz: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2011-05-02 15:49:42 PDT
Created
attachment 91995
[details]
Patch
Matthew Delaney
Comment 2
2011-05-02 16:06:54 PDT
I wonder if putting isEmpty first in the check might make these paths even a little faster. isIdentity() looks at a handful of values on the matrix whereas isEmpty should be checking just a single count variable (platform dependent of course though).
Simon Fraser (smfr)
Comment 3
2011-05-02 16:19:04 PDT
http://trac.webkit.org/changeset/85540
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug