Commit Graph

7 Commits (development)

Author SHA1 Message Date
lumberyard-employee-dm b9824ed172
Updated all array_view uses with the C++20 span. (#7157)
* Updated all array_view uses with the C++20 span.

The updates were done in the following order
1. `AZStd::array_view<([^>].+)\* ?>`  -> `AZStd::span<\1 const>`
2. `AZStd::array_view<(?:const )(.+)>` -> `AZStd::span<const \1>`
3. `AZStd::array_view` -> `AZStd::span`

Removed the implementation of array_view.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Added missing whitespace between `const` and the typename for spans.

Updated the ShaderTest comparison of the ShaderResourceGroupLayout span
to compare the sizes as well

Updated comments on some of the methods that stated that they return "an
array" to mention they return "a span".

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Mike Balfour 845525a722
Add support for loading Png data directly from a memory buffer. (#6527)
* Add support for loading Png data directly from a memory buffer.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
(cherry picked from commit 6193dcf603d3c16ee193e1e6dc868bd6d04f89bc)

* Addressed PR feedback.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Addressed PR feedback.
Simplified LoadInternal() by having it always use a GenericStream.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
Esteban Papp f3e6adce7f
LYN-6882 release builds are executing code in asserts (#4305)
* adding Windows/release to PR-validation builds

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* changing trace back to expand to nothing for release

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* typo

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* more fixes

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* fixing some more unused variable cases

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* renaming file in ScriptCanvas that causes a msbuild warning

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* reverting a previous change

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
rgba16f e96793659a Fixes to get Mac & iOS building with new PNG support
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
4 years ago
santorac 849a8da4d9 Added unit tests for PngFile.
Fixed a couple issue like palettized files would not load, and stripping alpha was not affecting the color type reported by libpng. Also cleaned up some error reporting.
Added AzFramework to Atom/Utils tests to support PngFile testing.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac a9c6909a29 Renamed PngImage to PngFile and put it in a Utils namespace to match the other file utilities.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 7a8eb8eda5 Added a new PngImage utility class that wraps libpng. This replaces the use of OpenImageIO in O3DE (although OpenImageIO is still a build dependency for now).
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago