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

Unified Diff: src/core/SkStream.cpp

Issue 187653003: Add size_t bytesWritten() const to SkWStream. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add and use SkToSizeT Created 6 years, 9 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/SkDebug.cpp ('k') | src/utils/SkMD5.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkStream.cpp
diff --git a/src/core/SkStream.cpp b/src/core/SkStream.cpp
index 70f97d2f7c7fc1d5e828ef1c376e80dc8f886510..e766a1b35e7c18c52e327b8274ff02d244b51a6e 100644
--- a/src/core/SkStream.cpp
+++ b/src/core/SkStream.cpp
@@ -806,6 +806,7 @@ void SkDebugWStream::newline()
{
#if defined(SK_DEBUG) || defined(SK_DEVELOPER)
SkDebugf("\n");
+ fBytesWritten++;
#endif
}
@@ -817,6 +818,7 @@ bool SkDebugWStream::write(const void* buffer, size_t size)
s[size] = 0;
SkDebugf("%s", s);
delete[] s;
+ fBytesWritten += size+1;
#endif
hal.canary 2014/03/06 18:23:45 are you sure this isn't just size? printf doesn't
mtklein 2014/03/06 18:28:11 Oh, good catch. This should be += size. It seems
return true;
}
« no previous file with comments | « src/core/SkDebug.cpp ('k') | src/utils/SkMD5.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698