diff options
author | mbarbella <mbarbella@chromium.org> | 2015-05-08 12:34:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-08 19:35:01 +0000 |
commit | 593baab3ff8a986e3a2e88f2b9d190ed0d03f4fa (patch) | |
tree | 4a4d0cb22a06ce0a31e7da4c044540353e87d5a0 /skia | |
parent | 9463868c8a2d30b6a81db9fd2b61e8a5935ac347 (diff) | |
download | chromium_src-593baab3ff8a986e3a2e88f2b9d190ed0d03f4fa.zip chromium_src-593baab3ff8a986e3a2e88f2b9d190ed0d03f4fa.tar.gz chromium_src-593baab3ff8a986e3a2e88f2b9d190ed0d03f4fa.tar.bz2 |
Use TestDiscardableMemoryAllocator in filter_fuzz_stub.
R=sugoi@chromium.org,sugoi@google.com
BUG=
Review URL: https://codereview.chromium.org/1126123004
Cr-Commit-Position: refs/heads/master@{#329013}
Diffstat (limited to 'skia')
-rw-r--r-- | skia/BUILD.gn | 2 | ||||
-rw-r--r-- | skia/skia.gyp | 1 | ||||
-rw-r--r-- | skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc | 4 |
3 files changed, 7 insertions, 0 deletions
diff --git a/skia/BUILD.gn b/skia/BUILD.gn index 7a42569..30a0453 100644 --- a/skia/BUILD.gn +++ b/skia/BUILD.gn @@ -665,6 +665,7 @@ if (is_linux && !is_chromeos) { } executable("filter_fuzz_stub") { + testonly = true sources = [ "tools/filter_fuzz_stub/filter_fuzz_stub.cc", ] @@ -672,6 +673,7 @@ if (is_linux && !is_chromeos) { deps = [ ":skia", "//base", + "//base/test:test_support", ] } } diff --git a/skia/skia.gyp b/skia/skia.gyp index 109adff..0f13b69 100644 --- a/skia/skia.gyp +++ b/skia/skia.gyp @@ -137,6 +137,7 @@ 'type': 'executable', 'dependencies': [ '../base/base.gyp:base', + '../base/base.gyp:test_support_base', 'skia.gyp:skia', ], 'sources': [ diff --git a/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc b/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc index 4d5ec61..b96d9d3 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); |