chromium/third_party/skia/src/core/SkOpts.cpp

/*
 * 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 "src/core/SkOpts.h"

#include "include/private/base/SkFeatures.h"
#include "src/core/SkCpu.h"
#include "src/core/SkOptsTargets.h"

#define SK_OPTS_TARGET
#include "src/opts/SkOpts_SetTarget.h"

#include "src/opts/SkRasterPipeline_opts.h"  // IWYU pragma: keep

#include "src/opts/SkOpts_RestoreTarget.h"

namespace SkOpts {
    // Define default function pointer values here...
    // 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.
    size_t raster_pipeline_lowp_stride  =;
    size_t raster_pipeline_highp_stride =;

#define M
    StageFn ops_highp[] =;
    StageFn just_return_highp =;
    void (*start_pipeline_highp)(size_t, size_t, size_t, size_t, SkRasterPipelineStage*,
                                 SkSpan<SkRasterPipeline_MemoryCtxPatch>,
                                 uint8_t*) =;
#undef M

#define M
    StageFn ops_lowp[] =;
    StageFn just_return_lowp =;
    void (*start_pipeline_lowp)(size_t, size_t, size_t, size_t, SkRasterPipelineStage*,
                                SkSpan<SkRasterPipeline_MemoryCtxPatch>,
                                uint8_t*) =;
#undef M

    // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp.
    void Init_hsw();
    void Init_skx();
    void Init_lasx();

    static bool init() {}

    void Init() {}
}  // namespace SkOpts