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

Unified Diff: bench/GrMemoryPoolBench.cpp

Issue 13831011: use SkAutoTDelete instead of SkTScopedPtr (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | « no previous file | include/core/SkTemplates.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/GrMemoryPoolBench.cpp
===================================================================
--- bench/GrMemoryPoolBench.cpp (revision 8748)
+++ bench/GrMemoryPoolBench.cpp (working copy)
@@ -11,8 +11,8 @@
#include "GrMemoryPool.h"
#include "SkBenchmark.h"
#include "SkRandom.h"
-#include "SkTScopedPtr.h"
#include "SkTDArray.h"
+#include "SkTemplates.h"
// change this to 0 to compare GrMemoryPool to default new / delete
#define OVERRIDE_NEW 1
@@ -107,14 +107,14 @@
enum {
kMaxObjects = 4 * (1 << 10),
};
- SkTScopedPtr<A> objects[kMaxObjects];
+ SkAutoTDelete<A> objects[kMaxObjects];
for (int i = 0; i < N; i++) {
uint32_t idx = r.nextRangeU(0, kMaxObjects-1);
if (NULL == objects[idx].get()) {
objects[idx].reset(new A);
} else {
- objects[idx].reset(NULL);
+ objects[idx].free();
}
}
}
« no previous file with comments | « no previous file | include/core/SkTemplates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698