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

Unified Diff: remoting/base/encoder_vp8.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/base/encoder_row_based.cc ('k') | remoting/base/types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/encoder_vp8.cc
===================================================================
--- remoting/base/encoder_vp8.cc (revision 96327)
+++ remoting/base/encoder_vp8.cc (working copy)
@@ -10,7 +10,6 @@
#include "remoting/base/capture_data.h"
#include "remoting/base/util.h"
#include "remoting/proto/video.pb.h"
-#include "third_party/skia/include/core/SkRegion.h"
extern "C" {
#define VPX_CODEC_DISABLE_COMPAT 1
@@ -149,7 +148,7 @@
return false;
}
- const SkRegion& region = capture_data->dirty_region();
+ const InvalidRects& rects = capture_data->dirty_rects();
const uint8* in = capture_data->data_planes().data[0];
const int in_stride = capture_data->data_planes().strides[0];
const int plane_size =
@@ -161,11 +160,9 @@
const int uv_stride = image_->stride[1];
DCHECK(updated_rects->empty());
- for (SkRegion::Iterator r(region); !r.done(); r.next()) {
+ for (InvalidRects::const_iterator r = rects.begin(); r != rects.end(); ++r) {
// Align the rectangle, report it as updated.
- SkIRect skRect = r.rect();
- gfx::Rect rect(skRect.fLeft, skRect.fTop, skRect.width(), skRect.height());
- rect = AlignAndClipRect(rect, image_->w, image_->h);
+ gfx::Rect rect = AlignAndClipRect(*r, image_->w, image_->h);
if (!rect.IsEmpty())
updated_rects->push_back(rect);
« no previous file with comments | « remoting/base/encoder_row_based.cc ('k') | remoting/base/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698