OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkCachingPixelRef.h" | 9 #include "SkCachingPixelRef.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
11 #include "SkData.h" | 11 #include "SkData.h" |
12 #include "SkDecodingImageGenerator.h" | 12 #include "SkDecodingImageGenerator.h" |
13 #include "SkDiscardableMemoryPool.h" | 13 #include "SkDiscardableMemoryPool.h" |
14 #include "SkImageDecoder.h" | 14 #include "SkImageDecoder.h" |
| 15 #include "SkImageEncoder.h" |
15 #include "SkImageGeneratorPriv.h" | 16 #include "SkImageGeneratorPriv.h" |
16 #include "SkResourceCache.h" | 17 #include "SkResourceCache.h" |
17 #include "SkStream.h" | 18 #include "SkStream.h" |
18 #include "SkUtils.h" | 19 #include "SkUtils.h" |
19 | 20 |
20 #include "Test.h" | 21 #include "Test.h" |
21 | 22 |
22 /** | 23 /** |
23 * Fill this bitmap with some color. | 24 * Fill this bitmap with some color. |
24 */ | 25 */ |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 canvas.clear(kDefaultColor); | 353 canvas.clear(kDefaultColor); |
353 canvas.drawImage(image, 0, 0, NULL); | 354 canvas.drawImage(image, 0, 0, NULL); |
354 if (TestImageGenerator::kSucceedGetPixels_TestType == test) { | 355 if (TestImageGenerator::kSucceedGetPixels_TestType == test) { |
355 REPORTER_ASSERT( | 356 REPORTER_ASSERT( |
356 r, TestImageGenerator::Color() == *bitmap.getAddr32(0, 0)); | 357 r, TestImageGenerator::Color() == *bitmap.getAddr32(0, 0)); |
357 } else { | 358 } else { |
358 REPORTER_ASSERT(r, kDefaultColor == bitmap.getColor(0,0)); | 359 REPORTER_ASSERT(r, kDefaultColor == bitmap.getColor(0,0)); |
359 } | 360 } |
360 } | 361 } |
361 } | 362 } |
OLD | NEW |