[webkit-reviews] review granted: [Bug 176226] [GTK][Wayland] Use fast malloc to allocate backing store cairo surfaces data : [Attachment 319601] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 1 09:30:20 PDT 2017


Michael Catanzaro <mcatanzaro at igalia.com> has granted Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 176226: [GTK][Wayland] Use fast malloc to allocate backing store cairo
surfaces data
https://bugs.webkit.org/show_bug.cgi?id=176226

Attachment 319601: Patch

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




--- Comment #3 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 319601
  --> https://bugs.webkit.org/attachment.cgi?id=319601
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=319601&action=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.

> 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?

> Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoImpl.h:21
>  #include "BackingStoreBackendCairo.h"

I think it belongs inside the #if USE(CAIRO) guard.


More information about the webkit-reviews mailing list