| 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 "gm.h" | 8 #include "gm.h" |
| 9 | 9 |
| 10 #include "Resources.h" | 10 #include "Resources.h" |
| 11 #include "SampleCode.h" | 11 #include "SampleCode.h" |
| 12 #include "SkBlurMask.h" | 12 #include "SkBlurMask.h" |
| 13 #include "SkBlurDrawLooper.h" | 13 #include "SkBlurDrawLooper.h" |
| 14 #include "SkCanvas.h" | 14 #include "SkCanvas.h" |
| 15 #include "SkColorPriv.h" | 15 #include "SkColorPriv.h" |
| 16 #include "SkForceLinking.h" | |
| 17 #include "SkImageDecoder.h" | 16 #include "SkImageDecoder.h" |
| 18 #include "SkOSFile.h" | 17 #include "SkOSFile.h" |
| 19 #include "SkStream.h" | 18 #include "SkStream.h" |
| 20 #include "SkString.h" | 19 #include "SkString.h" |
| 21 #include "SkSystemEventTypes.h" | 20 #include "SkSystemEventTypes.h" |
| 22 #include "SkTypes.h" | 21 #include "SkTypes.h" |
| 23 #include "SkUtils.h" | 22 #include "SkUtils.h" |
| 24 #include "SkView.h" | 23 #include "SkView.h" |
| 25 | 24 |
| 26 __SK_FORCE_IMAGE_DECODER_LINKING; | |
| 27 | |
| 28 // Defined in SampleColorFilter.cpp | 25 // Defined in SampleColorFilter.cpp |
| 29 extern SkShader* createChecker(); | 26 extern SkShader* createChecker(); |
| 30 | 27 |
| 31 /** | 28 /** |
| 32 * Interprets c as an unpremultiplied color, and returns the | 29 * Interprets c as an unpremultiplied color, and returns the |
| 33 * premultiplied equivalent. | 30 * premultiplied equivalent. |
| 34 */ | 31 */ |
| 35 static SkPMColor premultiply_unpmcolor(SkPMColor c) { | 32 static SkPMColor premultiply_unpmcolor(SkPMColor c) { |
| 36 U8CPU a = SkGetPackedA32(c); | 33 U8CPU a = SkGetPackedA32(c); |
| 37 U8CPU r = SkGetPackedR32(c); | 34 U8CPU r = SkGetPackedR32(c); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 190 |
| 194 typedef SampleView INHERITED; | 191 typedef SampleView INHERITED; |
| 195 }; | 192 }; |
| 196 | 193 |
| 197 ////////////////////////////////////////////////////////////////////////////// | 194 ////////////////////////////////////////////////////////////////////////////// |
| 198 | 195 |
| 199 static SkView* MyFactory() { | 196 static SkView* MyFactory() { |
| 200 return new UnpremulView(GetResourcePath()); | 197 return new UnpremulView(GetResourcePath()); |
| 201 } | 198 } |
| 202 static SkViewRegister reg(MyFactory); | 199 static SkViewRegister reg(MyFactory); |
| OLD | NEW |