| 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 "Test.h" | |
| 9 #include "SkBitmap.h" | 8 #include "SkBitmap.h" |
| 10 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 11 #include "SkColor.h" | 10 #include "SkColor.h" |
| 12 #include "SkColorPriv.h" | 11 #include "SkColorPriv.h" |
| 13 #include "SkData.h" | 12 #include "SkData.h" |
| 14 #include "SkDecodingImageGenerator.h" | 13 #include "SkDecodingImageGenerator.h" |
| 15 #include "SkDiscardableMemoryPool.h" | 14 #include "SkDiscardableMemoryPool.h" |
| 16 #include "SkForceLinking.h" | 15 #include "SkForceLinking.h" |
| 17 #include "SkGradientShader.h" | 16 #include "SkGradientShader.h" |
| 18 #include "SkImageDecoder.h" | 17 #include "SkImageDecoder.h" |
| 19 #include "SkImageEncoder.h" | 18 #include "SkImageEncoder.h" |
| 20 #include "SkImageGenerator.h" | 19 #include "SkImageGenerator.h" |
| 21 #include "SkImagePriv.h" | 20 #include "SkImagePriv.h" |
| 22 #include "SkOSFile.h" | 21 #include "SkOSFile.h" |
| 23 #include "SkPoint.h" | 22 #include "SkPoint.h" |
| 24 #include "SkShader.h" | 23 #include "SkShader.h" |
| 25 #include "SkStream.h" | 24 #include "SkStream.h" |
| 26 #include "SkString.h" | 25 #include "SkString.h" |
| 26 #include "Test.h" |
| 27 | 27 |
| 28 __SK_FORCE_IMAGE_DECODER_LINKING; | 28 __SK_FORCE_IMAGE_DECODER_LINKING; |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * Interprets c as an unpremultiplied color, and returns the | 31 * Interprets c as an unpremultiplied color, and returns the |
| 32 * premultiplied equivalent. | 32 * premultiplied equivalent. |
| 33 */ | 33 */ |
| 34 static SkPMColor premultiply_unpmcolor(SkPMColor c) { | 34 static SkPMColor premultiply_unpmcolor(SkPMColor c) { |
| 35 U8CPU a = SkGetPackedA32(c); | 35 U8CPU a = SkGetPackedA32(c); |
| 36 U8CPU r = SkGetPackedR32(c); | 36 U8CPU r = SkGetPackedR32(c); |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 } | 572 } |
| 573 SkDecodingImageGenerator::Options options(scaleList[i], | 573 SkDecodingImageGenerator::Options options(scaleList[i], |
| 574 ditherList[j]); | 574 ditherList[j]); |
| 575 test_options(reporter, options, encodedStream, encodedData, | 575 test_options(reporter, options, encodedStream, encodedData, |
| 576 useDataList[m], path); | 576 useDataList[m], path); |
| 577 } | 577 } |
| 578 } | 578 } |
| 579 } | 579 } |
| 580 } | 580 } |
| 581 } | 581 } |
| OLD | NEW |