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

Unified Diff: tests/DataRefTest.cpp

Issue 1872853002: Fix race condition in SkROBuffer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use constructors to make fCapacity const Created 4 years, 8 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 | « src/core/SkRWBuffer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/DataRefTest.cpp
diff --git a/tests/DataRefTest.cpp b/tests/DataRefTest.cpp
index 03b80fb2af4683ffe97bd8ce24e68f2340a35cf7..002abcbe894a816301db7383c17adb79d10a9880 100644
--- a/tests/DataRefTest.cpp
+++ b/tests/DataRefTest.cpp
@@ -294,11 +294,7 @@ DEF_TEST(RWBuffer, reporter) {
{
SkRWBuffer buffer;
for (int i = 0; i < N; ++i) {
- if (0 == (i & 1)) {
- buffer.append(gABC, 26);
- } else {
- memcpy(buffer.append(26), gABC, 26);
- }
+ buffer.append(gABC, 26);
readers[i] = buffer.newRBufferSnapshot();
streams[i] = buffer.newStreamSnapshot();
}
« no previous file with comments | « src/core/SkRWBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698