Chromium Code Reviews| 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..9c632fb3b91c6c5ff0664df0bd5bd2693e7b6b57 100644 |
| --- a/media/video/capture/screen/differ.cc |
| +++ b/media/video/capture/screen/differ.cc |
| @@ -27,11 +27,11 @@ 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) { |
| return; |
| } |
| - region->setEmpty(); |
| + region->Clear(); |
| if (!prev_buffer || !curr_buffer) { |
| return; |
| @@ -131,9 +131,8 @@ DiffInfo Differ::DiffPartialBlock(const uint8* prev_buffer, |
| return 0; |
| } |
| -void Differ::MergeBlocks(SkRegion* region) { |
| +void Differ::MergeBlocks(webrtc::DesktopRegion* region) { |
| DCHECK(region); |
| - region->setEmpty(); |
|
alexeypa (please no reviews)
2013/04/26 21:33:58
nit: DCHECK(region->is_empty())
Sergey Ulanov
2013/05/07 22:25:50
Just moved Clear() call here.
|
| 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. |