Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: src/core/SkOpts.h

Issue 2500113004: Port convolve functions to SkOpts (Closed)
Patch Set: Fix typo Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkConvolver.cpp ('k') | src/core/SkOpts.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "SkConvolver.h"
11 #include "SkRasterPipeline.h" 12 #include "SkRasterPipeline.h"
12 #include "SkTextureCompressor.h" 13 #include "SkTextureCompressor.h"
13 #include "SkTypes.h" 14 #include "SkTypes.h"
14 #include "SkXfermodePriv.h" 15 #include "SkXfermodePriv.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.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 std::function<void(size_t, size_t, size_t)> 78 extern std::function<void(size_t, size_t, size_t)>
78 (*compile_pipeline)(const SkRasterPipeline::Stage*, int); 79 (*compile_pipeline)(const SkRasterPipeline::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
OLDNEW
« no previous file with comments | « src/core/SkConvolver.cpp ('k') | src/core/SkOpts.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698