| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 "SkBitmapProcShader.h" | 8 #include "SkBitmapProcShader.h" |
| 9 #include "SkColorFilter.h" | 9 #include "SkColorFilter.h" |
| 10 #include "SkColorFilterShader.h" | 10 #include "SkColorFilterShader.h" |
| 11 #include "SkColorShader.h" | 11 #include "SkColorShader.h" |
| 12 #include "SkComposeShader.h" | 12 #include "SkComposeShader.h" |
| 13 #include "SkEmptyShader.h" | 13 #include "SkEmptyShader.h" |
| 14 #include "SkFlattenable.h" | 14 #include "SkFlattenable.h" |
| 15 #include "SkImageShader.h" | 15 #include "SkImageShader.h" |
| 16 #include "SkLocalMatrixShader.h" | 16 #include "SkLocalMatrixShader.h" |
| 17 #include "SkMatrixImageFilter.h" | |
| 18 #include "SkOnce.h" | 17 #include "SkOnce.h" |
| 19 #include "SkPathEffect.h" | 18 #include "SkPathEffect.h" |
| 20 #include "SkPictureShader.h" | 19 #include "SkPictureShader.h" |
| 21 #include "SkRecordedDrawable.h" | 20 #include "SkMatrixImageFilter.h" |
| 22 #include "SkXfermode.h" | 21 #include "SkXfermode.h" |
| 23 | 22 |
| 24 /* | 23 /* |
| 25 * Registers all of the required effects subclasses for picture deserialization
. | 24 * Registers all of the required effects subclasses for picture deserialization
. |
| 26 * | 25 * |
| 27 * Optional subclasses (e.g. Blur) should be registered in the ports/ version o
f this file, | 26 * Optional subclasses (e.g. Blur) should be registered in the ports/ version o
f this file, |
| 28 * inside the InitEffects() method. | 27 * inside the InitEffects() method. |
| 29 */ | 28 */ |
| 30 void SkFlattenable::PrivateInitializer::InitCore() { | 29 void SkFlattenable::PrivateInitializer::InitCore() { |
| 31 // Shader | 30 // Shader |
| (...skipping 11 matching lines...) Expand all Loading... |
| 43 | 42 |
| 44 // ImageFilter | 43 // ImageFilter |
| 45 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixImageFilter) | 44 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkMatrixImageFilter) |
| 46 | 45 |
| 47 // ColorFilter | 46 // ColorFilter |
| 48 SkColorFilter::InitializeFlattenables(); | 47 SkColorFilter::InitializeFlattenables(); |
| 49 | 48 |
| 50 // Xfermode | 49 // Xfermode |
| 51 SkXfermode::InitializeFlattenables(); | 50 SkXfermode::InitializeFlattenables(); |
| 52 | 51 |
| 53 // Drawable | |
| 54 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkRecordedDrawable) | |
| 55 | |
| 56 // Now initialize any optional/additional effects (implemented in src/ports) | 52 // Now initialize any optional/additional effects (implemented in src/ports) |
| 57 InitEffects(); | 53 InitEffects(); |
| 58 }; | 54 }; |
| 59 | 55 |
| 60 void SkFlattenable::InitializeFlattenablesIfNeeded() { | 56 void SkFlattenable::InitializeFlattenablesIfNeeded() { |
| 61 static SkOnce once; | 57 static SkOnce once; |
| 62 once(SkFlattenable::PrivateInitializer::InitCore); | 58 once(SkFlattenable::PrivateInitializer::InitCore); |
| 63 } | 59 } |
| OLD | NEW |