Skip to content

Commit ae32d9b

Browse files
Merge pull request #29 from WebPlatformForEmbedded/fix/CompositorBuffer--EventFrame-should-be-64bit-also-on-32bit
CompositorBufferType: EventFrame should be 64bit also on 32bit
2 parents 23a3590 + c5c0991 commit ae32d9b

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Source/compositorbuffer/include/compositorbuffer/CompositorBufferType.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,10 @@ namespace Compositor {
3737
template <const uint8_t PLANES>
3838
class CompositorBufferType : public Exchange::ICompositionBuffer, public Core::IResource {
3939
private:
40-
// We need to test this on a 32 bit platform. On 64 bits platforms we do need
41-
// the data to be written into the eventfd to be 64 bits otherwise it does not
42-
// respond!
43-
#if defined(__SIZEOF_POINTER__) && (__SIZEOF_POINTER__ == 8)
40+
/***
41+
* We need a 64bit according: https://github.com/torvalds/linux/blob/v6.1/fs/eventfd.c#L275
42+
*/
4443
using EventFrame = uint64_t;
45-
#else
46-
using EventFrame = uint32_t;
47-
#endif
4844

4945
// We need some shared space for data to exchange, and to create a lock..
5046
class SharedStorage {
@@ -72,6 +68,13 @@ namespace Compositor {
7268
SharedStorage& operator=(const SharedStorage&) = delete;
7369

7470
SharedStorage()
71+
: _width(0)
72+
, _height(0)
73+
, _format(0)
74+
, _modifier(0)
75+
, _type(Exchange::ICompositionBuffer::TYPE_INVALID)
76+
, _dirty()
77+
, _copyOfDirty(false)
7578
{
7679
}
7780
SharedStorage(const uint32_t width, const uint32_t height, const uint32_t format, const uint64_t modifier, const Exchange::ICompositionBuffer::DataType type)

0 commit comments

Comments
 (0)