Save both Image width and height if either is requested 56/30656/2
authorAndrew Cox <andrew.cox@partner.samsung.com>
Fri, 21 Nov 2014 16:15:11 +0000 (16:15 +0000)
committerAndrew Cox <andrew.cox@partner.samsung.com>
Thu, 27 Nov 2014 14:56:19 +0000 (14:56 +0000)
commit092c0ad7af9de3eea7d78d673d25e2f655040c9b
treeadbb0f737c66f3c44c5e7a93ad48798a6301eaa2
parentd076bf22d536e3e72e5fd95bff201d2368d702da
Save both Image width and height if either is requested

[problem]
Too many file operations for reading image dimensions synchronously
are showing up in profiles.

[cause]
Image::GetWidth() and Image::GetHeight() each separately initiates
a file read of the image header if the image is not loaded yet.

[solution]
Modify Image::GetWidth() and Image::GetHeight() so that whichever is
called first will save both.

Signed-off-by: Andrew Cox <andrew.cox@partner.samsung.com>
Change-Id: I8116bbcb682e27eb9aaa0fe7904086df46e7699e
dali/internal/event/images/image-factory.h
dali/internal/event/images/image-impl.cpp