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); |