diff options
-rw-r--r-- | include/libcamera/framebuffer.h | 9 | ||||
-rw-r--r-- | src/libcamera/framebuffer.cpp | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/include/libcamera/framebuffer.h b/include/libcamera/framebuffer.h index d5aeff00..fd68ed0a 100644 --- a/include/libcamera/framebuffer.h +++ b/include/libcamera/framebuffer.h @@ -51,14 +51,7 @@ public: FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie = 0); - const std::vector<Plane> &planes() const - { - /* \todo Remove the assertions after sufficient testing */ - for (const auto &plane : planes_) - assert(plane.offset != Plane::kInvalidOffset); - return planes_; - } - + const std::vector<Plane> &planes() const { return planes_; } Request *request() const; const FrameMetadata &metadata() const { return metadata_; } diff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp index c99f5b15..ad63a34a 100644 --- a/src/libcamera/framebuffer.cpp +++ b/src/libcamera/framebuffer.cpp @@ -199,6 +199,8 @@ FrameBuffer::FrameBuffer(const std::vector<Plane> &planes, unsigned int cookie) : Extensible(std::make_unique<Private>()), planes_(planes), cookie_(cookie) { + for (const auto &plane : planes_) + ASSERT(plane.offset != Plane::kInvalidOffset); } /** |