mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
SourceImpl: Add no-copy PutFrame.
This commit is contained in:
@@ -301,6 +301,10 @@ void SourceImpl::PutFrame(VideoMode::PixelFormat pixelFormat, int width,
|
||||
<< " bytes)");
|
||||
std::memcpy(frameData->data, data.data(), data.size());
|
||||
|
||||
PutFrame(std::move(frameData));
|
||||
}
|
||||
|
||||
void SourceImpl::PutFrame(std::unique_ptr<Frame::Data> frameData) {
|
||||
// Update frame
|
||||
{
|
||||
std::lock_guard<std::mutex> lock{m_frameMutex};
|
||||
|
||||
Reference in New Issue
Block a user