diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 242365d13676..9c967d8b6fe1 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -79,9 +79,6 @@ extern bool gSkForceRasterPipelineBlitter; extern bool gForceHighPrecisionRasterPipeline; -extern bool gUseSkVMBlitter; -extern bool gSkVMAllowJIT; -extern bool gSkVMJITViaDylib; #ifndef SK_BUILD_FOR_WIN #include @@ -154,9 +151,6 @@ static DEFINE_string(benchType, "", static DEFINE_bool(forceRasterPipeline, false, "sets gSkForceRasterPipelineBlitter"); static DEFINE_bool(forceRasterPipelineHP, false, "sets gSkForceRasterPipelineBlitter and gForceHighPrecisionRasterPipeline"); -static DEFINE_bool(skvm, false, "sets gUseSkVMBlitter"); -static DEFINE_bool(jit, true, "JIT SkVM?"); -static DEFINE_bool(dylib, false, "JIT via dylib (much slower compile but easier to debug/profile)"); static DEFINE_bool2(pre_log, p, false, "Log before running each test. May be incomprehensible when threading"); @@ -1422,9 +1416,6 @@ int main(int argc, char** argv) { gSkForceRasterPipelineBlitter = FLAGS_forceRasterPipelineHP || FLAGS_forceRasterPipeline; gForceHighPrecisionRasterPipeline = FLAGS_forceRasterPipelineHP; - gUseSkVMBlitter = FLAGS_skvm; - gSkVMAllowJIT = FLAGS_jit; - gSkVMJITViaDylib = FLAGS_dylib; // The SkSL memory benchmark must run before any GPU painting occurs. SkSL allocates memory for // its modules the first time they are accessed, and this test is trying to measure the size of diff --git a/dm/DM.cpp b/dm/DM.cpp index b8c28f90dbf2..d602b18f17a8 100644 --- a/dm/DM.cpp +++ b/dm/DM.cpp @@ -66,9 +66,6 @@ using namespace skia_private; extern bool gSkForceRasterPipelineBlitter; extern bool gForceHighPrecisionRasterPipeline; -extern bool gUseSkVMBlitter; -extern bool gSkVMAllowJIT; -extern bool gSkVMJITViaDylib; extern bool gSkBlobAsSlugTesting; static DEFINE_string(src, "tests gm skp mskp lottie rive svg image colorImage", @@ -104,9 +101,6 @@ static DEFINE_int(shard, 0, "Which shard do I run?"); static DEFINE_string(mskps, "", "Directory to read mskps from, or a single mskp file."); static DEFINE_bool(forceRasterPipeline, false, "sets gSkForceRasterPipelineBlitter"); static DEFINE_bool(forceRasterPipelineHP, false, "sets gSkForceRasterPipelineBlitter and gForceHighPrecisionRasterPipeline"); -static DEFINE_bool(skvm, false, "sets gUseSkVMBlitter"); -static DEFINE_bool(jit, true, "sets gSkVMAllowJIT"); -static DEFINE_bool(dylib, false, "JIT via dylib (much slower compile but easier to debug/profile)"); static DEFINE_bool(blobAsSlugTesting, false, "sets gSkBlobAsSlugTesting"); static DEFINE_string(bisect, "", @@ -1566,11 +1560,6 @@ int main(int argc, char** argv) { gSkForceRasterPipelineBlitter = FLAGS_forceRasterPipelineHP || FLAGS_forceRasterPipeline; gForceHighPrecisionRasterPipeline = FLAGS_forceRasterPipelineHP; gSkBlobAsSlugTesting = FLAGS_blobAsSlugTesting; -#if defined(SK_ENABLE_SKVM) - gUseSkVMBlitter = FLAGS_skvm; - gSkVMAllowJIT = FLAGS_jit; - gSkVMJITViaDylib = FLAGS_dylib; -#endif // The bots like having a verbose.log to upload, so always touch the file even if --verbose. if (!FLAGS_writePath.isEmpty()) { diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp index 688e7f56e4b2..41a0554eab65 100644 --- a/src/core/SkBlitter.cpp +++ b/src/core/SkBlitter.cpp @@ -30,7 +30,6 @@ using namespace skia_private; // Hacks for testing. -bool gUseSkVMBlitter{false}; bool gSkForceRasterPipelineBlitter{false}; SkBlitter::~SkBlitter() {} @@ -650,7 +649,7 @@ SkBlitter* SkBlitterClipper::apply(SkBlitter* blitter, const SkRegion* clip, bool SkBlitter::UseLegacyBlitter(const SkPixmap& device, const SkPaint& paint, const SkMatrix& matrix) { - if (gSkForceRasterPipelineBlitter || gUseSkVMBlitter) { + if (gSkForceRasterPipelineBlitter) { return false; } #if defined(SK_FORCE_RASTER_PIPELINE_BLITTER) @@ -743,16 +742,10 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device, } // Same basic idea used a few times: try SkRP, then try SkVM, then give up with a null-blitter. - // (Setting gUseSkVMBlitter is the only way we prefer SkVM over SkRP at the moment.) auto create_SkRP_or_SkVMBlitter = [&]() -> SkBlitter* { // We need to make sure that in case RP blitter cannot be created we use VM and // when VM blitter cannot be created we use RP - if (gUseSkVMBlitter) { - if (auto blitter = SkVMBlitter::Make(device, *paint, ctm, alloc, clipShader)) { - return blitter; - } - } if (auto blitter = SkCreateRasterPipelineBlitter(device, *paint, ctm, @@ -761,10 +754,8 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device, props)) { return blitter; } - if (!gUseSkVMBlitter) { - if (auto blitter = SkVMBlitter::Make(device, *paint, ctm, alloc, clipShader)) { - return blitter; - } + if (auto blitter = SkVMBlitter::Make(device, *paint, ctm, alloc, clipShader)) { + return blitter; } return alloc->make(); }; diff --git a/src/core/SkBlitter_Sprite.cpp b/src/core/SkBlitter_Sprite.cpp index ac38d1bbc999..d7dc3708f8f5 100644 --- a/src/core/SkBlitter_Sprite.cpp +++ b/src/core/SkBlitter_Sprite.cpp @@ -16,7 +16,6 @@ #include "src/core/SkSpriteBlitter.h" #include "src/core/SkVMBlitter.h" -extern bool gUseSkVMBlitter; extern bool gSkForceRasterPipelineBlitter; SkSpriteBlitter::SkSpriteBlitter(const SkPixmap& source) @@ -189,10 +188,6 @@ SkBlitter* SkBlitter::ChooseSprite(const SkPixmap& dst, const SkPaint& paint, */ SkASSERT(alloc != nullptr); - if (gUseSkVMBlitter) { - return SkVMBlitter::Make(dst, paint, source,left,top, alloc, std::move(clipShader)); - } - // TODO: in principle SkRasterPipelineSpriteBlitter could be made to handle this. if (source.alphaType() == kUnpremul_SkAlphaType) { return nullptr; diff --git a/src/core/SkDraw_atlas.cpp b/src/core/SkDraw_atlas.cpp index 8b50a11f856d..4d82a461cff8 100644 --- a/src/core/SkDraw_atlas.cpp +++ b/src/core/SkDraw_atlas.cpp @@ -77,8 +77,6 @@ static void load_color(SkRasterPipeline_UniformColorCtx* ctx, const float rgba[] ctx->rgba[3] = SkScalarRoundToInt(rgba[3]*255); ctx->a = rgba[3]; } -extern bool gUseSkVMBlitter; - class UpdatableColorShader : public SkShaderBase { public: explicit UpdatableColorShader(SkColorSpace* cs) @@ -204,7 +202,7 @@ void SkDraw::drawAtlas(const SkRSXform xform[], return true; }; - if (gUseSkVMBlitter || !rpblit()) { + if (!rpblit()) { UpdatableColorShader* colorShader = nullptr; sk_sp shader; if (colors) { diff --git a/src/core/SkDraw_vertices.cpp b/src/core/SkDraw_vertices.cpp index 4d20fd607c12..4c7b03600c64 100644 --- a/src/core/SkDraw_vertices.cpp +++ b/src/core/SkDraw_vertices.cpp @@ -353,8 +353,6 @@ static void fill_triangle(const VertState& state, SkBlitter* blitter, const SkRa } } -extern bool gUseSkVMBlitter; - void SkDraw::drawFixedVertices(const SkVertices* vertices, sk_sp blender, const SkPaint& paint, @@ -481,7 +479,7 @@ void SkDraw::drawFixedVertices(const SkVertices* vertices, return true; }; - if (gUseSkVMBlitter || !rpblit()) { + if (!rpblit()) { VertState state(vertexCount, indices, indexCount); VertState::Proc vertProc = state.chooseProc(info.mode()); diff --git a/src/core/SkVM.cpp b/src/core/SkVM.cpp index 59bf4cdb044b..70a950de06d9 100644 --- a/src/core/SkVM.cpp +++ b/src/core/SkVM.cpp @@ -28,7 +28,6 @@ using namespace skia_private; bool gSkVMAllowJIT{false}; -bool gSkVMJITViaDylib{false}; #if defined(SK_ENABLE_SKVM) @@ -3987,38 +3986,6 @@ namespace skvm { // Remap as executable, and flush caches on platforms that need that. remap_as_executable(jit_entry, fImpl->jit_size); - - #if !defined(SK_BUILD_FOR_WIN) - // For profiling and debugging, it's helpful to have this code loaded - // dynamically rather than just jumping info fImpl->jit_entry. - if (gSkVMJITViaDylib) { - // Dump the raw program binary. - SkString path = SkStringPrintf("/tmp/%s.XXXXXX", debug_name); - int fd = mkstemp(path.data()); - ::write(fd, jit_entry, a.size()); - close(fd); - - this->dropJIT(); // (unmap and null out fImpl->jit_entry.) - - // Convert it in-place to a dynamic library with a single symbol "skvm_jit": - SkString cmd = SkStringPrintf( - "echo '.global _skvm_jit\n_skvm_jit: .incbin \"%s\"'" - " | clang -x assembler -shared - -o %s", - path.c_str(), path.c_str()); - #if defined(__aarch64__) - cmd.append(" -arch arm64"); - #endif - system(cmd.c_str()); - - // Load that dynamic library and look up skvm_jit(). - fImpl->dylib = dlopen(path.c_str(), RTLD_NOW|RTLD_LOCAL); - void* sym = nullptr; - for (const char* name : {"skvm_jit", "_skvm_jit"} ) { - if (!sym) { sym = dlsym(fImpl->dylib, name); } - } - fImpl->jit_entry.store(sym); - } - #endif } void Program::disassemble(SkWStream* o) const { diff --git a/tools/fm/fm.cpp b/tools/fm/fm.cpp index 74bb4463a33a..84a37128fca0 100644 --- a/tools/fm/fm.cpp +++ b/tools/fm/fm.cpp @@ -65,10 +65,6 @@ static DEFINE_string(gamut , "srgb", "The color gamut for any raster backend." static DEFINE_string(tf , "srgb", "The transfer function for any raster backend."); static DEFINE_bool (legacy, false, "Use a null SkColorSpace instead of --gamut and --tf?"); -static DEFINE_bool (skvm , false, "Use SkVMBlitter when supported?"); -static DEFINE_bool (jit , true, "JIT SkVM?"); -static DEFINE_bool (dylib, false, "JIT SkVM via dylib?"); - static DEFINE_bool (reducedshaders, false, "Use reduced shader set for any GPU backend."); static DEFINE_int (samples , 0, "Samples per pixel in GPU backends."); static DEFINE_bool (stencils , true, "If false, avoid stencil buffers in GPU backends."); @@ -374,10 +370,6 @@ TestHarness CurrentTestHarness() { return TestHarness::kFM; } -extern bool gUseSkVMBlitter; -extern bool gSkVMAllowJIT; -extern bool gSkVMJITViaDylib; - int main(int argc, char** argv) { CommandLineFlags::Parse(argc, argv); SetupCrashHandler(); @@ -389,11 +381,6 @@ int main(int argc, char** argv) { #if defined(SK_ENABLE_SVG) SkGraphics::SetOpenTypeSVGDecoderFactory(SkSVGOpenTypeSVGDecoder::Make); #endif -#if defined(SK_ENABLE_SKVM) - gUseSkVMBlitter = FLAGS_skvm; - gSkVMAllowJIT = FLAGS_jit; - gSkVMJITViaDylib = FLAGS_dylib; -#endif initializeEventTracingForTools(); CommonFlags::SetDefaultFontMgr();