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

Side by Side Diff: remoting/host/screen_capturer_fake.cc

Issue 134633004: Roll libjingle+webrtc to r5397. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/screen_capturer_fake.h ('k') | remoting/host/shaped_screen_capturer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/screen_capturer_fake.h" 5 #include "remoting/host/screen_capturer_fake.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" 9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 callback_->OnCaptureCompleted(queue_.current_frame()->Share()); 75 callback_->OnCaptureCompleted(queue_.current_frame()->Share());
76 } 76 }
77 77
78 void ScreenCapturerFake::SetMouseShapeObserver( 78 void ScreenCapturerFake::SetMouseShapeObserver(
79 MouseShapeObserver* mouse_shape_observer) { 79 MouseShapeObserver* mouse_shape_observer) {
80 DCHECK(!mouse_shape_observer_); 80 DCHECK(!mouse_shape_observer_);
81 DCHECK(mouse_shape_observer); 81 DCHECK(mouse_shape_observer);
82 mouse_shape_observer_ = mouse_shape_observer; 82 mouse_shape_observer_ = mouse_shape_observer;
83 } 83 }
84 84
85 bool ScreenCapturerFake::GetScreenList(ScreenList* screens) {
86 NOTIMPLEMENTED();
87 return false;
88 }
89
90 bool ScreenCapturerFake::SelectScreen(webrtc::ScreenId id) {
91 NOTIMPLEMENTED();
92 return false;
93 }
94
85 void ScreenCapturerFake::GenerateImage() { 95 void ScreenCapturerFake::GenerateImage() {
86 webrtc::DesktopFrame* frame = queue_.current_frame(); 96 webrtc::DesktopFrame* frame = queue_.current_frame();
87 97
88 const int kBytesPerPixel = webrtc::DesktopFrame::kBytesPerPixel; 98 const int kBytesPerPixel = webrtc::DesktopFrame::kBytesPerPixel;
89 99
90 memset(frame->data(), 0xff, 100 memset(frame->data(), 0xff,
91 size_.width() * size_.height() * kBytesPerPixel); 101 size_.width() * size_.height() * kBytesPerPixel);
92 102
93 uint8* row = frame->data() + 103 uint8* row = frame->data() +
94 (box_pos_y_ * size_.width() + box_pos_x_) * kBytesPerPixel; 104 (box_pos_y_ * size_.width() + box_pos_x_) * kBytesPerPixel;
(...skipping 24 matching lines...) Expand all
119 } 129 }
120 } 130 }
121 131
122 void ScreenCapturerFake::ScreenConfigurationChanged() { 132 void ScreenCapturerFake::ScreenConfigurationChanged() {
123 size_.set(kWidth, kHeight); 133 size_.set(kWidth, kHeight);
124 queue_.Reset(); 134 queue_.Reset();
125 bytes_per_row_ = size_.width() * webrtc::DesktopFrame::kBytesPerPixel; 135 bytes_per_row_ = size_.width() * webrtc::DesktopFrame::kBytesPerPixel;
126 } 136 }
127 137
128 } // namespace remoting 138 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/screen_capturer_fake.h ('k') | remoting/host/shaped_screen_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698