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

Unified Diff: remoting/host/differ.cc

Issue 7622002: Revert 96327 - Switch over to using SkRegions to calculate dirty areas. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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/differ.h ('k') | remoting/host/differ_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/differ.cc
===================================================================
--- remoting/host/differ.cc (revision 96327)
+++ remoting/host/differ.cc (working copy)
@@ -26,12 +26,12 @@
Differ::~Differ() {}
-void Differ::CalcDirtyRegion(const void* prev_buffer, const void* curr_buffer,
- SkRegion* region) {
- if (!region) {
+void Differ::CalcDirtyRects(const void* prev_buffer, const void* curr_buffer,
+ InvalidRects* rects) {
+ if (!rects) {
return;
}
- region->setEmpty();
+ rects->clear();
if (!prev_buffer || !curr_buffer) {
return;
@@ -42,7 +42,7 @@
// Now that we've identified the blocks that have changed, merge adjacent
// blocks to minimize the number of rects that we return.
- MergeBlocks(region);
+ MergeBlocks(rects);
}
void Differ::MarkDirtyBlocks(const void* prev_buffer, const void* curr_buffer) {
@@ -131,9 +131,9 @@
return 0;
}
-void Differ::MergeBlocks(SkRegion* region) {
- DCHECK(region);
- region->setEmpty();
+void Differ::MergeBlocks(InvalidRects* rects) {
+ DCHECK(rects);
+ rects->clear();
uint8* diff_info_row_start = static_cast<uint8*>(diff_info_.get());
int diff_info_stride = diff_info_width_ * sizeof(DiffInfo);
@@ -195,8 +195,7 @@
if (top + height > height_) {
height = height_ - top;
}
- region->op(SkIRect::MakeXYWH(left, top, width, height),
- SkRegion::kUnion_Op);
+ rects->insert(gfx::Rect(left, top, width, height));
}
// Increment to next block in this row.
« no previous file with comments | « remoting/host/differ.h ('k') | remoting/host/differ_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698