Skip to content

Commit 60590b9

Browse files
fix/CompositorBuffer: do not initialize members after mmap
1 parent ae32d9b commit 60590b9

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Source/compositorbuffer/include/compositorbuffer/CompositorBufferType.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,12 @@ namespace Compositor {
6767
SharedStorage(const SharedStorage&) = delete;
6868
SharedStorage& operator=(const SharedStorage&) = delete;
6969

70-
SharedStorage()
71-
: _width(0)
72-
, _height(0)
73-
, _format(0)
74-
, _modifier(0)
75-
, _type(Exchange::ICompositionBuffer::TYPE_INVALID)
76-
, _dirty()
77-
, _copyOfDirty(false)
78-
{
79-
}
70+
// FIXME:
71+
// Do not initialize members for now, this constructor is called after a mmap in the
72+
// placement new operator above. Initializing them now will reset the original values
73+
// of the buffer metadata.
74+
SharedStorage(){};
75+
8076
SharedStorage(const uint32_t width, const uint32_t height, const uint32_t format, const uint64_t modifier, const Exchange::ICompositionBuffer::DataType type)
8177
: _width(width)
8278
, _height(height)

0 commit comments

Comments
 (0)