| 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 "SkRasterPipeline.h" | 11 #include "SkRasterPipeline.h" |
| 12 #include "SkTextureCompressor.h" | 12 #include "SkTextureCompressor.h" |
| 13 #include "SkTypes.h" | 13 #include "SkTypes.h" |
| 14 #include "SkXfermode.h" | 14 #include "SkXfermode.h" |
| 15 #include "SkConvolver.h" |
| 15 #include <functional> | 16 #include <functional> |
| 16 | 17 |
| 17 struct ProcCoeff; | 18 struct ProcCoeff; |
| 18 | 19 |
| 19 namespace SkOpts { | 20 namespace SkOpts { |
| 20 // Call to replace pointers to portable functions with pointers to CPU-speci
fic functions. | 21 // Call to replace pointers to portable functions with pointers to CPU-speci
fic functions. |
| 21 // Thread-safe and idempotent. | 22 // Thread-safe and idempotent. |
| 22 // Called by SkGraphics::Init(). | 23 // Called by SkGraphics::Init(). |
| 23 void Init(); | 24 void Init(); |
| 24 | 25 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 extern void (*srcover_srgb_srgb)(uint32_t* dst, const uint32_t* src, int nds
t, int nsrc); | 70 extern void (*srcover_srgb_srgb)(uint32_t* dst, const uint32_t* src, int nds
t, int nsrc); |
| 70 | 71 |
| 71 // The fastest high quality 32-bit hash we can provide on this platform. | 72 // The fastest high quality 32-bit hash we can provide on this platform. |
| 72 extern uint32_t (*hash_fn)(const void*, size_t, uint32_t seed); | 73 extern uint32_t (*hash_fn)(const void*, size_t, uint32_t seed); |
| 73 static inline uint32_t hash(const void* data, size_t bytes, uint32_t seed=0)
{ | 74 static inline uint32_t hash(const void* data, size_t bytes, uint32_t seed=0)
{ |
| 74 return hash_fn(data, bytes, seed); | 75 return hash_fn(data, bytes, seed); |
| 75 } | 76 } |
| 76 | 77 |
| 77 extern | 78 extern |
| 78 std::function<void(size_t, size_t)> (*compile_pipeline)(const SkRasterPipeli
ne::Stage*, int); | 79 std::function<void(size_t, size_t)> (*compile_pipeline)(const SkRasterPipeli
ne::Stage*, int); |
| 80 |
| 81 extern void (*convolve_vertically)(const SkConvolutionFilter1D::ConvolutionF
ixed* filter_values, |
| 82 int filter_length, unsigned char* const*
source_data_rows, |
| 83 int pixel_width, unsigned char* out_row,
bool has_alpha); |
| 84 extern void (*convolve_4_rows_horizontally)(const unsigned char* src_data[4]
, |
| 85 const SkConvolutionFilter1D& fil
ter, |
| 86 unsigned char* out_row[4], size_
t out_row_bytes); |
| 87 extern void (*convolve_horizontally)(const unsigned char* src_data, const Sk
ConvolutionFilter1D& filter, |
| 88 unsigned char* out_row, bool has_alpha)
; |
| 79 } | 89 } |
| 80 | 90 |
| 81 #endif//SkOpts_DEFINED | 91 #endif//SkOpts_DEFINED |
| OLD | NEW |