Merge lp://qastaging/~nick-dedekind/unity/lp1062107.preview-pre-caching into lp://qastaging/unity
Status: | Work in progress |
---|---|
Proposed branch: | lp://qastaging/~nick-dedekind/unity/lp1062107.preview-pre-caching |
Merge into: | lp://qastaging/unity |
Diff against target: |
1176 lines (+675/-75) 22 files modified
UnityCore/CMakeLists.txt (+2/-0) UnityCore/HomeLens.cpp (+2/-2) UnityCore/HomeLens.h (+1/-1) UnityCore/Lens.cpp (+25/-25) UnityCore/Lens.h (+3/-1) UnityCore/PreviewPreCacher.cpp (+270/-0) UnityCore/PreviewPreCacher.h (+94/-0) dash/DashView.cpp (+8/-3) dash/LensView.cpp (+15/-13) dash/LensView.h (+7/-3) dash/previews/ApplicationPreview.cpp (+3/-3) dash/previews/GenericPreview.cpp (+2/-2) dash/previews/MoviePreview.cpp (+2/-2) dash/previews/MusicPreview.cpp (+2/-2) dash/previews/PreviewContainer.cpp (+1/-1) dash/previews/PreviewInfoHintWidget.cpp (+1/-1) dash/previews/SocialPreview.cpp (+3/-3) dash/previews/SocialPreviewComments.cpp (+1/-1) dash/previews/SocialPreviewContent.cpp (+4/-4) tests/CMakeLists.txt (+1/-0) tests/test_lens.cpp (+4/-8) tests/test_previews_precacher.cpp (+224/-0) |
To merge this branch: | bzr merge lp://qastaging/~nick-dedekind/unity/lp1062107.preview-pre-caching |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brandon Schaefer (community) | Needs Fixing | ||
Review via email:
|
Commit message
Added dash preview pre-caching. (LP: #1062107)
Description of the change
= Problem description =
https:/
Preview content should be speculatively cached
= The fix =
1. When the user opens a preview, results subsequent to the preview start pre-cacheing.
2. Once a user has previewed one content item underneath a category header, as long as the Dash remains open we continue to speculatively cache the preview content for the other items under the category header (even when the user returns to the results view). The pre-caching stops when a) the user closes the Dash b) the user previews the a result from underneath another category header. In this second case the Dash then starts speculatively pre-cacheing the content from underneath this new category header.
= Test coverage =
Unit tests for pre-caching queue execution.
Unmerged revisions
- 2881. By Nick Dedekind
-
Merged with trunk
- 2880. By Nick Dedekind
-
switched preview code to use std::max
- 2879. By Nick Dedekind
-
Preview pre-caching tweaks.
- 2878. By Nick Dedekind
-
Removed debuggin code.
- 2877. By Nick Dedekind
-
Added precache files.
- 2876. By Nick Dedekind
-
Added speculative caching to previews.
- 2875. By Nick Dedekind
-
Check for width > 0 in preview layout management.
530 + virtual ~PreviewPreCach er(); ete();
551 + virtual void OnPreCacheCompl
Could we make those pure virtual fucntions?
Or if not could we just do: ete() {}
530 + virtual ~PreviewPreCacher() {}
551 + virtual void OnPreCacheCompl
347 + if (index < 0 || index >=(int) GetResultCount( ))
Does this need to be casted to an int?
758 + int top_social_ info_max_ width = MAX(details_width - style.GetAppIco nAreaWidth( ) - style.GetSpaceB etweenIconAndDe tails() , 0); cr.width* 0.1)); >SetMaximumWidt h(MAX(0, GetGeometry().width - geo.height - style.GetMusicD urationWidth( ) - layout_spacing*2));
772 + int max_width = MAX(0, geo_cr.width - 2*(geo_
773 + int max_height = MAX(0, (geo_cr.height - TAIL_HEIGHT) - 2*((geo_cr.height - TAIL_HEIGHT)*0.1));
786 + title_-
Lets use std::max() here.