WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
102575
[chromium] Add conversion between WebTransformation and gfx::Transform
https://bugs.webkit.org/show_bug.cgi?id=102575
Summary
[chromium] Add conversion between WebTransformation and gfx::Transform
Dana Jansens
Reported
2012-11-16 18:02:43 PST
[chromium] Add conversion between WebTransformation and gfx::Transform
Attachments
Patch
(2.36 KB, patch)
2012-11-16 18:06 PST
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch
(2.60 KB, patch)
2012-11-16 18:34 PST
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch
(2.60 KB, patch)
2012-11-16 18:39 PST
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Dana Jansens
Comment 1
2012-11-16 18:06:12 PST
Created
attachment 174791
[details]
Patch
WebKit Review Bot
Comment 2
2012-11-16 18:08:07 PST
Please wait for approval from
abarth@webkit.org
,
dglazkov@chromium.org
,
fishd@chromium.org
,
jamesr@chromium.org
or
tkent@chromium.org
before submitting, as this patch contains changes to the Chromium public API. See also
https://trac.webkit.org/wiki/ChromiumWebKitAPI
.
James Robinson
Comment 3
2012-11-16 18:22:42 PST
Comment on
attachment 174791
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=174791&action=review
Are you sure about adding these before we finish transitioning chromium code? I'm worried about accidentally adding copies.
> Source/Platform/chromium/public/WebTransformationMatrix.h:160 > + gfx::Transform t;
we don't use 1-letter variable names for anything but loop counters in WebKit
Alexandre Elias
Comment 4
2012-11-16 18:29:11 PST
Comment on
attachment 174791
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=174791&action=review
> Source/Platform/chromium/public/WebTransformationMatrix.h:147 > + m_matrix[i][j] = t.matrix().getDouble(i, j);
One of these should go "j, i" because you need to transpose to convert between WebKit matrices and Skia matrices.
Dana Jansens
Comment 5
2012-11-16 18:34:57 PST
Created
attachment 174793
[details]
Patch
Dana Jansens
Comment 6
2012-11-16 18:38:15 PST
Comment on
attachment 174791
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=174791&action=review
>> Source/Platform/chromium/public/WebTransformationMatrix.h:147 >> + m_matrix[i][j] = t.matrix().getDouble(i, j); > > One of these should go "j, i" because you need to transpose to convert between WebKit matrices and Skia matrices.
Oh snap, I thought I checked and it wasn't. Here's translateX WebKit: m_matrix[3][0] Skia (via gfx): matrix_.set(0, 3, SkFloatToScalar(x)) You're right. I misread! Will fix.
>> Source/Platform/chromium/public/WebTransformationMatrix.h:160 >> + gfx::Transform t; > > we don't use 1-letter variable names for anything but loop counters in WebKit
Oops, fixing.
Dana Jansens
Comment 7
2012-11-16 18:39:52 PST
Created
attachment 174794
[details]
Patch
Dana Jansens
Comment 8
2012-11-16 18:41:27 PST
(In reply to
comment #3
)
> (From update of
attachment 174791
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=174791&action=review
> > Are you sure about adding these before we finish transitioning chromium code? I'm worried about accidentally adding copies.
I am expecting the cc/ conversion to be ~1 patch, but it could be more than one, and then we should be careful. So, we can explicitly convert somewhere else, then delete it and add implicit conversions here. Or, we can have explicit ones here, and then make them implicit later. I leave that to your discretion. I like them here because it's where the code is going to end up eventually anyways.
James Robinson
Comment 9
2012-11-16 18:49:56 PST
Comment on
attachment 174794
[details]
Patch I'd be fine with having these implicit if we can complete the conversion fast enough (1 patch would be ideal). I don't want to get caught out in an intermediate state for too long. R=me, up to you on the implicit/explicit
vollick
Comment 10
2012-11-16 18:58:04 PST
Comment on
attachment 174794
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=174794&action=review
> Source/Platform/chromium/public/WebTransformationMatrix.h:148 > + m_matrix[i][j] = transform.matrix().getDouble(j, i);
Maybe use SkMatrix44::asColMajord or asRowMajord?
Dana Jansens
Comment 11
2012-11-16 19:35:00 PST
(In reply to
comment #9
)
> (From update of
attachment 174794
[details]
) > I'd be fine with having these implicit if we can complete the conversion fast enough (1 patch would be ideal). I don't want to get caught out in an intermediate state for too long. > > R=me, up to you on the implicit/explicit
I do like being safe! And don't mind following up on this after. Thanks for the review.
WebKit Review Bot
Comment 12
2012-11-16 19:42:52 PST
Comment on
attachment 174794
[details]
Patch
Attachment 174794
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/14857848
New failing tests: inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html
Dana Jansens
Comment 13
2012-11-16 19:45:18 PST
Comment on
attachment 174794
[details]
Patch Pretty sure this isn't crashing a test. Let's try this again.
WebKit Review Bot
Comment 14
2012-11-16 20:20:03 PST
Comment on
attachment 174794
[details]
Patch Clearing flags on attachment: 174794 Committed
r135031
: <
http://trac.webkit.org/changeset/135031
>
WebKit Review Bot
Comment 15
2012-11-16 20:20:08 PST
All reviewed patches have been landed. Closing bug.
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