post all desktop capturer apis to worker threads

This commit is contained in:
Samuel Attard 2018-06-19 11:37:53 +10:00
parent 6c604e1eb3
commit 5a28759fea
2 changed files with 67 additions and 34 deletions

View file

@ -34,6 +34,11 @@ class DesktopCapturer : public mate::EventEmitter<DesktopCapturer>,
bool capture_screen,
const gfx::Size& thumbnail_size);
std::unique_ptr<DesktopMediaList> media_list_;
#if defined(OS_WIN)
bool using_directx_capturer_;
#endif // defined(OS_WIN)
protected:
explicit DesktopCapturer(v8::Isolate* isolate);
~DesktopCapturer() override;
@ -47,10 +52,7 @@ class DesktopCapturer : public mate::EventEmitter<DesktopCapturer>,
bool OnRefreshFinished() override;
private:
std::unique_ptr<DesktopMediaList> media_list_;
#if defined(OS_WIN)
bool using_directx_capturer_;
#endif // defined(OS_WIN)
scoped_refptr<base::SequencedTaskRunner> capture_thread_;
DISALLOW_COPY_AND_ASSIGN(DesktopCapturer);
};