[webkit-reviews] review granted: [Bug 200726] [iOS](REGRESSION: r200487): Get the CGImage pixels by drawing it into a memory context : [Attachment 376285] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 14 12:20:53 PDT 2019


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Said Abou-Hallawa
<sabouhallawa at apple.com>'s request for review:
Bug 200726: [iOS](REGRESSION: r200487): Get the CGImage pixels by drawing it
into a memory context
https://bugs.webkit.org/show_bug.cgi?id=200726

Attachment 376285: Patch

https://bugs.webkit.org/attachment.cgi?id=376285&action=review




--- Comment #3 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 376285
  --> https://bugs.webkit.org/attachment.cgi?id=376285
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=376285&action=review

> Tools/ChangeLog:3
> +	   [iOS](REGRESSION: r200487): Get the CGImage pixels by drawing it
into a memory context

This title is confusing. It says REGRESSION but then the title describes the
fix?

> Tools/ChangeLog:10
> +	   To get the pixels as an array of colors, draw the image into a
memory
> +	   context. The backing memory buffer can then be accessed to get the
image
> +	   pixels' colors.

What was wrong with the previous version?

> Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:126
> +	       CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();

RetainPtr<>

> Tools/TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:127
> +	       CGContextRef context = CGBitmapContextCreate(pixels.data(),
width, height, bitsPerComponent, bytesPerRow, colorSpace,
kCGImageAlphaPremultipliedFirst | kCGImageByteOrder32Little);

RetainPtr<>


More information about the webkit-reviews mailing list