Revert of Lay groundwork for SkOpts. (patchset #3 id:40001 of https://codereview.chromium.org/1255193002/)
Reason for revert: Chromium doesn't call SkGraphics::Init(). This setup won't work. Original issue's description: > Lay groundwork for SkOpts. > > This doesn't really do anything yet. It's just the CPU detection code, skeleton new .cpp files, and a few little .gyp tweaks. > > BUG=skia:4117 > > Committed: https://skia.googlesource.com/skia/+/ce2c5055cee5d5d3c9fc84c1b3eeed4b4d84a827 TBR=djsollen@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4117 Review URL: https://codereview.chromium.org/1261743002
This commit is contained in:
parent
513f265877
commit
56b78a7a2a
@ -134,7 +134,6 @@
|
||||
'<(skia_src_path)/core/SkMiniRecorder.cpp',
|
||||
'<(skia_src_path)/core/SkMultiPictureDraw.cpp',
|
||||
'<(skia_src_path)/core/SkNinePatchIter.cpp',
|
||||
'<(skia_src_path)/core/SkOpts.cpp',
|
||||
'<(skia_src_path)/core/SkPackBits.cpp',
|
||||
'<(skia_src_path)/core/SkPaint.cpp',
|
||||
'<(skia_src_path)/core/SkPaintPriv.cpp',
|
||||
|
@ -105,7 +105,6 @@
|
||||
'type': 'static_library',
|
||||
'standalone_static_library': 1,
|
||||
'dependencies': [ 'core.gyp:*' ],
|
||||
'include_dirs': [ '../src/core' ],
|
||||
'sources': [ '<@(sse41_sources)' ],
|
||||
'conditions': [
|
||||
[ 'skia_os == "win"', {
|
||||
|
@ -34,7 +34,6 @@
|
||||
'<(skia_src_path)/opts/SkTextureCompression_opts_neon.cpp',
|
||||
'<(skia_src_path)/opts/SkUtils_opts_arm_neon.cpp',
|
||||
'<(skia_src_path)/opts/SkXfermode_opts_arm_neon.cpp',
|
||||
'<(skia_src_path)/opts/SkOpts_neon.cpp',
|
||||
],
|
||||
'arm64_sources': [
|
||||
'<(skia_src_path)/opts/SkBitmapProcState_arm_neon.cpp',
|
||||
@ -52,7 +51,6 @@
|
||||
'<(skia_src_path)/opts/SkUtils_opts_none.cpp',
|
||||
'<(skia_src_path)/opts/SkXfermode_opts_arm.cpp',
|
||||
'<(skia_src_path)/opts/SkXfermode_opts_arm_neon.cpp',
|
||||
'<(skia_src_path)/opts/SkOpts_neon.cpp',
|
||||
],
|
||||
|
||||
'mips_dsp_sources': [
|
||||
@ -76,15 +74,12 @@
|
||||
'<(skia_src_path)/opts/SkUtils_opts_SSE2.cpp',
|
||||
'<(skia_src_path)/opts/SkXfermode_opts_none.cpp',
|
||||
'<(skia_src_path)/opts/opts_check_x86.cpp',
|
||||
'<(skia_src_path)/opts/SkOpts_sse2.cpp',
|
||||
],
|
||||
'ssse3_sources': [
|
||||
'<(skia_src_path)/opts/SkBitmapProcState_opts_SSSE3.cpp',
|
||||
'<(skia_src_path)/opts/SkOpts_ssse3.cpp',
|
||||
],
|
||||
'sse41_sources': [
|
||||
'<(skia_src_path)/opts/SkBlurImage_opts_SSE4.cpp',
|
||||
'<(skia_src_path)/opts/SkBlitRow_opts_SSE4.cpp',
|
||||
'<(skia_src_path)/opts/SkOpts_sse41.cpp',
|
||||
],
|
||||
}
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "SkGeometry.h"
|
||||
#include "SkMath.h"
|
||||
#include "SkMatrix.h"
|
||||
#include "SkOpts.h"
|
||||
#include "SkPath.h"
|
||||
#include "SkPathEffect.h"
|
||||
#include "SkPixelRef.h"
|
||||
@ -51,7 +50,6 @@ void SkGraphics::GetVersion(int32_t* major, int32_t* minor, int32_t* patch) {
|
||||
#endif
|
||||
|
||||
void SkGraphics::Init() {
|
||||
SkOpts::Init();
|
||||
#ifdef SK_DEVELOPER
|
||||
skRTConfRegistry().possiblyDumpFile();
|
||||
skRTConfRegistry().validate();
|
||||
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright 2015 Google Inc.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "SkOpts.h"
|
||||
|
||||
#if defined(SK_CPU_X86)
|
||||
#if defined(SK_BUILD_FOR_WIN32)
|
||||
#include <intrin.h>
|
||||
static void cpuid(uint32_t abcd[4]) { __cpuid((int*)abcd, 1); }
|
||||
#else
|
||||
#include <cpuid.h>
|
||||
static void cpuid(uint32_t abcd[4]) { __get_cpuid(1, abcd+0, abcd+1, abcd+2, abcd+3); }
|
||||
#endif
|
||||
#elif defined(SK_BUILD_FOR_ANDROID)
|
||||
#include <cpu-features.h>
|
||||
#endif
|
||||
|
||||
namespace SkOpts {
|
||||
// (Define default function pointer values here...)
|
||||
|
||||
// Each Init_foo() is defined in src/opts/SkOpts_foo.cpp.
|
||||
void Init_sse2();
|
||||
void Init_ssse3();
|
||||
void Init_sse41();
|
||||
void Init_neon();
|
||||
//TODO: _dsp2, _armv7, _armv8, _x86, _x86_64, _sse42, _avx, avx2, ... ?
|
||||
|
||||
void Init() {
|
||||
#if defined(SK_CPU_X86)
|
||||
uint32_t abcd[] = {0,0,0,0};
|
||||
cpuid(abcd);
|
||||
if (abcd[3] & (1<<26)) { Init_sse2(); }
|
||||
if (abcd[2] & (1<< 9)) { Init_ssse3(); }
|
||||
if (abcd[2] & (1<<19)) { Init_sse41(); }
|
||||
|
||||
#elif defined(SK_ARM_HAS_NEON)
|
||||
Init_neon();
|
||||
|
||||
#elif defined(SK_BUILD_FOR_ANDROID)
|
||||
if (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) { Init_neon(); }
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright 2015 Google Inc.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#ifndef SkOpts_DEFINED
|
||||
#define SkOpts_DEFINED
|
||||
|
||||
#include "SkTypes.h"
|
||||
|
||||
namespace SkOpts {
|
||||
// Called by SkGraphics::Init().
|
||||
// It's not thread safe, but it's fine to call more than once.
|
||||
// If Init() were somehow not called, that'd also be fine: you'll get portable fallbacks.
|
||||
void Init();
|
||||
|
||||
// (Function pointers go here).
|
||||
}
|
||||
|
||||
#endif//SkOpts_DEFINED
|
@ -1,14 +0,0 @@
|
||||
/*
|
||||
* Copyright 2015 Google Inc.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "SkOpts.h"
|
||||
|
||||
namespace SkOpts {
|
||||
void Init_neon() {
|
||||
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
/*
|
||||
* Copyright 2015 Google Inc.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "SkOpts.h"
|
||||
|
||||
namespace SkOpts {
|
||||
void Init_sse2() {
|
||||
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
/*
|
||||
* Copyright 2015 Google Inc.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "SkOpts.h"
|
||||
|
||||
namespace SkOpts {
|
||||
void Init_sse41() {
|
||||
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
/*
|
||||
* Copyright 2015 Google Inc.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "SkOpts.h"
|
||||
|
||||
namespace SkOpts {
|
||||
void Init_ssse3() {
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user