D12388: Output device color curves correction

Vlad Zagorodniy noreply at phabricator.kde.org
Fri Apr 20 20:10:13 UTC 2018


zzag added inline comments.

INLINE COMMENTS

> outputconfiguration.cpp:184
> +            uint16_t *s = reinterpret_cast<uint16_t*>(wl_array_add(dest, sizeof(uint16_t)));
> +            *s = (uint16_t)c;
> +        }

Maybe `static_cast`?

I haven't used wl_array but can't you allocate big enough contiguous chunk of memory and call memcpy, e.g.

  wl_array wlRed;
  
  wl_array_init(&wlRed);
  auto* redDest = wl_array_add(&wlRed, sizeof(uint16_t) * red.count());
  memcpy(redDest, red.data(), sizeof(uint16_t) * red.count());

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D12388

To: romangg, #frameworks
Cc: zzag, cfeck, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180420/b324ae6f/attachment.html>


More information about the Kde-frameworks-devel mailing list