From 34b079f9adb70b08993b2508216e6606a8a50952 Mon Sep 17 00:00:00 2001 From: TinyOh Date: Sat, 2 Mar 2019 14:32:11 +0800 Subject: [PATCH] fix: reduce more copy times --- src/mynteye/api/processor/depth_processor.h | 6 ++++++ src/mynteye/api/processor/disparity_processor.h | 3 +++ src/mynteye/api/processor/points_processor_ocv.h | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/src/mynteye/api/processor/depth_processor.h b/src/mynteye/api/processor/depth_processor.h index 69f2f6d..0d57d04 100644 --- a/src/mynteye/api/processor/depth_processor.h +++ b/src/mynteye/api/processor/depth_processor.h @@ -34,6 +34,12 @@ class DepthProcessor : public Processor { std::string Name() override; protected: + inline Processor::process_type ProcessOutputConnection() override { + return Processor::WITHOUT_CLONE; + } + inline Processor::process_type ProcessInputConnection() override { + return Processor::WITHOUT_CLONE; + } Object *OnCreateOutput() override; bool OnProcess( Object *const in, Object *const out, diff --git a/src/mynteye/api/processor/disparity_processor.h b/src/mynteye/api/processor/disparity_processor.h index de2a46e..fd6cc33 100644 --- a/src/mynteye/api/processor/disparity_processor.h +++ b/src/mynteye/api/processor/disparity_processor.h @@ -41,6 +41,9 @@ class DisparityProcessor : public Processor { void NotifyComputingTypeChanged(const DisparityComputingMethod &MethodType); protected: + inline Processor::process_type ProcessOutputConnection() override { + return Processor::WITHOUT_CLONE; + } Object *OnCreateOutput() override; bool OnProcess( Object *const in, Object *const out, diff --git a/src/mynteye/api/processor/points_processor_ocv.h b/src/mynteye/api/processor/points_processor_ocv.h index a0d2c0a..0aa22da 100644 --- a/src/mynteye/api/processor/points_processor_ocv.h +++ b/src/mynteye/api/processor/points_processor_ocv.h @@ -37,6 +37,12 @@ class PointsProcessorOCV : public Processor { bool OnProcess( Object *const in, Object *const out, std::shared_ptr const parent) override; + inline Processor::process_type ProcessOutputConnection() override { + return Processor::WITHOUT_CLONE; + } + inline Processor::process_type ProcessInputConnection() override { + return Processor::WITHOUT_CLONE; + } private: cv::Mat Q_;