diff --git a/rpcs3/Emu/RSX/GL/GLPresent.cpp b/rpcs3/Emu/RSX/GL/GLPresent.cpp index c73415edb2..6287b50721 100644 --- a/rpcs3/Emu/RSX/GL/GLPresent.cpp +++ b/rpcs3/Emu/RSX/GL/GLPresent.cpp @@ -296,7 +296,7 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info) } else { - m_frame->present_frame(sshot_frame, buffer_width * 4, buffer_width, buffer_height, false); + m_frame->present_frame(std::move(sshot_frame), buffer_width * 4, buffer_width, buffer_height, false); } } diff --git a/rpcs3/Emu/RSX/GSFrameBase.h b/rpcs3/Emu/RSX/GSFrameBase.h index ef17378dd3..69d2832c55 100644 --- a/rpcs3/Emu/RSX/GSFrameBase.h +++ b/rpcs3/Emu/RSX/GSFrameBase.h @@ -31,6 +31,6 @@ public: virtual display_handle_t handle() const = 0; virtual bool can_consume_frame() const = 0; - virtual void present_frame(std::vector& data, u32 pitch, u32 width, u32 height, bool is_bgra) const = 0; + virtual void present_frame(std::vector&& data, u32 pitch, u32 width, u32 height, bool is_bgra) const = 0; virtual void take_screenshot(std::vector&& sshot_data, u32 sshot_width, u32 sshot_height, bool is_bgra) = 0; }; diff --git a/rpcs3/Emu/RSX/VK/VKPresent.cpp b/rpcs3/Emu/RSX/VK/VKPresent.cpp index 6bc09588d4..a682750f69 100644 --- a/rpcs3/Emu/RSX/VK/VKPresent.cpp +++ b/rpcs3/Emu/RSX/VK/VKPresent.cpp @@ -749,7 +749,7 @@ void VKGSRender::flip(const rsx::display_flip_info_t& info) image_to_flip->pop_layout(*m_current_command_buffer); flush_command_queue(true); - auto src = sshot_vkbuf.map(0, sshot_size); + const auto src = sshot_vkbuf.map(0, sshot_size); std::vector sshot_frame(sshot_size); memcpy(sshot_frame.data(), src, sshot_size); sshot_vkbuf.unmap(); @@ -762,7 +762,7 @@ void VKGSRender::flip(const rsx::display_flip_info_t& info) } else { - m_frame->present_frame(sshot_frame, buffer_width * 4, buffer_width, buffer_height, is_bgra); + m_frame->present_frame(std::move(sshot_frame), buffer_width * 4, buffer_width, buffer_height, is_bgra); } } } diff --git a/rpcs3/rpcs3qt/gs_frame.cpp b/rpcs3/rpcs3qt/gs_frame.cpp index 7b5481d2d4..c6bd3090fa 100644 --- a/rpcs3/rpcs3qt/gs_frame.cpp +++ b/rpcs3/rpcs3qt/gs_frame.cpp @@ -787,10 +787,10 @@ bool gs_frame::can_consume_frame() const return video_provider.can_consume_frame(); } -void gs_frame::present_frame(std::vector& data, u32 pitch, u32 width, u32 height, bool is_bgra) const +void gs_frame::present_frame(std::vector&& data, u32 pitch, u32 width, u32 height, bool is_bgra) const { utils::video_provider& video_provider = g_fxo->get(); - video_provider.present_frame(data, pitch, width, height, is_bgra); + video_provider.present_frame(std::move(data), pitch, width, height, is_bgra); } void gs_frame::take_screenshot(std::vector&& data, u32 sshot_width, u32 sshot_height, bool is_bgra) diff --git a/rpcs3/rpcs3qt/gs_frame.h b/rpcs3/rpcs3qt/gs_frame.h index 38bbaa0a3e..858a06340d 100644 --- a/rpcs3/rpcs3qt/gs_frame.h +++ b/rpcs3/rpcs3qt/gs_frame.h @@ -78,7 +78,7 @@ public: bool get_mouse_lock_state(); bool can_consume_frame() const override; - void present_frame(std::vector& data, u32 pitch, u32 width, u32 height, bool is_bgra) const override; + void present_frame(std::vector&& data, u32 pitch, u32 width, u32 height, bool is_bgra) const override; void take_screenshot(std::vector&& data, u32 sshot_width, u32 sshot_height, bool is_bgra) override; protected: diff --git a/rpcs3/util/video_provider.cpp b/rpcs3/util/video_provider.cpp index 70888447f4..4b93c50b69 100644 --- a/rpcs3/util/video_provider.cpp +++ b/rpcs3/util/video_provider.cpp @@ -122,7 +122,7 @@ namespace utils return pts > m_last_video_pts_incoming; } - void video_provider::present_frame(std::vector& data, u32 pitch, u32 width, u32 height, bool is_bgra) + void video_provider::present_frame(std::vector&& data, u32 pitch, u32 width, u32 height, bool is_bgra) { if (!m_active) { diff --git a/rpcs3/util/video_provider.h b/rpcs3/util/video_provider.h index 0d2c29edfe..b18e6c35d4 100644 --- a/rpcs3/util/video_provider.h +++ b/rpcs3/util/video_provider.h @@ -21,7 +21,7 @@ namespace utils void set_pause_time_us(usz pause_time_us); bool can_consume_frame(); - void present_frame(std::vector& data, u32 pitch, u32 width, u32 height, bool is_bgra); + void present_frame(std::vector&& data, u32 pitch, u32 width, u32 height, bool is_bgra); void present_samples(u8* buf, u32 sample_count, u16 channels);