OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 The Android Open Source Project | 2 * Copyright 2010 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "Resources.h" | 8 #include "Resources.h" |
9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 TestSubstitute(reporter); | 362 TestSubstitute(reporter); |
363 test_issue1083(); | 363 test_issue1083(); |
364 } | 364 } |
365 | 365 |
366 namespace { | 366 namespace { |
367 | 367 |
368 class DummyImageFilter : public SkImageFilter { | 368 class DummyImageFilter : public SkImageFilter { |
369 public: | 369 public: |
370 DummyImageFilter(bool visited = false) : SkImageFilter(0, nullptr), fVisited
(visited) {} | 370 DummyImageFilter(bool visited = false) : SkImageFilter(0, nullptr), fVisited
(visited) {} |
371 ~DummyImageFilter() override {} | 371 ~DummyImageFilter() override {} |
372 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 372 bool onFilterImageDeprecated(Proxy*, const SkBitmap& src, const Context&, |
373 SkBitmap* result, SkIPoint* offset) const overrid
e { | 373 SkBitmap* result, SkIPoint* offset) const overr
ide { |
374 fVisited = true; | 374 fVisited = true; |
375 offset->fX = offset->fY = 0; | 375 offset->fX = offset->fY = 0; |
376 *result = src; | 376 *result = src; |
377 return true; | 377 return true; |
378 } | 378 } |
379 SK_TO_STRING_OVERRIDE() | 379 SK_TO_STRING_OVERRIDE() |
380 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(DummyImageFilter) | 380 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(DummyImageFilter) |
381 bool visited() const { return fVisited; } | 381 bool visited() const { return fVisited; } |
382 | 382 |
383 private: | 383 private: |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 SkAutoTUnref<SkTypeface> noEmbedTypeface(GetResourceAsTypeface(resource)); | 428 SkAutoTUnref<SkTypeface> noEmbedTypeface(GetResourceAsTypeface(resource)); |
429 if (noEmbedTypeface) { | 429 if (noEmbedTypeface) { |
430 REPORTER_ASSERT(reporter, | 430 REPORTER_ASSERT(reporter, |
431 !SkPDFFont::CanEmbedTypeface(noEmbedTypeface, &canon)); | 431 !SkPDFFont::CanEmbedTypeface(noEmbedTypeface, &canon)); |
432 } | 432 } |
433 SkAutoTUnref<SkTypeface> portableTypeface( | 433 SkAutoTUnref<SkTypeface> portableTypeface( |
434 sk_tool_utils::create_portable_typeface(NULL, SkTypeface::kNormal)); | 434 sk_tool_utils::create_portable_typeface(NULL, SkTypeface::kNormal)); |
435 REPORTER_ASSERT(reporter, | 435 REPORTER_ASSERT(reporter, |
436 SkPDFFont::CanEmbedTypeface(portableTypeface, &canon)); | 436 SkPDFFont::CanEmbedTypeface(portableTypeface, &canon)); |
437 } | 437 } |
OLD | NEW |