Update SkOpts namespaces.

portable -> default, and everyone gets an sk_ prefix.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1299013003
This commit is contained in:
mtklein 2015-08-18 10:00:29 -07:00 committed by Commit bot
parent 9dc2a9a972
commit b2a327094f
4 changed files with 39 additions and 39 deletions

View File

@ -8,7 +8,7 @@
#include "SkOnce.h"
#include "SkOpts.h"
#define SK_OPTS_NS portable
#define SK_OPTS_NS sk_default
#include "SkBlitMask_opts.h"
#include "SkBlurImageFilter_opts.h"
#include "SkColorCubeFilter_opts.h"
@ -32,28 +32,28 @@
namespace SkOpts {
// Define default function pointer values here...
// If our global compile options are set high enough, these 'portable' defaults might
// even be CPU-specialized, e.g. a typical x86-64 machine might start with SSE2 defaults.
// If our global compile options are set high enough, these defaults might even be
// CPU-specialized, e.g. a typical x86-64 machine might start with SSE2 defaults.
// They'll still get a chance to be replaced with even better ones, e.g. using SSE4.1.
decltype(rsqrt) rsqrt = portable::rsqrt;
decltype(memset16) memset16 = portable::memset16;
decltype(memset32) memset32 = portable::memset32;
decltype(rsqrt) rsqrt = sk_default::rsqrt;
decltype(memset16) memset16 = sk_default::memset16;
decltype(memset32) memset32 = sk_default::memset32;
decltype(create_xfermode) create_xfermode = SkCreate4pxXfermode;
decltype(color_cube_filter_span) color_cube_filter_span = portable::color_cube_filter_span;
decltype(color_cube_filter_span) color_cube_filter_span = sk_default::color_cube_filter_span;
decltype(box_blur_xx) box_blur_xx = portable::box_blur_xx;
decltype(box_blur_xy) box_blur_xy = portable::box_blur_xy;
decltype(box_blur_yx) box_blur_yx = portable::box_blur_yx;
decltype(box_blur_xx) box_blur_xx = sk_default::box_blur_xx;
decltype(box_blur_xy) box_blur_xy = sk_default::box_blur_xy;
decltype(box_blur_yx) box_blur_yx = sk_default::box_blur_yx;
decltype(dilate_x) dilate_x = portable::dilate_x;
decltype(dilate_y) dilate_y = portable::dilate_y;
decltype( erode_x) erode_x = portable::erode_x;
decltype( erode_y) erode_y = portable::erode_y;
decltype(dilate_x) dilate_x = sk_default::dilate_x;
decltype(dilate_y) dilate_y = sk_default::dilate_y;
decltype( erode_x) erode_x = sk_default::erode_x;
decltype( erode_y) erode_y = sk_default::erode_y;
decltype(texture_compressor) texture_compressor = portable::texture_compressor;
decltype(fill_block_dimensions) fill_block_dimensions = portable::fill_block_dimensions;
decltype(texture_compressor) texture_compressor = sk_default::texture_compressor;
decltype(fill_block_dimensions) fill_block_dimensions = sk_default::fill_block_dimensions;
decltype(blit_mask_d32_a8) blit_mask_d32_a8 = portable::blit_mask_d32_a8;
decltype(blit_mask_d32_a8) blit_mask_d32_a8 = sk_default::blit_mask_d32_a8;
// Each Init_foo() is defined in src/opts/SkOpts_foo.cpp.
void Init_ssse3();

View File

@ -7,7 +7,7 @@
#include "SkOpts.h"
#define SK_OPTS_NS neon
#define SK_OPTS_NS sk_neon
#include "SkBlitMask_opts.h"
#include "SkBlurImageFilter_opts.h"
#include "SkColorCubeFilter_opts.h"
@ -19,25 +19,25 @@
namespace SkOpts {
void Init_neon() {
rsqrt = neon::rsqrt;
memset16 = neon::memset16;
memset32 = neon::memset32;
rsqrt = sk_neon::rsqrt;
memset16 = sk_neon::memset16;
memset32 = sk_neon::memset32;
create_xfermode = SkCreate4pxXfermode;
box_blur_xx = neon::box_blur_xx;
box_blur_xy = neon::box_blur_xy;
box_blur_yx = neon::box_blur_yx;
box_blur_xx = sk_neon::box_blur_xx;
box_blur_xy = sk_neon::box_blur_xy;
box_blur_yx = sk_neon::box_blur_yx;
dilate_x = neon::dilate_x;
dilate_y = neon::dilate_y;
erode_x = neon::erode_x;
erode_y = neon::erode_y;
dilate_x = sk_neon::dilate_x;
dilate_y = sk_neon::dilate_y;
erode_x = sk_neon::erode_x;
erode_y = sk_neon::erode_y;
texture_compressor = neon::texture_compressor;
fill_block_dimensions = neon::fill_block_dimensions;
texture_compressor = sk_neon::texture_compressor;
fill_block_dimensions = sk_neon::fill_block_dimensions;
blit_mask_d32_a8 = neon::blit_mask_d32_a8;
blit_mask_d32_a8 = sk_neon::blit_mask_d32_a8;
color_cube_filter_span = neon::color_cube_filter_span;
color_cube_filter_span = sk_neon::color_cube_filter_span;
}
}

View File

@ -7,13 +7,13 @@
#include "SkOpts.h"
#define SK_OPTS_NS sse41
#define SK_OPTS_NS sk_sse41
#include "SkBlurImageFilter_opts.h"
namespace SkOpts {
void Init_sse41() {
box_blur_xx = sse41::box_blur_xx;
box_blur_xy = sse41::box_blur_xy;
box_blur_yx = sse41::box_blur_yx;
box_blur_xx = sk_sse41::box_blur_xx;
box_blur_xy = sk_sse41::box_blur_xy;
box_blur_yx = sk_sse41::box_blur_yx;
}
}

View File

@ -6,7 +6,7 @@
*/
#include "SkOpts.h"
#define SK_OPTS_NS ssse3
#define SK_OPTS_NS sk_ssse3
#include "SkBlitMask_opts.h"
#include "SkColorCubeFilter_opts.h"
#include "SkXfermode_opts.h"
@ -14,7 +14,7 @@
namespace SkOpts {
void Init_ssse3() {
create_xfermode = SkCreate4pxXfermode;
blit_mask_d32_a8 = ssse3::blit_mask_d32_a8;
color_cube_filter_span = ssse3::color_cube_filter_span;
blit_mask_d32_a8 = sk_ssse3::blit_mask_d32_a8;
color_cube_filter_span = sk_ssse3::color_cube_filter_span;
}
}