WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
13578
When QD plugins draw to an offscreen bitmap the origin is not correct
https://bugs.webkit.org/show_bug.cgi?id=13578
Summary
When QD plugins draw to an offscreen bitmap the origin is not correct
Bruce Q. Hammond
Reported
2007-05-03 16:55:35 PDT
The CGContextRef's origin is ignored when the offscreen GWorld is constructed. The origin is implied by the CGContextRef's CGAffineTransform.
Attachments
QD plugins now respect the origin of CGBitmapContext
(4.27 KB, patch)
2007-05-03 17:05 PDT
,
Bruce Q. Hammond
darin
: review-
Details
Formatted Diff
Diff
respect the origin implied by the bitmap contexts affine tranformation matrix
(4.30 KB, patch)
2007-05-07 16:29 PDT
,
Bruce Q. Hammond
darin
: review+
Details
Formatted Diff
Diff
Fixes the sign of the Y-Origin adjustment
(1.50 KB, patch)
2007-05-15 14:29 PDT
,
Bruce Q. Hammond
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Bruce Q. Hammond
Comment 1
2007-05-03 17:05:33 PDT
Created
attachment 14323
[details]
QD plugins now respect the origin of CGBitmapContext
Darin Adler
Comment 2
2007-05-04 08:01:13 PDT
Comment on
attachment 14323
[details]
QD plugins now respect the origin of CGBitmapContext Looks fine. But why not use CGPointApplyAffineTransform instead of doing explicit multiplication?
David Harrison
Comment 3
2007-05-04 10:28:33 PDT
rdar://5182103
Timothy Hatcher
Comment 4
2007-05-04 14:12:59 PDT
Comment on
attachment 14323
[details]
QD plugins now respect the origin of CGBitmapContext (int32)-boundsInWindow.origin.y - (offscreenBounds.bottom + offscreenMatrix.ty * offscreenMatrix.d) Please explain why you need to multiply offscreenMatrix.ty by offscreenMatrix.d but not do something similar for offscreenMatrix.tx. Please explain this code better in the comments. Can you also use CGPointApplyAffineTransform like Darin asked?
Darin Adler
Comment 5
2007-05-07 14:50:53 PDT
Comment on
attachment 14323
[details]
QD plugins now respect the origin of CGBitmapContext Someone told me that Bruce is working on a version of this that uses CGPointApplyAffineTransform, so review- until we have that one.
Bruce Q. Hammond
Comment 6
2007-05-07 16:29:38 PDT
Created
attachment 14404
[details]
respect the origin implied by the bitmap contexts affine tranformation matrix Implements the changes requested by reviewers to go though CGPointApplyAffineTransform to create the origin data. Personally I don't like this patch as much as the previous one because it requires yet another call to CGPointApplyAffineTransform in order to determine if the axes are flipped. However it is simply a mater of taste and is functionally identical; it may be more clear to some maintainers what is happening. I also now treat Y-Axis and and X-Axis identically even though inverting the X-Axis would be unusual.
Darin Adler
Comment 7
2007-05-07 16:33:57 PDT
Comment on
attachment 14404
[details]
respect the origin implied by the bitmap contexts affine tranformation matrix r=me, assuming that you (Bruce) have a test case that shows this works well, since Safari doesn't use this code path.
Darin Adler
Comment 8
2007-05-08 16:34:44 PDT
(In reply to
comment #7
)
> r=me, assuming that you (Bruce) have a test case that shows this works well, > since Safari doesn't use this code path.
Bruce confirmed that he does have a test, so confirmed: r=me.
Mark Rowe (bdash)
Comment 9
2007-05-08 21:31:23 PDT
Landed in
r21322
.
Mark Rowe (bdash)
Comment 10
2007-05-08 22:39:46 PDT
A build fix in
r21323
was needed to keep things building with the ancient version of Xcode the buildslaves are currently using.
Bruce Q. Hammond
Comment 11
2007-05-15 14:29:07 PDT
Created
attachment 14573
[details]
Fixes the sign of the Y-Origin adjustment The Y-origin adjustment was backwards on the previous patch. This fixes it.
Mark Rowe (bdash)
Comment 12
2007-05-15 16:40:17 PDT
Comment on
attachment 14573
[details]
Fixes the sign of the Y-Origin adjustment It'd be *really* handy if all of these changes had some form of regression testing. There have been several issues with past iterations of related patches, and without any way to test these (Safari doesn't touch this code path) it's impossible to know if and when this codepath breaks in the future.
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