| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef SkOpts_DEFINED | 8 #ifndef SkOpts_DEFINED |
| 9 #define SkOpts_DEFINED | 9 #define SkOpts_DEFINED |
| 10 | 10 |
| 11 #include "SkMatrix.h" | |
| 12 #include "SkTextureCompressor.h" | 11 #include "SkTextureCompressor.h" |
| 13 #include "SkTypes.h" | 12 #include "SkTypes.h" |
| 14 #include "SkXfermode.h" | 13 #include "SkXfermode.h" |
| 15 | 14 |
| 16 struct ProcCoeff; | 15 struct ProcCoeff; |
| 17 | 16 |
| 18 namespace SkOpts { | 17 namespace SkOpts { |
| 19 // Call to replace pointers to portable functions with pointers to CPU-speci
fic functions. | 18 // Call to replace pointers to portable functions with pointers to CPU-speci
fic functions. |
| 20 // Thread-safe and idempotent. | 19 // Thread-safe and idempotent. |
| 21 // Called by SkGraphics::Init(), and automatically #if SK_ALLOW_STATIC_GLOBA
L_INITIALIZERS. | 20 // Called by SkGraphics::Init(), and automatically #if SK_ALLOW_STATIC_GLOBA
L_INITIALIZERS. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 43 | 42 |
| 44 // This function is an optimized version of SkColorCubeFilter::filterSpan | 43 // This function is an optimized version of SkColorCubeFilter::filterSpan |
| 45 extern void (*color_cube_filter_span)(const SkPMColor[], | 44 extern void (*color_cube_filter_span)(const SkPMColor[], |
| 46 int, | 45 int, |
| 47 SkPMColor[], | 46 SkPMColor[], |
| 48 const int * [2], | 47 const int * [2], |
| 49 const SkScalar * [2], | 48 const SkScalar * [2], |
| 50 int, | 49 int, |
| 51 const SkColor*); | 50 const SkColor*); |
| 52 | 51 |
| 53 extern SkMatrix::MapPtsProc matrix_translate, matrix_scale_translate, matrix
_affine; | |
| 54 | |
| 55 // Swizzle input into some sort of 8888 pixel, {premul,unpremul} x {rgba,bgr
a}. | 52 // Swizzle input into some sort of 8888 pixel, {premul,unpremul} x {rgba,bgr
a}. |
| 56 typedef void (*Swizzle_8888)(uint32_t*, const void*, int); | 53 typedef void (*Swizzle_8888)(uint32_t*, const void*, int); |
| 57 extern Swizzle_8888 RGBA_to_BGRA, // i.e. just swap RB | 54 extern Swizzle_8888 RGBA_to_BGRA, // i.e. just swap RB |
| 58 RGBA_to_rgbA, // i.e. just premultiply | 55 RGBA_to_rgbA, // i.e. just premultiply |
| 59 RGBA_to_bgrA, // i.e. swap RB and premultiply | 56 RGBA_to_bgrA, // i.e. swap RB and premultiply |
| 60 RGB_to_RGB1, // i.e. insert an opaque alpha | 57 RGB_to_RGB1, // i.e. insert an opaque alpha |
| 61 RGB_to_BGR1, // i.e. swap RB and insert an opa
que alpha | 58 RGB_to_BGR1, // i.e. swap RB and insert an opa
que alpha |
| 62 gray_to_RGB1, // i.e. expand to color channels
+ an opaque alpha | 59 gray_to_RGB1, // i.e. expand to color channels
+ an opaque alpha |
| 63 grayA_to_RGBA, // i.e. expand to color channels | 60 grayA_to_RGBA, // i.e. expand to color channels |
| 64 grayA_to_rgbA, // i.e. expand to color channels
and premultiply | 61 grayA_to_rgbA, // i.e. expand to color channels
and premultiply |
| 65 inverted_CMYK_to_RGB1, // i.e. convert color space | 62 inverted_CMYK_to_RGB1, // i.e. convert color space |
| 66 inverted_CMYK_to_BGR1; // i.e. convert color space | 63 inverted_CMYK_to_BGR1; // i.e. convert color space |
| 67 | 64 |
| 68 extern void (*half_to_float)(float[], const uint16_t[], int); | 65 extern void (*half_to_float)(float[], const uint16_t[], int); |
| 69 extern void (*float_to_half)(uint16_t[], const float[], int); | 66 extern void (*float_to_half)(uint16_t[], const float[], int); |
| 70 } | 67 } |
| 71 | 68 |
| 72 #endif//SkOpts_DEFINED | 69 #endif//SkOpts_DEFINED |
| OLD | NEW |