Commit f301d736 authored by sergeyu@chromium.org's avatar sergeyu@chromium.org

Roll webrtc 4143:4179

R=alexeypa@chromium.org, ronghuawu@chromium.org

Review URL: https://codereview.chromium.org/16383002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204088 0039d316-1c4b-4281-b951-d872f2087c98
parent 93c657cc
...@@ -37,7 +37,7 @@ vars = { ...@@ -37,7 +37,7 @@ vars = {
# Three lines of non-changing comments so that # Three lines of non-changing comments so that
# the commit queue can handle CLs rolling WebRTC # the commit queue can handle CLs rolling WebRTC
# and V8 without interference from each other. # and V8 without interference from each other.
"webrtc_revision": "4143", "webrtc_revision": "4179",
"jsoncpp_revision": "248", "jsoncpp_revision": "248",
"nss_revision": "200337", "nss_revision": "200337",
# Three lines of non-changing comments so that # Three lines of non-changing comments so that
......
...@@ -558,10 +558,10 @@ TEST_F(DifferTest, MergeBlocks_MultiRect) { ...@@ -558,10 +558,10 @@ TEST_F(DifferTest, MergeBlocks_MultiRect) {
// +---+---+---+---+ +---+---+---+ // +---+---+---+---+ +---+---+---+
// | | | X | _ | | | | 0 | // | | | X | _ | | | | 0 |
// +---+---+---+---+ +---+---+ + // +---+---+---+---+ +---+---+---+
// | X | X | X | _ | | 1 1 | 0 | // | X | X | X | _ | | 1 1 1 |
// +---+---+---+---+ => + | + // +---+---+---+---+ => + +
// | X | X | X | _ | | 1 1 | 0 | // | X | X | X | _ | | 1 1 1 |
// +---+---+---+---+ +---+---+---+ // +---+---+---+---+ +---+---+---+
// | _ | _ | _ | _ | // | _ | _ | _ | _ |
// +---+---+---+---+ // +---+---+---+---+
...@@ -573,15 +573,15 @@ TEST_F(DifferTest, MergeBlocks_MultiRect) { ...@@ -573,15 +573,15 @@ TEST_F(DifferTest, MergeBlocks_MultiRect) {
MergeBlocks(&dirty); MergeBlocks(&dirty);
ASSERT_EQ(2, RegionRectCount(dirty)); ASSERT_EQ(2, RegionRectCount(dirty));
ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 2, 0, 1, 3)); ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 2, 0, 1, 1));
ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 0, 1, 2, 2)); ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 0, 1, 3, 2));
// +---+---+---+---+ +---+---+---+ // +---+---+---+---+ +---+---+---+
// | | | | _ | | | | | // | | | | _ | | | | |
// +---+---+---+---+ +---+---+---+ // +---+---+---+---+ +---+---+---+
// | X | | X | _ | | 0 | | 1 | // | X | | X | _ | | 0 | | 1 |
// +---+---+---+---+ => + +---+ + // +---+---+---+---+ => +---+---+---+
// | X | X | X | _ | | 0 | 2 | 1 | // | X | X | X | _ | | 2 2 2 |
// +---+---+---+---+ +---+---+---+ // +---+---+---+---+ +---+---+---+
// | _ | _ | _ | _ | // | _ | _ | _ | _ |
// +---+---+---+---+ // +---+---+---+---+
...@@ -594,16 +594,16 @@ TEST_F(DifferTest, MergeBlocks_MultiRect) { ...@@ -594,16 +594,16 @@ TEST_F(DifferTest, MergeBlocks_MultiRect) {
MergeBlocks(&dirty); MergeBlocks(&dirty);
ASSERT_EQ(3, RegionRectCount(dirty)); ASSERT_EQ(3, RegionRectCount(dirty));
ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 0, 1, 1, 2)); ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 0, 1, 1, 1));
ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 2, 1, 1, 2)); ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 2, 1, 1, 1));
ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 1, 2, 1, 1)); ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 0, 2, 3, 1));
// +---+---+---+---+ +---+---+---+ // +---+---+---+---+ +---+---+---+
// | X | X | X | _ | | 0 0 0 | // | X | X | X | _ | | 0 0 0 |
// +---+---+---+---+ +---+---+---+ // +---+---+---+---+ +---+---+---+
// | X | | X | _ | | 1 | | 2 | // | X | | X | _ | | 1 | | 2 |
// +---+---+---+---+ => + +---+ + // +---+---+---+---+ => +---+---+---+
// | X | X | X | _ | | 1 | 3 | 2 | // | X | X | X | _ | | 3 3 3 |
// +---+---+---+---+ +---+---+---+ // +---+---+---+---+ +---+---+---+
// | _ | _ | _ | _ | // | _ | _ | _ | _ |
// +---+---+---+---+ // +---+---+---+---+
...@@ -618,9 +618,9 @@ TEST_F(DifferTest, MergeBlocks_MultiRect) { ...@@ -618,9 +618,9 @@ TEST_F(DifferTest, MergeBlocks_MultiRect) {
ASSERT_EQ(4, RegionRectCount(dirty)); ASSERT_EQ(4, RegionRectCount(dirty));
ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 0, 0, 3, 1)); ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 0, 0, 3, 1));
ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 0, 1, 1, 2)); ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 0, 1, 1, 1));
ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 2, 1, 1, 2)); ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 2, 1, 1, 1));
ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 1, 2, 1, 1)); ASSERT_TRUE(CheckDirtyRegionContainsRect(dirty, 0, 2, 3, 1));
// +---+---+---+---+ +---+---+---+ // +---+---+---+---+ +---+---+---+
// | X | X | | _ | | 0 0 | | // | X | X | | _ | | 0 0 | |
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
using webrtc::DesktopRect; using webrtc::DesktopRect;
using webrtc::DesktopRegion;
using webrtc::DesktopSize; using webrtc::DesktopSize;
namespace { namespace {
...@@ -56,7 +57,6 @@ class VideoEncoderMessageTester { ...@@ -56,7 +57,6 @@ class VideoEncoderMessageTester {
: begin_rect_(0), : begin_rect_(0),
rect_data_(0), rect_data_(0),
end_rect_(0), end_rect_(0),
added_rects_(0),
state_(kWaitingForBeginRect), state_(kWaitingForBeginRect),
strict_(false) { strict_(false) {
} }
...@@ -66,7 +66,7 @@ class VideoEncoderMessageTester { ...@@ -66,7 +66,7 @@ class VideoEncoderMessageTester {
EXPECT_GT(begin_rect_, 0); EXPECT_GT(begin_rect_, 0);
EXPECT_EQ(kWaitingForBeginRect, state_); EXPECT_EQ(kWaitingForBeginRect, state_);
if (strict_) { if (strict_) {
EXPECT_EQ(added_rects_, begin_rect_); EXPECT_TRUE(region_.Equals(received_region_));
} }
} }
...@@ -78,12 +78,9 @@ class VideoEncoderMessageTester { ...@@ -78,12 +78,9 @@ class VideoEncoderMessageTester {
++begin_rect_; ++begin_rect_;
if (strict_) { if (strict_) {
DesktopRect rect = rects_.front(); received_region_.AddRect(webrtc::DesktopRect::MakeXYWH(
rects_.pop_front(); packet->format().x(), packet->format().y(),
EXPECT_EQ(rect.left(), packet->format().x()); packet->format().width(), packet->format().height()));
EXPECT_EQ(rect.top(), packet->format().y());
EXPECT_EQ(rect.width(), packet->format().width());
EXPECT_EQ(rect.height(), packet->format().height());
} }
} else { } else {
EXPECT_FALSE((packet->flags() & VideoPacket::FIRST_PACKET) != 0); EXPECT_FALSE((packet->flags() & VideoPacket::FIRST_PACKET) != 0);
...@@ -114,8 +111,7 @@ class VideoEncoderMessageTester { ...@@ -114,8 +111,7 @@ class VideoEncoderMessageTester {
} }
void AddRects(const DesktopRect* rects, int count) { void AddRects(const DesktopRect* rects, int count) {
rects_.insert(rects_.begin() + rects_.size(), rects, rects + count); region_.AddRects(rects, count);
added_rects_ += count;
} }
private: private:
...@@ -127,11 +123,11 @@ class VideoEncoderMessageTester { ...@@ -127,11 +123,11 @@ class VideoEncoderMessageTester {
int begin_rect_; int begin_rect_;
int rect_data_; int rect_data_;
int end_rect_; int end_rect_;
int added_rects_;
State state_; State state_;
bool strict_; bool strict_;
std::deque<DesktopRect> rects_; DesktopRegion region_;
DesktopRegion received_region_;
DISALLOW_COPY_AND_ASSIGN(VideoEncoderMessageTester); DISALLOW_COPY_AND_ASSIGN(VideoEncoderMessageTester);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment