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

Unified Diff: remoting/host/differ_block_unittest.cc

Issue 7511014: Define Chromoting's differ block size in one (and only one) place. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update copyright 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_block_sse2.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/differ_block_unittest.cc
diff --git a/remoting/host/differ_block_unittest.cc b/remoting/host/differ_block_unittest.cc
index ad91a87efa40a236b6956098ee12492fe4434bc1..1bfdb196ed95af978ac7b2bdc88d01228e7731b8 100644
--- a/remoting/host/differ_block_unittest.cc
+++ b/remoting/host/differ_block_unittest.cc
@@ -25,7 +25,7 @@ class EncodeDoneHandler
};
// Memory buffer large enough for 2 blocks aligned to 16 bytes.
-static const int kSizeOfBlock = kBlockHeight * kBlockWidth * kBytesPerPixel;
+static const int kSizeOfBlock = kBlockSize * kBlockSize * kBytesPerPixel;
uint8 block_buffer[kSizeOfBlock * 2 + 16];
void PrepareBuffers(uint8* &block1, uint8* &block2) {
@@ -43,7 +43,7 @@ TEST(BlockDifferenceTestSame, BlockDifference) {
// These blocks should match.
for (int i = 0; i < kTimesToRun; ++i) {
- int result = BlockDifference(block1, block2, kBlockWidth * kBytesPerPixel);
+ int result = BlockDifference(block1, block2, kBlockSize * kBytesPerPixel);
EXPECT_EQ(0, result);
}
}
@@ -55,7 +55,7 @@ TEST(BlockDifferenceTestLast, BlockDifference) {
block2[kSizeOfBlock-2] += 1;
for (int i = 0; i < kTimesToRun; ++i) {
- int result = BlockDifference(block1, block2, kBlockWidth * kBytesPerPixel);
+ int result = BlockDifference(block1, block2, kBlockSize * kBytesPerPixel);
EXPECT_EQ(1, result);
}
}
@@ -67,7 +67,7 @@ TEST(BlockDifferenceTestMid, BlockDifference) {
block2[kSizeOfBlock/2+1] += 1;
for (int i = 0; i < kTimesToRun; ++i) {
- int result = BlockDifference(block1, block2, kBlockWidth * kBytesPerPixel);
+ int result = BlockDifference(block1, block2, kBlockSize * kBytesPerPixel);
EXPECT_EQ(1, result);
}
}
@@ -79,7 +79,7 @@ TEST(BlockDifferenceTestFirst, BlockDifference) {
block2[0] += 1;
for (int i = 0; i < kTimesToRun; ++i) {
- int result = BlockDifference(block1, block2, kBlockWidth * kBytesPerPixel);
+ int result = BlockDifference(block1, block2, kBlockSize * kBytesPerPixel);
EXPECT_EQ(1, result);
}
}
« no previous file with comments | « remoting/host/differ_block_sse2.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698