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

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

Issue 1629503002: Revert of de-proc sk_float_rsqrt (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months 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 | « include/private/SkFloatingPoint.h ('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 "SkMatrix.h" 11 #include "SkMatrix.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 15
16 struct ProcCoeff; 16 struct ProcCoeff;
17 17
18 namespace SkOpts { 18 namespace SkOpts {
19 // Call to replace pointers to portable functions with pointers to CPU-speci fic functions. 19 // Call to replace pointers to portable functions with pointers to CPU-speci fic functions.
20 // Thread-safe and idempotent. 20 // Thread-safe and idempotent.
21 // Called by SkGraphics::Init(), and automatically #if SK_ALLOW_STATIC_GLOBA L_INITIALIZERS. 21 // Called by SkGraphics::Init(), and automatically #if SK_ALLOW_STATIC_GLOBA L_INITIALIZERS.
22 void Init(); 22 void Init();
23 23
24 // Declare function pointers here... 24 // Declare function pointers here...
25 25
26 // Returns a fast approximation of 1.0f/sqrtf(x).
27 extern float (*rsqrt)(float);
28
26 // See SkUtils.h 29 // See SkUtils.h
27 extern void (*memset16)(uint16_t[], uint16_t, int); 30 extern void (*memset16)(uint16_t[], uint16_t, int);
28 extern void (*memset32)(uint32_t[], uint32_t, int); 31 extern void (*memset32)(uint32_t[], uint32_t, int);
29 32
30 // May return nullptr if we haven't specialized the given Mode. 33 // May return nullptr if we haven't specialized the given Mode.
31 extern SkXfermode* (*create_xfermode)(const ProcCoeff&, SkXfermode::Mode); 34 extern SkXfermode* (*create_xfermode)(const ProcCoeff&, SkXfermode::Mode);
32 35
33 typedef void (*BoxBlur)(const SkPMColor*, int, const SkIRect& srcBounds, SkP MColor*, int, int, int, int, int); 36 typedef void (*BoxBlur)(const SkPMColor*, int, const SkIRect& srcBounds, SkP MColor*, int, int, int, int, int);
34 extern BoxBlur box_blur_xx, box_blur_xy, box_blur_yx; 37 extern BoxBlur box_blur_xx, box_blur_xy, box_blur_yx;
35 38
(...skipping 20 matching lines...) Expand all
56 extern SkMatrix::MapPtsProc matrix_translate, matrix_scale_translate, matrix _affine; 59 extern SkMatrix::MapPtsProc matrix_translate, matrix_scale_translate, matrix _affine;
57 60
58 // Swizzle input into some sort of 8888 pixel, {premul,unpremul} x {rgba,bgr a}. 61 // Swizzle input into some sort of 8888 pixel, {premul,unpremul} x {rgba,bgr a}.
59 typedef void (*Swizzle_8888)(uint32_t*, const void*, int); 62 typedef void (*Swizzle_8888)(uint32_t*, const void*, int);
60 extern Swizzle_8888 RGBA_to_BGRA, // i.e. just swap RB 63 extern Swizzle_8888 RGBA_to_BGRA, // i.e. just swap RB
61 RGBA_to_rgbA, // i.e. just premultiply 64 RGBA_to_rgbA, // i.e. just premultiply
62 RGBA_to_bgrA; // i.e. swap RB and premultiply 65 RGBA_to_bgrA; // i.e. swap RB and premultiply
63 } 66 }
64 67
65 #endif//SkOpts_DEFINED 68 #endif//SkOpts_DEFINED
OLDNEW
« no previous file with comments | « include/private/SkFloatingPoint.h ('k') | src/core/SkOpts.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698