Previously the compiler would implicitly declare a copy constructor and assignment operator for classes derived from Memset<>, if they didn't have user-defined ones. This can cause them to have uninitialized padding bytes. By defining them ourselves using memcpy() we can ensure they're zero-initialized. Also define equality and less-than operators. The latter makes classes derived from Memset<> suitable as std::map<> keys. is_memcmparable<> now no longer works on classed derived from Memset<>, because it uses std::is_trivially_copyable<> which isn't true when a user-defined copy constructor or assignment operator is provided. Instead just rely on Memset<>'s new equality operators. Bug: b/131246679 Change-Id: I6e4963db8186955d8d3d3ef356fa42ef6a024c64 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42728 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Reviewed-by:Antonio Maiorano <amaiorano@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| ASTC_Decoder.cpp | Loading commit data... | |
| ASTC_Decoder.hpp | Loading commit data... | |
| BC_Decoder.cpp | Loading commit data... | |
| BC_Decoder.hpp | Loading commit data... | |
| BUILD.gn | Loading commit data... | |
| Blitter.cpp | Loading commit data... | |
| Blitter.hpp | Loading commit data... | |
| Clipper.cpp | Loading commit data... | |
| Clipper.hpp | Loading commit data... | |
| Color.cpp | Loading commit data... | |
| Color.hpp | Loading commit data... | |
| Config.cpp | Loading commit data... | |
| Config.hpp | Loading commit data... | |
| Context.cpp | Loading commit data... | |
| Context.hpp | Loading commit data... | |
| ETC_Decoder.cpp | Loading commit data... | |
| ETC_Decoder.hpp | Loading commit data... | |
| LRUCache.hpp | Loading commit data... | |
| Memset.hpp | Loading commit data... | |
| PixelProcessor.cpp | Loading commit data... | |
| PixelProcessor.hpp | Loading commit data... | |
| Plane.cpp | Loading commit data... | |
| Plane.hpp | Loading commit data... | |
| Polygon.hpp | Loading commit data... | |
| Primitive.hpp | Loading commit data... | |
| QuadRasterizer.cpp | Loading commit data... | |
| QuadRasterizer.hpp | Loading commit data... | |
| Rasterizer.hpp | Loading commit data... | |
| Renderer.cpp | Loading commit data... | |
| Renderer.hpp | Loading commit data... | |
| RoutineCache.hpp | Loading commit data... | |
| Sampler.hpp | Loading commit data... | |
| SetupProcessor.cpp | Loading commit data... | |
| SetupProcessor.hpp | Loading commit data... | |
| Stream.hpp | Loading commit data... | |
| Triangle.hpp | Loading commit data... | |
| Vertex.hpp | Loading commit data... | |
| VertexProcessor.cpp | Loading commit data... | |
| VertexProcessor.hpp | Loading commit data... |