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

Unified Diff: media/video/capture/screen/differ.cc

Issue 13983010: Use webrtc::DesktopCapturer for screen capturer implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
Index: media/video/capture/screen/differ.cc
diff --git a/media/video/capture/screen/differ.cc b/media/video/capture/screen/differ.cc
index 3296903824015b4d45275282e1a9f30385f0450f..20e78c161811dcf3bc5e30e242c312ec77d4c487 100644
--- a/media/video/capture/screen/differ.cc
+++ b/media/video/capture/screen/differ.cc
@@ -27,11 +27,10 @@ Differ::Differ(int width, int height, int bpp, int stride) {
Differ::~Differ() {}
void Differ::CalcDirtyRegion(const void* prev_buffer, const void* curr_buffer,
- SkRegion* region) {
+ webrtc::DesktopRegion* region) {
if (!region) {
alexeypa (please no reviews) 2013/05/08 22:24:59 The whole purpose of this method is to return |reg
Sergey Ulanov 2013/05/09 18:49:02 Done
return;
}
- region->setEmpty();
if (!prev_buffer || !curr_buffer) {
alexeypa (please no reviews) 2013/05/08 22:24:59 It looks like the callers make sure that |prev_buf
Sergey Ulanov 2013/05/09 18:49:02 Done.
return;
@@ -131,9 +130,9 @@ DiffInfo Differ::DiffPartialBlock(const uint8* prev_buffer,
return 0;
}
-void Differ::MergeBlocks(SkRegion* region) {
+void Differ::MergeBlocks(webrtc::DesktopRegion* region) {
DCHECK(region);
alexeypa (please no reviews) 2013/05/08 22:24:59 nit: remove DCHECK. |region->Clear()| will crash i
Sergey Ulanov 2013/05/09 18:49:02 Done.
- region->setEmpty();
+ region->Clear();
uint8* diff_info_row_start = static_cast<uint8*>(diff_info_.get());
int diff_info_stride = diff_info_width_ * sizeof(DiffInfo);
@@ -195,8 +194,8 @@ void Differ::MergeBlocks(SkRegion* region) {
if (top + height > height_) {
height = height_ - top;
}
- region->op(SkIRect::MakeXYWH(left, top, width, height),
- SkRegion::kUnion_Op);
+ region->AddRect(
+ webrtc::DesktopRect::MakeXYWH(left, top, width, height));
}
// Increment to next block in this row.

Powered by Google App Engine
This is Rietveld 408576698