Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1397)

Unified Diff: remoting/host/desktop_session_agent.cc

Issue 14305004: Simplify ScreenCapturer interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/desktop_session_agent.h ('k') | remoting/host/desktop_session_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_session_agent.cc
diff --git a/remoting/host/desktop_session_agent.cc b/remoting/host/desktop_session_agent.cc
index 47d814c3cbd06f3294f242e7bf4e84cc228f4ebb..d3c8a3cfb975a263999f686969c2290e72388dbd 100644
--- a/remoting/host/desktop_session_agent.cc
+++ b/remoting/host/desktop_session_agent.cc
@@ -83,8 +83,6 @@ bool DesktopSessionAgent::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(DesktopSessionAgent, message)
IPC_MESSAGE_HANDLER(ChromotingNetworkDesktopMsg_CaptureFrame,
OnCaptureFrame)
- IPC_MESSAGE_HANDLER(ChromotingNetworkDesktopMsg_InvalidateRegion,
- OnInvalidateRegion)
IPC_MESSAGE_HANDLER(ChromotingNetworkDesktopMsg_SharedBufferCreated,
OnSharedBufferCreated)
IPC_MESSAGE_HANDLER(ChromotingNetworkDesktopMsg_InjectClipboardEvent,
@@ -359,32 +357,6 @@ void DesktopSessionAgent::OnCaptureFrame() {
video_capturer_->CaptureFrame();
}
-void DesktopSessionAgent::OnInvalidateRegion(
- const std::vector<SkIRect>& invalid_rects) {
- if (!video_capture_task_runner()->BelongsToCurrentThread()) {
- video_capture_task_runner()->PostTask(
- FROM_HERE,
- base::Bind(&DesktopSessionAgent::OnInvalidateRegion, this,
- invalid_rects));
- return;
- }
-
- SkIRect bounds = SkIRect::MakeSize(current_size_);
-
- // Convert |invalid_rects| into a region.
- SkRegion invalid_region;
- for (std::vector<SkIRect>::const_iterator i = invalid_rects.begin();
- i != invalid_rects.end(); ++i) {
- // Validate each rectange and clip it to the frame bounds.
- SkIRect rect;
- if (rect.intersect(*i, bounds)) {
- invalid_region.op(rect, SkRegion::kUnion_Op);
- }
- }
-
- video_capturer_->InvalidateRegion(invalid_region);
-}
-
void DesktopSessionAgent::OnSharedBufferCreated(int id) {
if (!video_capture_task_runner()->BelongsToCurrentThread()) {
video_capture_task_runner()->PostTask(
@@ -501,10 +473,7 @@ void DesktopSessionAgent::StartVideoCapturer() {
void DesktopSessionAgent::StopVideoCapturer() {
DCHECK(video_capture_task_runner()->BelongsToCurrentThread());
- if (video_capturer_) {
- video_capturer_->Stop();
- video_capturer_.reset();
- }
+ video_capturer_.reset();
// Free any shared buffers left.
shared_buffers_.clear();
« no previous file with comments | « remoting/host/desktop_session_agent.h ('k') | remoting/host/desktop_session_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698