WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
103896
[skia] Improve performance of GraphicsContext::createCompatibleBuffer by using SkDevice:createCompatibleDevice
https://bugs.webkit.org/show_bug.cgi?id=103896
Summary
[skia] Improve performance of GraphicsContext::createCompatibleBuffer by usin...
Justin Novosad
Reported
2012-12-03 08:17:15 PST
[skia] Improve performance of GraphicsContext::createCompatibleBuffer by using SkDevice:createCompatibleDevice
Attachments
Patch
(12.51 KB, patch)
2012-12-03 08:39 PST
,
Justin Novosad
no flags
Details
Formatted Diff
Diff
Patch
(12.44 KB, patch)
2012-12-03 11:48 PST
,
Justin Novosad
no flags
Details
Formatted Diff
Diff
Patch
(13.57 KB, patch)
2012-12-03 12:12 PST
,
Justin Novosad
no flags
Details
Formatted Diff
Diff
Patch
(13.58 KB, patch)
2012-12-03 12:41 PST
,
Justin Novosad
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Justin Novosad
Comment 1
2012-12-03 08:39:51 PST
Created
attachment 177261
[details]
Patch
Early Warning System Bot
Comment 2
2012-12-03 08:45:57 PST
Comment on
attachment 177261
[details]
Patch
Attachment 177261
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/15097576
Early Warning System Bot
Comment 3
2012-12-03 08:47:30 PST
Comment on
attachment 177261
[details]
Patch
Attachment 177261
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/15086967
Build Bot
Comment 4
2012-12-03 08:49:03 PST
Comment on
attachment 177261
[details]
Patch
Attachment 177261
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/15119388
EFL EWS Bot
Comment 5
2012-12-03 08:49:55 PST
Comment on
attachment 177261
[details]
Patch
Attachment 177261
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/15106505
Build Bot
Comment 6
2012-12-03 08:56:53 PST
Comment on
attachment 177261
[details]
Patch
Attachment 177261
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/15104550
WebKit Review Bot
Comment 7
2012-12-03 09:23:17 PST
Comment on
attachment 177261
[details]
Patch
Attachment 177261
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/15100560
New failing tests: fast/backgrounds/gradient-background-leakage.html
Stephen White
Comment 8
2012-12-03 09:23:57 PST
Comment on
attachment 177261
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=177261&action=review
> Source/WebCore/platform/graphics/GraphicsContext.h:437 > + PassOwnPtr<ImageBuffer> createCompatibleBuffer(const IntSize&, bool hasAlpha = true) const;
Prefer a flags enum to a bool here, to make the callsites self-documenting. See WebKit coding style.
> Source/WebCore/platform/graphics/ImageBuffer.cpp:79 > +ImageBuffer::ImageBuffer(const IntSize&, float resolutionScale, ColorSpace colorSpace, const GraphicsContext* compatibleContext, bool hasAlpha, bool& success) > + : ImageBuffer(IntSize&, resolutionScale, colorSpace, compatibleContext->isAccelerated() ? Accelerated : Unaccelerated, NonDeferred, success) > +{ }
Hmm, yeah, that's not going to work. You could use an init() function, but I wonder if it would be possible to simply add the GraphicsContext* to the existing constructor. If you pass NULL, it does the regular construction, otherwise it does the compatible construction. You'd also have to put back the accelerated flag.
> Source/WebCore/platform/graphics/ImageBuffer.h:96 > + // Creates a buffer compativble with 'context'. Will return a null pointer on allocation failure.
Typo: compativble.
kov's GTK+ EWS bot
Comment 9
2012-12-03 09:25:29 PST
Comment on
attachment 177261
[details]
Patch
Attachment 177261
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/15104559
Justin Novosad
Comment 10
2012-12-03 11:47:19 PST
> Prefer a flags enum to a bool here, to make the callsites self-documenting. See WebKit coding style. >
Style guide, rule 10: "Prefer enums to bools on function parameters if callers are likely to be passing constants".
Justin Novosad
Comment 11
2012-12-03 11:48:05 PST
Created
attachment 177297
[details]
Patch
Early Warning System Bot
Comment 12
2012-12-03 11:54:10 PST
Comment on
attachment 177297
[details]
Patch
Attachment 177297
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/15121359
Early Warning System Bot
Comment 13
2012-12-03 11:54:15 PST
Comment on
attachment 177297
[details]
Patch
Attachment 177297
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/15101620
Stephen White
Comment 14
2012-12-03 11:57:52 PST
(In reply to
comment #10
)
> > Prefer a flags enum to a bool here, to make the callsites self-documenting. See WebKit coding style. > > > > Style guide, rule 10: "Prefer enums to bools on function parameters if callers are likely to be passing constants".
Good point. Justin pointed out to me offline that the callsites are all passing foo->hasAlpha(), which is self-documenting.
Justin Novosad
Comment 15
2012-12-03 12:12:34 PST
Created
attachment 177305
[details]
Patch
kov's GTK+ EWS bot
Comment 16
2012-12-03 12:22:51 PST
Comment on
attachment 177305
[details]
Patch
Attachment 177305
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/15126232
Early Warning System Bot
Comment 17
2012-12-03 12:25:14 PST
Comment on
attachment 177305
[details]
Patch
Attachment 177305
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/15117498
Build Bot
Comment 18
2012-12-03 12:30:41 PST
Comment on
attachment 177305
[details]
Patch
Attachment 177305
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/15098671
Early Warning System Bot
Comment 19
2012-12-03 12:31:07 PST
Comment on
attachment 177305
[details]
Patch
Attachment 177305
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/15105626
Justin Novosad
Comment 20
2012-12-03 12:41:52 PST
Created
attachment 177311
[details]
Patch
Stephen White
Comment 21
2012-12-04 13:35:17 PST
Comment on
attachment 177311
[details]
Patch OK. r=me
WebKit Review Bot
Comment 22
2012-12-05 13:41:21 PST
Comment on
attachment 177311
[details]
Patch Clearing flags on attachment: 177311 Committed
r136755
: <
http://trac.webkit.org/changeset/136755
>
WebKit Review Bot
Comment 23
2012-12-05 13:41:25 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