[Webkit-unassigned] [Bug 176226] [GTK][Wayland] Use fast malloc to allocate backing store cairo surfaces data
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 1 09:37:31 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=176226
--- Comment #4 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Michael Catanzaro from comment #3)
> Comment on attachment 319601 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=319601&action=review
Thanks for the review.
> > Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp:37
> > + cairo_surface_set_user_data(surface.get(), &s_surfaceDataKey, surfaceData, [](void* data) { fastFree(data); });
>
> Style checker doesn't like this, and I agree that it would be easier to read
> on two lines. But up to you.
I agree when using a longer body, but in this case I think it reads better this way.
> > Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp:44
> > + , m_scrolledHysteresis([this](HysteresisState state) { if (state == HysteresisState::Stopped) m_scrollSurface = nullptr; }, scrollHysteresisDuration)
>
> Style checker doesn't like this either. Please let's not use lambdas in
> initializer lists. Can't you initialize it inside the body of the
> constructor?
No, because it's stack allocated.
> > Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoImpl.h:21
> > #include "BackingStoreBackendCairo.h"
>
> I think it belongs inside the #if USE(CAIRO) guard.
There's no problem because BackingStoreBackendCairo.h is already guarded, but I agree it's better inside the guard here in the header.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170901/d3c16c91/attachment.html>
More information about the webkit-unassigned
mailing list