Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenMP support for widget rendering #118

Closed
lc-soft opened this issue Dec 14, 2017 · 5 comments
Closed

Add OpenMP support for widget rendering #118

lc-soft opened this issue Dec 14, 2017 · 5 comments
Labels
easy This issue is easy to solve enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted

Comments

@lc-soft
Copy link
Owner

lc-soft commented Dec 14, 2017

Issuehunt badges

Is your feature request related to a problem? Please describe.

LCUI/src/display.c

Lines 151 to 172 in 4a9516e

/**
* FIXME: add OpenMP support
* Dirty rectangle repaint tasks can be assigned to multiple CPU
* cores to improve rendering performance
*/
/* Repaint dirty rectangles of surface */
for (LinkedList_Each(rn, &rects)) {
rect = rn->data;
ev.paint.rect = *rect;
LCUI_TriggerEvent(&ev, NULL);
if (!can_render) {
continue;
}
paint = Surface_BeginPaint(s, rect);
if (!paint) {
continue;
}
DEBUG_MSG("rect: (%d,%d,%d,%d)\n", paint->rect.x,
paint->rect.y, paint->rect.width,
paint->rect.height);
count += Widget_Render(record->widget, paint);

Describe the solution you'd like
Dirty rectangle repaint tasks can be assigned to multiple CPU cores to improve rendering performance.

Describe alternatives you've considered
None.

Additional context
https://en.wikipedia.org/wiki/OpenMP


IssueHunt Summary

d4yvector d4yvector has been rewarded.

Backers (Total: $30.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@lc-soft lc-soft self-assigned this Dec 14, 2017
@stale stale bot added the stale label Jun 17, 2018
@lc-soft lc-soft closed this as completed Apr 15, 2019
@lc-soft lc-soft changed the title Add OpenMP support for widget tree render Add OpenMP support for widget rendering Sep 22, 2019
@lc-soft lc-soft removed their assignment Sep 22, 2019
@lc-soft lc-soft added enhancement and removed stale labels Sep 22, 2019
Repository owner deleted a comment from stale bot Sep 22, 2019
@lc-soft lc-soft reopened this Sep 22, 2019
@issuehunt-oss
Copy link

issuehunt-oss bot commented Sep 22, 2019

@lc-soft has funded $10.00 to this issue.


@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Sep 22, 2019
@lc-soft lc-soft added the easy This issue is easy to solve label Sep 22, 2019
@lc-soft lc-soft pinned this issue Sep 23, 2019
@issuehunt-oss
Copy link

issuehunt-oss bot commented Oct 1, 2019

@lc-soft has funded $10.00 to this issue.


@hyugabokko
Copy link
Contributor

I would like to work on this issue.

@issuehunt-oss
Copy link

issuehunt-oss bot commented Nov 27, 2019

@lc-soft has funded $10.00 to this issue.


hyugabokko added a commit to hyugabokko/LCUI that referenced this issue Dec 11, 2019
- Modified src/Makefile.am and added compiler option.
- Modified src/display.c and added preprocessor directives for OpenMP.
- To check whether multithreading is possible, the string is output to standard output. However, I will remove it before merging.
lc-soft added a commit that referenced this issue Dec 20, 2019
* perf: Add OpenMP support for widget rendering (#118)

- Modified src/Makefile.am and added compiler option.
- Modified src/display.c and added preprocessor directives for OpenMP.
- To check whether multithreading is possible, the string is output to standard output. However, I will remove it before merging.

* test: add rendering performance test

* build: add OpenMP configure option

* refactor: change include path of `config.h` and remove printf()

* perf: split the dirty rectangles into four parts for rendering

* fix(linux): missing surface size access method

* refactor(display): update dirty rectangle collection method

* test: update test_render.c

* build: add vs project file for test render

* fix(display): Convert `rects` list to array and follow a "Canonical Loop Form" defined in OpenMP

* refactor: Change where variable i is initialized

* fix: Widget_GenerateHash() not work

* test: improved widget update performance

Co-authored-by: Liu <lc-soft@live.cn>
@issuehunt-oss
Copy link

issuehunt-oss bot commented Dec 20, 2019

@lc-soft has rewarded $24.00 to @d4yvector. See it on IssueHunt

  • 💰 Total deposit: $30.00
  • 🎉 Repository reward(10%): $3.00
  • 🔧 Service fee(10%): $3.00

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Dec 20, 2019
@lc-soft lc-soft closed this as completed Dec 20, 2019
@lc-soft lc-soft unpinned this issue Dec 21, 2019
lc-soft added a commit that referenced this issue Jan 19, 2020
* perf: Add OpenMP support for widget rendering (#118)

- Modified src/Makefile.am and added compiler option.
- Modified src/display.c and added preprocessor directives for OpenMP.
- To check whether multithreading is possible, the string is output to standard output. However, I will remove it before merging.

* test: add rendering performance test

* build: add OpenMP configure option

* refactor: change include path of `config.h` and remove printf()

* perf: split the dirty rectangles into four parts for rendering

* fix(linux): missing surface size access method

* refactor(display): update dirty rectangle collection method

* test: update test_render.c

* build: add vs project file for test render

* fix(display): Convert `rects` list to array and follow a "Canonical Loop Form" defined in OpenMP

* refactor: Change where variable i is initialized

* fix: Widget_GenerateHash() not work

* test: improved widget update performance

Co-authored-by: Liu <lc-soft@live.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy This issue is easy to solve enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted
Projects
None yet
Development

No branches or pull requests

2 participants