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

Side by Side Diff: tests/OnceTest.cpp

Issue 684923002: MultiPictureDraw is taskgroup aware. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: actually call Reset() to free the data in each data Created 6 years, 1 month 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
« no previous file with comments | « tests/LazyPtrTest.cpp ('k') | tests/PathOpsSkpClipTest.cpp » ('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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkOnce.h" 8 #include "SkOnce.h"
9 #include "SkRunnable.h"
9 #include "SkTaskGroup.h" 10 #include "SkTaskGroup.h"
10 #include "Test.h" 11 #include "Test.h"
11 12
12 static void add_five(int* x) { 13 static void add_five(int* x) {
13 *x += 5; 14 *x += 5;
14 } 15 }
15 16
16 DEF_TEST(SkOnce_Singlethreaded, r) { 17 DEF_TEST(SkOnce_Singlethreaded, r) {
17 int x = 0; 18 int x = 0;
18 19
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 static int gX = 0; 72 static int gX = 0;
72 static void inc_gX() { gX++; } 73 static void inc_gX() { gX++; }
73 74
74 DEF_TEST(SkOnce_NoArg, r) { 75 DEF_TEST(SkOnce_NoArg, r) {
75 SK_DECLARE_STATIC_ONCE(once); 76 SK_DECLARE_STATIC_ONCE(once);
76 SkOnce(&once, inc_gX); 77 SkOnce(&once, inc_gX);
77 SkOnce(&once, inc_gX); 78 SkOnce(&once, inc_gX);
78 SkOnce(&once, inc_gX); 79 SkOnce(&once, inc_gX);
79 REPORTER_ASSERT(r, 1 == gX); 80 REPORTER_ASSERT(r, 1 == gX);
80 } 81 }
OLDNEW
« no previous file with comments | « tests/LazyPtrTest.cpp ('k') | tests/PathOpsSkpClipTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698