Cache NPatch textures 69/94869/13
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Tue, 1 Nov 2016 15:16:35 +0000 (15:16 +0000)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Fri, 4 Nov 2016 18:47:19 +0000 (18:47 +0000)
commit83066ea18044c04fbbf0378aa6863416c532e10b
treebc43685354ac7d88fb79c7c4dbd51e754f03b692
parent16a4ae532b2d38157fa31a2fe21d29bfb4c7be75
Cache NPatch textures

- introduce NPatchLoader, a simple cache to store loaded N patches, their textures and metadata
- refactor NPatchVisual to use NPatchLoader and removed some dead / inefficient code

GL stat improvements in dali-demo

Before (only relevant numbers presented)
-----------------------------------------
INFO: DALI: OpenGL ES statistics sampled over 60 frames) operations per frame:
INFO: DALI:   Bind textures : Mean 109.17  (Min:107.00, Max:113.00, StdDev: 1.33, Actual:6550)
INFO: DALI: OpenGL ES Object Count:
INFO: DALI:   Texture Count : 101  (Peak:101)

After
-----------------------------------------
INFO: DALI: OpenGL ES statistics sampled over 60 frames) operations per frame:
INFO: DALI:   Bind textures : Mean 14.83  (Min:14.00, Max:15.00, StdDev: 0.37, Actual:890)
INFO: DALI: OpenGL ES Object Count:
INFO: DALI:   Texture Count : 8  (Peak:8)

Change-Id: I4ce84e6c6578c30660106950b40dd3bc0c41efa1
23 files changed:
automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp
automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp
dali-toolkit/devel-api/visual-factory/visual-base.cpp
dali-toolkit/devel-api/visual-factory/visual-base.h
dali-toolkit/internal/file.list
dali-toolkit/internal/visuals/image/batch-image-visual.cpp
dali-toolkit/internal/visuals/image/batch-image-visual.h
dali-toolkit/internal/visuals/image/image-visual.cpp
dali-toolkit/internal/visuals/image/image-visual.h
dali-toolkit/internal/visuals/npatch-loader.cpp [new file with mode: 0644]
dali-toolkit/internal/visuals/npatch-loader.h [new file with mode: 0644]
dali-toolkit/internal/visuals/npatch/npatch-visual.cpp
dali-toolkit/internal/visuals/npatch/npatch-visual.h
dali-toolkit/internal/visuals/primitive/primitive-visual.cpp
dali-toolkit/internal/visuals/primitive/primitive-visual.h
dali-toolkit/internal/visuals/svg/svg-visual.cpp
dali-toolkit/internal/visuals/svg/svg-visual.h
dali-toolkit/internal/visuals/text/text-visual.cpp
dali-toolkit/internal/visuals/text/text-visual.h
dali-toolkit/internal/visuals/visual-base-impl.cpp
dali-toolkit/internal/visuals/visual-base-impl.h
dali-toolkit/internal/visuals/visual-factory-cache.cpp
dali-toolkit/internal/visuals/visual-factory-cache.h