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

Side by Side Diff: src/core/SkUtils.cpp

Issue 12915007: Fix a few clang errors while trying to build tools target. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rm SkAutoMemoryUsageProbe Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkTextToPathIter.h ('k') | src/effects/SkDisplacementMapEffect.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkUtils.h" 10 #include "SkUtils.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 388 }
389 } else { 389 } else {
390 char* start = utf8; 390 char* start = utf8;
391 while (utf16 < stop) { 391 while (utf16 < stop) {
392 utf8 += SkUTF8_FromUnichar(SkUTF16_NextUnichar(&utf16), utf8); 392 utf8 += SkUTF8_FromUnichar(SkUTF16_NextUnichar(&utf16), utf8);
393 } 393 }
394 size = utf8 - start; 394 size = utf8 - start;
395 } 395 }
396 return size; 396 return size;
397 } 397 }
398
399 ///////////////////////////////////////////////////////////////////////////////
400
401 #include <stdlib.h>
402
403 #if 0
404 static int round_to_K(size_t bytes) {
405 return (bytes + 512) >> 10;
406 }
407 #endif
408
409 SkAutoMemoryUsageProbe::SkAutoMemoryUsageProbe(const char label[])
410 : fLabel(label) {
411 #if 0
412 struct mallinfo mi = mallinfo();
413
414 fBytesAllocated = mi.uordblks;
415 #endif
416 }
417
418 SkAutoMemoryUsageProbe::~SkAutoMemoryUsageProbe() {
419 #if 0
420 struct mallinfo mi = mallinfo();
421
422 printf("SkAutoMemoryUsageProbe ");
423 if (fLabel) {
424 printf("<%s> ", fLabel);
425 }
426 printf("delta %dK, current total allocated %dK\n",
427 round_to_K(mi.uordblks - fBytesAllocated),
428 round_to_K(mi.uordblks));
429 #endif
430 }
OLDNEW
« no previous file with comments | « src/core/SkTextToPathIter.h ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698