[webkit-reviews] review granted: [Bug 207233] Implement ImageBuffer shareable backends : [Attachment 391883] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 27 13:27:07 PST 2020
Simon Fraser (smfr) <simon.fraser at apple.com> has granted Said Abou-Hallawa
<sabouhallawa at apple.com>'s request for review:
Bug 207233: Implement ImageBuffer shareable backends
https://bugs.webkit.org/show_bug.cgi?id=207233
Attachment 391883: Patch
https://bugs.webkit.org/attachment.cgi?id=391883&action=review
--- Comment #10 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 391883
--> https://bugs.webkit.org/attachment.cgi?id=391883
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=391883&action=review
>
Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:62
> + return std::unique_ptr<ImageBufferShareableBitmapBackend>(new
ImageBufferShareableBitmapBackend(size, backendSize, resolutionScale,
colorSpace, WTFMove(bitmap), WTFMove(context)));
make_unique<>
Do you need to pass both bitmap and context in? The context can be created by
the bitmap.
>
Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:80
> + return std::unique_ptr<ImageBufferShareableBitmapBackend>(new
ImageBufferShareableBitmapBackend(logicalSize, backendSize, resolutionScale,
colorSpace, WTFMove(bitmap), WTFMove(context)));
make_unique<>
> Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:64
> + RefPtr<ShareableBitmap> m_bitmap;
Can this be a Ref<>...
> Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:65
> + std::unique_ptr<WebCore::GraphicsContext> m_context;
And this a GraphicsContext&?
>
Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBacken
d.cpp:49
> + RetainPtr<CGContextRef> cgContext =
surface->ensurePlatformContext(nullptr);
ensurePlatformContext has a nullptr default argument.
>
Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBacken
d.cpp:53
> + CGContextClearRect(cgContext.get(), FloatRect(FloatPoint::zero(),
backendSize));
Shame that we have eagerly clear here.
>
Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBacken
d.cpp:55
> + return std::unique_ptr<ImageBufferShareableIOSurfaceBackend>(new
ImageBufferShareableIOSurfaceBackend(size, backendSize, resolutionScale,
colorSpace, WTFMove(surface)));
make_unique<>
>
Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBacken
d.cpp:69
> + return std::unique_ptr<ImageBufferShareableIOSurfaceBackend>(new
ImageBufferShareableIOSurfaceBackend(logicalSize, internalSize,
resolutionScale, colorSpace, WTFMove(surface)));
make_unique<>
More information about the webkit-reviews
mailing list