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

Side by Side Diff: source/libvpx/test/vp9_thread_test.cc

Issue 756673003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years 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
« no previous file with comments | « source/libvpx/test/vp9_quantize_test.cc ('k') | source/libvpx/vp8/common/rtcd_defs.pl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // Trivial serialized thread worker interface implementation. 200 // Trivial serialized thread worker interface implementation.
201 // Note any worker that requires synchronization between other workers will 201 // Note any worker that requires synchronization between other workers will
202 // hang. 202 // hang.
203 namespace impl { 203 namespace impl {
204 204
205 void Init(VP9Worker *const worker) { memset(worker, 0, sizeof(*worker)); } 205 void Init(VP9Worker *const worker) { memset(worker, 0, sizeof(*worker)); }
206 int Reset(VP9Worker *const /*worker*/) { return 1; } 206 int Reset(VP9Worker *const /*worker*/) { return 1; }
207 int Sync(VP9Worker *const worker) { return !worker->had_error; } 207 int Sync(VP9Worker *const worker) { return !worker->had_error; }
208 208
209 void Execute(VP9Worker *const worker) { 209 void Execute(VP9Worker *const worker) {
210 worker->had_error |= worker->hook(worker->data1, worker->data2); 210 worker->had_error |= !worker->hook(worker->data1, worker->data2);
211 } 211 }
212 212
213 void Launch(VP9Worker *const worker) { Execute(worker); } 213 void Launch(VP9Worker *const worker) { Execute(worker); }
214 void End(VP9Worker *const /*worker*/) {} 214 void End(VP9Worker *const /*worker*/) {}
215 215
216 } // namespace impl 216 } // namespace impl
217 217
218 TEST(VP9WorkerThreadTest, TestSerialInterface) { 218 TEST(VP9WorkerThreadTest, TestSerialInterface) {
219 static const VP9WorkerInterface serial_interface = { 219 static const VP9WorkerInterface serial_interface = {
220 impl::Init, impl::Reset, impl::Sync, impl::Launch, impl::Execute, impl::End 220 impl::Init, impl::Reset, impl::Sync, impl::Launch, impl::Execute, impl::End
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 { NULL, NULL } 305 { NULL, NULL }
306 }; 306 };
307 307
308 DecodeFiles(files); 308 DecodeFiles(files);
309 } 309 }
310 #endif // CONFIG_WEBM_IO 310 #endif // CONFIG_WEBM_IO
311 311
312 INSTANTIATE_TEST_CASE_P(Synchronous, VP9WorkerThreadTest, ::testing::Bool()); 312 INSTANTIATE_TEST_CASE_P(Synchronous, VP9WorkerThreadTest, ::testing::Bool());
313 313
314 } // namespace 314 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/vp9_quantize_test.cc ('k') | source/libvpx/vp8/common/rtcd_defs.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698