Fixed SVACE issues in ktx-loader.cpp + general maintenance.
authorGyörgy Straub <g.straub@partner.samsung.com>
Fri, 28 Feb 2020 16:38:22 +0000 (16:38 +0000)
committerWonsik Jung <sidein@samsung.com>
Tue, 10 Mar 2020 03:21:00 +0000 (12:21 +0900)
commitd18a1b7f2a79701bb6d176d06c5424b4dd076dfc
tree3b5e9934543fe588cbe7d7cad6c0c625f684ff10
parentb66a4718cd9548e2833307a70eacb47526d14639
Fixed SVACE issues in ktx-loader.cpp + general maintenance.

- simplified the navigation of the file stream: the ktx metadata is
  skipped with a single fseek() from SEEK_CUR, by the number of bytes
  known from the ktx header;
- removed the allocation of a single large buffer: image data is read
  from file, per image, directly into a buffer to be transferred to
  PixelData;
- using std::unique_ptr<> to manage the scope of the file handle and
  image buffer;
- removed local arrays of image sizes and buffer pointers as a total
  of no more than one of these is used at any given time;

Change-Id: If51688568dd90dc1117b3c9a0de10f6c429bd394
Signed-off-by: György Straub <g.straub@partner.samsung.com>
examples/rendering-basic-pbr/ktx-loader.cpp