WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
87794
Noticeable delay taking an HTML5 trailer fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=87794
Summary
Noticeable delay taking an HTML5 trailer fullscreen.
Jer Noble
Reported
2012-05-29 17:00:45 PDT
Noticeable delay taking an HTML5 trailer fullscreen.
Attachments
Patch
(3.48 KB, patch)
2012-05-29 17:05 PDT
,
Jer Noble
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2012-05-29 17:05:52 PDT
Created
attachment 144643
[details]
Patch
Jer Noble
Comment 2
2012-05-29 17:06:59 PDT
<
rdar://problem/11505987
>
Darin Adler
Comment 3
2012-05-29 17:12:34 PDT
Comment on
attachment 144643
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=144643&action=review
> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:186 > +static RetainPtr<CGImageRef> CGImageDeepCopy(CGImageRef sourceImage)
Our own functions should not have CG prefixes on their names. Those names are reserved for use in Core Graphics itself. If we were trying to name this the way it would have been named in CG, then we’d want to include the word Create as in the CGImageCreateCopy function. I think a better name might be CGImageCreateWithCopiedData as the CG name, or in our code createImageWithCopiedData.
> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:193 > + CGColorSpaceRef colorspace = CGImageGetColorSpace(sourceImage);
Should be named colorSpace.
> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:196 > + RetainPtr<CFDataRef> data(AdoptCF, CGDataProviderCopyData(CGImageGetDataProvider(sourceImage))); > + RetainPtr<CGDataProviderRef> provider(AdoptCF, CGDataProviderCreateWithCFData(data.get()));
These might read better with the adoptCF function rather than the AdoptCF constructor. This two-line sequence might be more readable as a separate createDataProviderWithCopiedData.
> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:200 > + return RetainPtr<CGImageRef>(AdoptCF, CGImageCreate(width, height, bitsPerComponent, bitsPerPixel, bytesPerRow, colorspace, bitmapInfo, provider.get(), 0, shouldInterpolate, intent));
Would read better with the adoptCF function.
> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:224 > + // Copy the image data into our own process from the WindowServer:
The use of a colon here is strange. Normally we’d use a period. A better comment would explain why we are copying the data.
Jer Noble
Comment 4
2012-05-29 23:34:07 PDT
Committed
r118896
: <
http://trac.webkit.org/changeset/118896
>
Jer Noble
Comment 5
2012-05-30 00:14:25 PDT
Comment on
attachment 144643
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=144643&action=review
>> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:186 >> +static RetainPtr<CGImageRef> CGImageDeepCopy(CGImageRef sourceImage) > > Our own functions should not have CG prefixes on their names. Those names are reserved for use in Core Graphics itself. > > If we were trying to name this the way it would have been named in CG, then we’d want to include the word Create as in the CGImageCreateCopy function. > > I think a better name might be CGImageCreateWithCopiedData as the CG name, or in our code createImageWithCopiedData.
"createImageWithCopiedData" certainly beats out "copyImageDeeply" or "createDeeplyCopiedImage". :)
>> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:193 >> + CGColorSpaceRef colorspace = CGImageGetColorSpace(sourceImage); > > Should be named colorSpace.
Changed.
>> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:196 >> + RetainPtr<CGDataProviderRef> provider(AdoptCF, CGDataProviderCreateWithCFData(data.get())); > > These might read better with the adoptCF function rather than the AdoptCF constructor. > > This two-line sequence might be more readable as a separate createDataProviderWithCopiedData.
Sure thing.
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