| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 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 "Test.h" | |
| 9 #include "SkBitmap.h" | 8 #include "SkBitmap.h" |
| 10 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 11 #include "SkData.h" | 10 #include "SkData.h" |
| 12 #include "SkDiscardableMemoryPool.h" | 11 #include "SkDiscardableMemoryPool.h" |
| 13 #include "SkImageGenerator.h" | 12 #include "SkImageGenerator.h" |
| 13 #include "SkMatrixUtils.h" |
| 14 #include "SkPaint.h" | 14 #include "SkPaint.h" |
| 15 #include "SkRandom.h" |
| 15 #include "SkShader.h" | 16 #include "SkShader.h" |
| 16 #include "SkSurface.h" | 17 #include "SkSurface.h" |
| 17 #include "SkRandom.h" | 18 #include "Test.h" |
| 18 #include "SkMatrixUtils.h" | |
| 19 | 19 |
| 20 // A BitmapFactory that always fails when asked to return pixels. | 20 // A BitmapFactory that always fails when asked to return pixels. |
| 21 class FailureImageGenerator : public SkImageGenerator { | 21 class FailureImageGenerator : public SkImageGenerator { |
| 22 public: | 22 public: |
| 23 FailureImageGenerator() { } | 23 FailureImageGenerator() { } |
| 24 virtual ~FailureImageGenerator() { } | 24 virtual ~FailureImageGenerator() { } |
| 25 virtual bool getInfo(SkImageInfo* info) SK_OVERRIDE { | 25 virtual bool getInfo(SkImageInfo* info) SK_OVERRIDE { |
| 26 info->fWidth = 100; | 26 info->fWidth = 100; |
| 27 info->fHeight = 100; | 27 info->fHeight = 100; |
| 28 info->fColorType = kPMColor_SkColorType; | 28 info->fColorType = kPMColor_SkColorType; |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 319 |
| 320 // ensure that we draw nothing if srcR does not intersect the bitmap | 320 // ensure that we draw nothing if srcR does not intersect the bitmap |
| 321 REPORTER_ASSERT(reporter, check_for_all_zeros(dst)); | 321 REPORTER_ASSERT(reporter, check_for_all_zeros(dst)); |
| 322 | 322 |
| 323 test_nan_antihair(); | 323 test_nan_antihair(); |
| 324 test_giantrepeat_crbug118018(reporter); | 324 test_giantrepeat_crbug118018(reporter); |
| 325 | 325 |
| 326 test_treatAsSprite(reporter); | 326 test_treatAsSprite(reporter); |
| 327 test_faulty_pixelref(reporter); | 327 test_faulty_pixelref(reporter); |
| 328 } | 328 } |
| OLD | NEW |