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

Side by Side Diff: media/video/capture/screen/differ_block_unittest.cc

Issue 12047101: Move screen capturers from remoting/capturer to media/video/capturer/screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "remoting/capturer/differ_block.h" 6 #include "media/video/capture/screen/differ_block.h"
7 #include "testing/gmock/include/gmock/gmock.h" 7 #include "testing/gmock/include/gmock/gmock.h"
8 8
9 namespace remoting { 9 namespace media {
10 10
11 // Run 900 times to mimic 1280x720. 11 // Run 900 times to mimic 1280x720.
12 // TODO(fbarchard): Remove benchmark once performance is non-issue. 12 // TODO(fbarchard): Remove benchmark once performance is non-issue.
13 static const int kTimesToRun = 900; 13 static const int kTimesToRun = 900;
14 14
15 static void GenerateData(uint8* data, int size) { 15 static void GenerateData(uint8* data, int size) {
16 for (int i = 0; i < size; ++i) { 16 for (int i = 0; i < size; ++i) {
17 data[i] = i; 17 data[i] = i;
18 } 18 }
19 } 19 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 uint8* block2; 71 uint8* block2;
72 PrepareBuffers(block1, block2); 72 PrepareBuffers(block1, block2);
73 block2[0] += 1; 73 block2[0] += 1;
74 74
75 for (int i = 0; i < kTimesToRun; ++i) { 75 for (int i = 0; i < kTimesToRun; ++i) {
76 int result = BlockDifference(block1, block2, kBlockSize * kBytesPerPixel); 76 int result = BlockDifference(block1, block2, kBlockSize * kBytesPerPixel);
77 EXPECT_EQ(1, result); 77 EXPECT_EQ(1, result);
78 } 78 }
79 } 79 }
80 80
81 } // namespace remoting 81 } // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/screen/differ_block_sse2.cc ('k') | media/video/capture/screen/differ_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698