Merge pull request #309 from hydra/fix-page-performance-issue
Fix incorrect calculation of area that needs to be invalidated for the scrollbars.
This commit is contained in:
@@ -20,14 +20,21 @@ As graphical interfaces for embedded systems has an increasing relevance today y
|
||||
|
||||
Please, take a look at [CODE_OF_CONDUCT](https://github.com/littlevgl/lvgl/blob/master/docs/CODE_OF_CONDUCT.md)
|
||||
|
||||
There a few general rules:
|
||||
There are few **general rules**
|
||||
* We use [GitHub's issue tracker](https://github.com/littlevgl/lvgl/issues)
|
||||
* Be kind and respectful. Strating with "Hi" is always a good idea :)
|
||||
* If somebedy helped you give a feedback.
|
||||
* Always create an issue before creating a [Pull request](https://help.github.com/articles/about-pull-requests/) (maybe somebeody already working on this issue)
|
||||
* One issue should be about one topic. If you have other questions please open a new issue.
|
||||
* Always create an issue before creating a [Pull request](https://help.github.com/articles/about-pull-requests/) to discuss the idea first
|
||||
* Create small, "digestable" Pull requests.
|
||||
* Tell your remarks in a structured way. Use paragraphs and the [Markdown](https://guides.github.com/features/mastering-markdown/) support of GitHub.
|
||||
* Be sure you are using the lates version (from `master` branch)
|
||||
* Keep in mind LittlevGL should be and should remain:
|
||||
- usable on small MCUs as well (think about memory footprint)
|
||||
- compilable with "non-standard" tools like Arduino (no gcc specific options)
|
||||
- C compatible (no C++ specific code and features)
|
||||
- all configuration should be in `lv_conf.h`. (Instead of modifying the library)
|
||||
- the API clean and easiy to understand
|
||||
|
||||
## How to report a bug?
|
||||
If you found a **simple and straightforward bug** like:
|
||||
@@ -65,9 +72,9 @@ Your suggestion can have 4 possible outcomes:
|
||||
1. This feature is already exists. In this case you will learn how to achive your goal.
|
||||
2. You can simply realize it with the current functionality.
|
||||
3. Although it's a new feature but it would break LittlevGL's platform independent and/or resource minimalist nature.
|
||||
4. It's really a new feature which would be good to be in LittlevGL. Hurray! In a discussion we figure out the technical details andimplementation options. With the knowledge of how to do it somebody can implement the new feature.
|
||||
4. It's really a new feature which would be good to be in LittlevGL. Hurray! In a discussion we figure out the technical details and implementation options. With the knowledge of how to do it somebody can implement the new feature.
|
||||
|
||||
Keep in mind if you wouldn't like to do the implementation there is no guarantee that it will be ready in the new future.
|
||||
Keep in mind if you wouldn't like to do the implementation there is no guarantee that it will be ready in the near future.
|
||||
However if you would like to force it, take a look at this page: [Feature request service](http://www.gl.littlev.hu/services#feature)
|
||||
|
||||
## How to implement a feature?
|
||||
|
||||
@@ -670,8 +670,8 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi
|
||||
lv_area_copy(&sb_area_tmp, &page_ext->sb.hor_area);
|
||||
sb_area_tmp.x1 += page->coords.x1;
|
||||
sb_area_tmp.y1 += page->coords.y1;
|
||||
sb_area_tmp.x2 += page->coords.x2;
|
||||
sb_area_tmp.y2 += page->coords.y2;
|
||||
sb_area_tmp.x2 += page->coords.x1;
|
||||
sb_area_tmp.y2 += page->coords.y1;
|
||||
lv_inv_area(&sb_area_tmp);
|
||||
page_ext->sb.hor_draw = 0;
|
||||
}
|
||||
@@ -679,8 +679,8 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi
|
||||
lv_area_copy(&sb_area_tmp, &page_ext->sb.ver_area);
|
||||
sb_area_tmp.x1 += page->coords.x1;
|
||||
sb_area_tmp.y1 += page->coords.y1;
|
||||
sb_area_tmp.x2 += page->coords.x2;
|
||||
sb_area_tmp.y2 += page->coords.y2;
|
||||
sb_area_tmp.x2 += page->coords.x1;
|
||||
sb_area_tmp.y2 += page->coords.y1;
|
||||
lv_inv_area(&sb_area_tmp);
|
||||
page_ext->sb.ver_draw = 0;
|
||||
}
|
||||
@@ -739,16 +739,16 @@ static void lv_page_sb_refresh(lv_obj_t * page)
|
||||
lv_area_copy(&sb_area_tmp, &ext->sb.hor_area);
|
||||
sb_area_tmp.x1 += page->coords.x1;
|
||||
sb_area_tmp.y1 += page->coords.y1;
|
||||
sb_area_tmp.x2 += page->coords.x2;
|
||||
sb_area_tmp.y2 += page->coords.y2;
|
||||
sb_area_tmp.x2 += page->coords.x1;
|
||||
sb_area_tmp.y2 += page->coords.y1;
|
||||
lv_inv_area(&sb_area_tmp);
|
||||
}
|
||||
if(ext->sb.ver_draw != 0) {
|
||||
lv_area_copy(&sb_area_tmp, &ext->sb.ver_area);
|
||||
sb_area_tmp.x1 += page->coords.x1;
|
||||
sb_area_tmp.y1 += page->coords.y1;
|
||||
sb_area_tmp.x2 += page->coords.x2;
|
||||
sb_area_tmp.y2 += page->coords.y2;
|
||||
sb_area_tmp.x2 += page->coords.x1;
|
||||
sb_area_tmp.y2 += page->coords.y1;
|
||||
lv_inv_area(&sb_area_tmp);
|
||||
}
|
||||
|
||||
@@ -801,16 +801,16 @@ static void lv_page_sb_refresh(lv_obj_t * page)
|
||||
lv_area_copy(&sb_area_tmp, &ext->sb.hor_area);
|
||||
sb_area_tmp.x1 += page->coords.x1;
|
||||
sb_area_tmp.y1 += page->coords.y1;
|
||||
sb_area_tmp.x2 += page->coords.x2;
|
||||
sb_area_tmp.y2 += page->coords.y2;
|
||||
sb_area_tmp.x2 += page->coords.x1;
|
||||
sb_area_tmp.y2 += page->coords.y1;
|
||||
lv_inv_area(&sb_area_tmp);
|
||||
}
|
||||
if(ext->sb.ver_draw != 0) {
|
||||
lv_area_copy(&sb_area_tmp, &ext->sb.ver_area);
|
||||
sb_area_tmp.x1 += page->coords.x1;
|
||||
sb_area_tmp.y1 += page->coords.y1;
|
||||
sb_area_tmp.x2 += page->coords.x2;
|
||||
sb_area_tmp.y2 += page->coords.y2;
|
||||
sb_area_tmp.x2 += page->coords.x1;
|
||||
sb_area_tmp.y2 += page->coords.y1;
|
||||
lv_inv_area(&sb_area_tmp);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user