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

Unified Diff: skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc

Issue 1126123004: Use TestDiscardableMemoryAllocator in filter_fuzz_stub. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mark filter fuzz stub as testonly Created 5 years, 7 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 | « skia/skia.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc
diff --git a/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc b/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc
index 4d5ec61ae156f27327604816ecdd66c5e3856a12..b96d9d3adc2677e58a1b7a292c115aa43355528b 100644
--- a/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc
+++ b/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc
@@ -4,6 +4,7 @@
#include "base/files/file_util.h"
#include "base/logging.h"
+#include "base/test/test_discardable_memory_allocator.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkFlattenableSerialization.h"
#include "third_party/skia/include/core/SkImageFilter.h"
@@ -72,6 +73,9 @@ bool ReadAndRunTestCase(const char* filename, SkBitmap& bitmap,
int main(int argc, char** argv) {
int ret = 0;
+ base::TestDiscardableMemoryAllocator discardable_memory_allocator;
+ base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator);
+
SkBitmap bitmap;
bitmap.allocN32Pixels(BitmapSize, BitmapSize);
SkCanvas canvas(bitmap);
« no previous file with comments | « skia/skia.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698