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 35453
Need to move items that CanvasRenderingContext2D depends on into CanvasSurface.
https://bugs.webkit.org/show_bug.cgi?id=35453
Summary
Need to move items that CanvasRenderingContext2D depends on into CanvasSurface.
David Levin
Reported
2010-02-26 14:13:37 PST
Created
attachment 49638
[details]
Here's the changes inplace in HTMLCanvasElement (to make the diff clearer). This is step 2a from
https://bugs.webkit.org/show_bug.cgi?id=34909#c2
.
Attachments
Here's the changes inplace in HTMLCanvasElement (to make the diff clearer).
(13.66 KB, patch)
2010-02-26 14:13 PST
,
David Levin
no flags
Details
Formatted Diff
Diff
Proposed fix.
(16.68 KB, patch)
2010-02-26 14:27 PST
,
David Levin
levin
: review-
Details
Formatted Diff
Diff
Proposed fix.
(21.40 KB, patch)
2010-03-02 15:50 PST
,
David Levin
no flags
Details
Formatted Diff
Diff
Proposed fix (added the modified changelog).
(21.76 KB, patch)
2010-03-02 16:26 PST
,
David Levin
oliver
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
David Levin
Comment 1
2010-02-26 14:27:58 PST
Created
attachment 49646
[details]
Proposed fix. See the previous patch for the same changes but in an easier to diff format.
Oliver Hunt
Comment 2
2010-03-01 17:02:47 PST
Comment on
attachment 49646
[details]
Proposed fix.
> + // FIXME: Make isSupportedImageMIMETypeForEncoding threadsafe (to allow this method to be used on a worker thread). > + if (mimeType.isNull() || !MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType))
It may be worth (for now) adding an isOnMainThread() assertion to this code path so that we can't accidentally forget to fix this.
> + return buffer()->toDataURL("image/png"); > + > + return buffer()->toDataURL(mimeType);
I wonder how thread safe the image _encoders_ are. i wonder what the DPI of an offscreen canvas should be...
> +IntRect CanvasSurface::convertLogicalToDevice(const FloatRect& logicalRect) const > +{
I'm okay r+ing this, but i thought i'd see if you have any comments on these before i do.
David Levin
Comment 3
2010-03-01 17:07:09 PST
Comment on
attachment 49646
[details]
Proposed fix. I'll do something for Oliver's comments and upload a new patch.
David Levin
Comment 4
2010-03-02 15:50:57 PST
Created
attachment 49859
[details]
Proposed fix. The only difference between this patch and the last one is adding a few isMainThread() asserts (and corresponding changelog entries).
David Levin
Comment 5
2010-03-02 16:02:29 PST
(In reply to
comment #2
)
> (From update of
attachment 49646
[details]
) > > + // FIXME: Make isSupportedImageMIMETypeForEncoding threadsafe (to allow this method to be used on a worker thread). > > + if (mimeType.isNull() || !MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType)) > > It may be worth (for now) adding an isOnMainThread() assertion to this code > path so that we can't accidentally forget to fix this.
done. I also added bug
https://bugs.webkit.org/show_bug.cgi?id=35616
for this.
> I wonder how thread safe the image _encoders_ are.
I looked at the code (for a while and for several different platforms) and it appeared pretty safe. I added a few asserts in some places that may need fixes. I also added bug
https://bugs.webkit.org/show_bug.cgi?id=35615
and made it block the "master" bug.
> i wonder what the DPI of an offscreen canvas should be...
Me too :) Something I'll have to figure out as I get there but my instinct is to make it match the document that the worker came from.
David Levin
Comment 6
2010-03-02 16:26:27 PST
Created
attachment 49864
[details]
Proposed fix (added the modified changelog).
Oliver Hunt
Comment 7
2010-03-10 10:42:56 PST
Comment on
attachment 49864
[details]
Proposed fix (added the modified changelog). r=me
David Levin
Comment 8
2010-03-24 10:51:27 PDT
Committed as
http://trac.webkit.org/changeset/56447
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