2018-07-20 18:50:44 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2016 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "bench/Benchmark.h"
|
2018-07-20 18:50:44 +00:00
|
|
|
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "include/core/SkString.h"
|
2020-07-06 17:45:34 +00:00
|
|
|
#include "include/gpu/GrDirectContext.h"
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "include/private/SkHalf.h"
|
|
|
|
#include "src/core/SkColorSpacePriv.h"
|
2020-10-14 15:23:11 +00:00
|
|
|
#include "src/gpu/GrDirectContextPriv.h"
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "src/gpu/GrGeometryProcessor.h"
|
|
|
|
#include "src/gpu/GrMemoryPool.h"
|
2020-03-12 13:41:54 +00:00
|
|
|
#include "src/gpu/GrProgramInfo.h"
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "src/gpu/SkGr.h"
|
|
|
|
#include "src/gpu/glsl/GrGLSLColorSpaceXformHelper.h"
|
|
|
|
#include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
|
|
|
|
#include "src/gpu/glsl/GrGLSLVarying.h"
|
|
|
|
#include "src/gpu/glsl/GrGLSLVertexGeoBuilder.h"
|
|
|
|
#include "src/gpu/ops/GrMeshDrawOp.h"
|
2019-12-05 21:40:31 +00:00
|
|
|
#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
|
2021-07-28 19:13:20 +00:00
|
|
|
#include "src/gpu/v1/SurfaceDrawContext_v1.h"
|
2018-07-20 18:50:44 +00:00
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
enum Mode {
|
|
|
|
kBaseline_Mode, // Do the wrong thing, but quickly.
|
|
|
|
kFloat_Mode, // Transform colors on CPU, use float4 attributes.
|
2018-09-17 15:32:42 +00:00
|
|
|
kHalf_Mode, // Transform colors on CPU, use half4 attributes.
|
2018-07-20 18:50:44 +00:00
|
|
|
kShader_Mode, // Use ubyte4 attributes, transform colors on GPU (vertex shader).
|
|
|
|
};
|
|
|
|
|
|
|
|
class GP : public GrGeometryProcessor {
|
|
|
|
public:
|
2019-11-20 21:08:10 +00:00
|
|
|
static GrGeometryProcessor* Make(SkArenaAlloc* arena, Mode mode,
|
|
|
|
sk_sp<GrColorSpaceXform> colorSpaceXform) {
|
2020-12-14 21:59:09 +00:00
|
|
|
return arena->make([&](void* ptr) {
|
|
|
|
return new (ptr) GP(mode, std::move(colorSpaceXform));
|
|
|
|
});
|
2018-07-20 18:50:44 +00:00
|
|
|
}
|
2019-11-20 21:08:10 +00:00
|
|
|
|
2018-07-20 18:50:44 +00:00
|
|
|
const char* name() const override { return "VertexColorXformGP"; }
|
|
|
|
|
2021-08-09 19:56:24 +00:00
|
|
|
std::unique_ptr<ProgramImpl> makeProgramImpl(const GrShaderCaps&) const override {
|
2021-08-11 13:59:56 +00:00
|
|
|
class Impl : public ProgramImpl {
|
2018-07-20 18:50:44 +00:00
|
|
|
public:
|
2021-08-11 13:59:56 +00:00
|
|
|
void setData(const GrGLSLProgramDataManager& pdman,
|
|
|
|
const GrShaderCaps&,
|
|
|
|
const GrGeometryProcessor& geomProc) override {
|
|
|
|
const GP& gp = geomProc.cast<GP>();
|
|
|
|
fColorSpaceHelper.setData(pdman, gp.fColorSpaceXform.get());
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2018-07-20 18:50:44 +00:00
|
|
|
void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override {
|
2021-03-22 18:48:09 +00:00
|
|
|
const GP& gp = args.fGeomProc.cast<GP>();
|
2018-07-20 18:50:44 +00:00
|
|
|
GrGLSLVertexBuilder* vertBuilder = args.fVertBuilder;
|
|
|
|
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
|
|
|
|
GrGLSLVaryingHandler* varyingHandler = args.fVaryingHandler;
|
|
|
|
GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
|
|
|
|
|
|
|
|
varyingHandler->emitAttributes(gp);
|
|
|
|
|
|
|
|
// Setup color
|
|
|
|
GrGLSLVarying varying(kHalf4_GrSLType);
|
|
|
|
varyingHandler->addVarying("color", &varying);
|
|
|
|
vertBuilder->codeAppendf("half4 color = %s;", gp.fInColor.name());
|
|
|
|
|
|
|
|
if (kShader_Mode == gp.fMode) {
|
|
|
|
fColorSpaceHelper.emitCode(uniformHandler, gp.fColorSpaceXform.get(),
|
|
|
|
kVertex_GrShaderFlag);
|
|
|
|
SkString xformedColor;
|
|
|
|
vertBuilder->appendColorGamutXform(&xformedColor, "color", &fColorSpaceHelper);
|
|
|
|
vertBuilder->codeAppendf("color = %s;", xformedColor.c_str());
|
|
|
|
vertBuilder->codeAppend("color = half4(color.rgb * color.a, color.a);");
|
|
|
|
}
|
|
|
|
|
|
|
|
vertBuilder->codeAppendf("%s = color;", varying.vsOut());
|
2021-03-10 01:16:43 +00:00
|
|
|
fragBuilder->codeAppendf("half4 %s = %s;", args.fOutputColor, varying.fsIn());
|
2018-07-20 18:50:44 +00:00
|
|
|
|
|
|
|
// Position
|
2021-04-14 14:32:25 +00:00
|
|
|
WriteOutputPosition(args.fVertBuilder, gpArgs, gp.fInPosition.name());
|
2018-07-20 18:50:44 +00:00
|
|
|
|
|
|
|
// Coverage
|
2021-03-10 01:16:43 +00:00
|
|
|
fragBuilder->codeAppendf("const half4 %s = half4(1);", args.fOutputCoverage);
|
2018-07-20 18:50:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GrGLSLColorSpaceXformHelper fColorSpaceHelper;
|
|
|
|
};
|
2021-08-11 13:59:56 +00:00
|
|
|
|
|
|
|
return std::make_unique<Impl>();
|
2018-07-20 18:50:44 +00:00
|
|
|
}
|
|
|
|
|
2021-08-06 19:33:58 +00:00
|
|
|
void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
|
2018-07-20 18:50:44 +00:00
|
|
|
b->add32(fMode);
|
|
|
|
b->add32(GrColorSpaceXform::XformKey(fColorSpaceXform.get()));
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2019-11-20 21:08:10 +00:00
|
|
|
GP(Mode mode, sk_sp<GrColorSpaceXform> colorSpaceXform)
|
|
|
|
: INHERITED(kVertexColorSpaceBenchGP_ClassID)
|
|
|
|
, fMode(mode)
|
|
|
|
, fColorSpaceXform(std::move(colorSpaceXform)) {
|
|
|
|
fInPosition = {"inPosition", kFloat2_GrVertexAttribType, kFloat2_GrSLType};
|
|
|
|
switch (fMode) {
|
|
|
|
case kBaseline_Mode:
|
|
|
|
case kShader_Mode:
|
|
|
|
fInColor = {"inColor", kUByte4_norm_GrVertexAttribType, kHalf4_GrSLType};
|
|
|
|
break;
|
|
|
|
case kFloat_Mode:
|
|
|
|
fInColor = {"inColor", kFloat4_GrVertexAttribType, kHalf4_GrSLType};
|
|
|
|
break;
|
|
|
|
case kHalf_Mode:
|
|
|
|
fInColor = {"inColor", kHalf4_GrVertexAttribType, kHalf4_GrSLType};
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
this->setVertexAttributes(&fInPosition, 2);
|
|
|
|
}
|
|
|
|
|
2018-07-20 18:50:44 +00:00
|
|
|
Mode fMode;
|
|
|
|
sk_sp<GrColorSpaceXform> fColorSpaceXform;
|
|
|
|
|
|
|
|
Attribute fInPosition;
|
|
|
|
Attribute fInColor;
|
|
|
|
|
2020-09-03 02:42:33 +00:00
|
|
|
using INHERITED = GrGeometryProcessor;
|
2018-07-20 18:50:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class Op : public GrMeshDrawOp {
|
|
|
|
public:
|
|
|
|
DEFINE_OP_CLASS_ID
|
|
|
|
|
|
|
|
const char* name() const override { return "VertColorXformOp"; }
|
|
|
|
|
|
|
|
Op(GrColor color)
|
|
|
|
: INHERITED(ClassID())
|
|
|
|
, fMode(kBaseline_Mode)
|
|
|
|
, fColor(color) {
|
2019-10-01 19:14:44 +00:00
|
|
|
this->setBounds(SkRect::MakeWH(100.f, 100.f), HasAABloat::kNo, IsHairline::kNo);
|
2018-07-20 18:50:44 +00:00
|
|
|
}
|
|
|
|
|
2018-10-16 19:19:28 +00:00
|
|
|
Op(const SkColor4f& color4f, Mode mode)
|
2018-07-20 18:50:44 +00:00
|
|
|
: INHERITED(ClassID())
|
2018-09-17 15:32:42 +00:00
|
|
|
, fMode(mode)
|
2018-07-20 18:50:44 +00:00
|
|
|
, fColor4f(color4f) {
|
2018-10-26 18:57:35 +00:00
|
|
|
SkASSERT(kFloat_Mode == fMode || kHalf_Mode == mode);
|
2019-10-01 19:14:44 +00:00
|
|
|
this->setBounds(SkRect::MakeWH(100.f, 100.f), HasAABloat::kNo, IsHairline::kNo);
|
2018-07-20 18:50:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Op(GrColor color, sk_sp<GrColorSpaceXform> colorSpaceXform)
|
|
|
|
: INHERITED(ClassID())
|
|
|
|
, fMode(kShader_Mode)
|
|
|
|
, fColor(color)
|
|
|
|
, fColorSpaceXform(std::move(colorSpaceXform)) {
|
2019-10-01 19:14:44 +00:00
|
|
|
this->setBounds(SkRect::MakeWH(100.f, 100.f), HasAABloat::kNo, IsHairline::kNo);
|
2018-07-20 18:50:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
FixedFunctionFlags fixedFunctionFlags() const override {
|
|
|
|
return FixedFunctionFlags::kNone;
|
|
|
|
}
|
|
|
|
|
2021-04-22 18:57:28 +00:00
|
|
|
GrProcessorSet::Analysis finalize(const GrCaps&, const GrAppliedClip*, GrClampType) override {
|
2019-01-15 18:53:00 +00:00
|
|
|
return GrProcessorSet::EmptySetAnalysis();
|
2018-07-20 18:50:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2020-10-27 14:29:46 +00:00
|
|
|
friend class ::GrMemoryPool;
|
2018-07-20 18:50:44 +00:00
|
|
|
|
2020-03-12 16:07:19 +00:00
|
|
|
GrProgramInfo* programInfo() override { return fProgramInfo; }
|
|
|
|
|
2020-03-12 13:41:54 +00:00
|
|
|
void onCreateProgramInfo(const GrCaps* caps,
|
|
|
|
SkArenaAlloc* arena,
|
2020-11-19 18:41:26 +00:00
|
|
|
const GrSurfaceProxyView& writeView,
|
2021-07-13 19:26:39 +00:00
|
|
|
bool usesMSAASurface,
|
2020-03-12 13:41:54 +00:00
|
|
|
GrAppliedClip&& appliedClip,
|
2021-06-02 15:58:05 +00:00
|
|
|
const GrDstProxyView& dstProxyView,
|
2020-11-20 15:22:43 +00:00
|
|
|
GrXferBarrierFlags renderPassXferBarriers,
|
|
|
|
GrLoadOp colorLoadOp) override {
|
2020-03-12 13:41:54 +00:00
|
|
|
GrGeometryProcessor* gp = GP::Make(arena, fMode, fColorSpaceXform);
|
|
|
|
|
|
|
|
fProgramInfo = GrSimpleMeshDrawOpHelper::CreateProgramInfo(caps,
|
|
|
|
arena,
|
2020-04-01 20:22:00 +00:00
|
|
|
writeView,
|
2021-08-26 16:05:11 +00:00
|
|
|
usesMSAASurface,
|
2020-03-12 13:41:54 +00:00
|
|
|
std::move(appliedClip),
|
|
|
|
dstProxyView,
|
|
|
|
gp,
|
|
|
|
GrProcessorSet::MakeEmptySet(),
|
|
|
|
GrPrimitiveType::kTriangleStrip,
|
2020-09-11 13:33:54 +00:00
|
|
|
renderPassXferBarriers,
|
2020-11-20 15:22:43 +00:00
|
|
|
colorLoadOp,
|
2020-03-12 13:41:54 +00:00
|
|
|
GrPipeline::InputFlags::kNone);
|
|
|
|
}
|
|
|
|
|
2021-06-17 18:55:07 +00:00
|
|
|
void onPrepareDraws(GrMeshDrawTarget* target) override {
|
2020-03-12 13:41:54 +00:00
|
|
|
if (!fProgramInfo) {
|
|
|
|
this->createProgramInfo(target);
|
|
|
|
}
|
2018-07-20 18:50:44 +00:00
|
|
|
|
2021-03-22 18:48:09 +00:00
|
|
|
size_t vertexStride = fProgramInfo->geomProc().vertexStride();
|
2018-07-20 18:50:44 +00:00
|
|
|
const int kVertexCount = 1024;
|
2019-01-29 19:38:50 +00:00
|
|
|
sk_sp<const GrBuffer> vertexBuffer;
|
2018-07-20 18:50:44 +00:00
|
|
|
int firstVertex = 0;
|
|
|
|
void* verts = target->makeVertexSpace(vertexStride, kVertexCount, &vertexBuffer,
|
|
|
|
&firstVertex);
|
|
|
|
if (!verts) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
const float dx = 100.0f / kVertexCount;
|
|
|
|
if (kFloat_Mode == fMode) {
|
|
|
|
struct V {
|
|
|
|
SkPoint fPos;
|
2018-10-16 19:19:28 +00:00
|
|
|
SkColor4f fColor;
|
2018-07-20 18:50:44 +00:00
|
|
|
};
|
|
|
|
SkASSERT(sizeof(V) == vertexStride);
|
|
|
|
V* v = (V*)verts;
|
|
|
|
for (int i = 0; i < kVertexCount; i += 2) {
|
|
|
|
v[i + 0].fPos.set(dx * i, 0.0f);
|
|
|
|
v[i + 0].fColor = fColor4f;
|
|
|
|
v[i + 1].fPos.set(dx * i, 100.0f);
|
|
|
|
v[i + 1].fColor = fColor4f;
|
|
|
|
}
|
2018-09-17 15:32:42 +00:00
|
|
|
} else if (kHalf_Mode == fMode) {
|
|
|
|
struct V {
|
|
|
|
SkPoint fPos;
|
|
|
|
uint64_t fColor;
|
|
|
|
};
|
|
|
|
SkASSERT(sizeof(V) == vertexStride);
|
|
|
|
uint64_t color;
|
2018-09-19 18:19:02 +00:00
|
|
|
Sk4h halfColor = SkFloatToHalf_finite_ftz(Sk4f::Load(&fColor4f));
|
2018-09-17 15:32:42 +00:00
|
|
|
color = (uint64_t)halfColor[0] << 48 |
|
|
|
|
(uint64_t)halfColor[1] << 32 |
|
|
|
|
(uint64_t)halfColor[2] << 16 |
|
|
|
|
(uint64_t)halfColor[3] << 0;
|
|
|
|
V* v = (V*)verts;
|
|
|
|
for (int i = 0; i < kVertexCount; i += 2) {
|
|
|
|
v[i + 0].fPos.set(dx * i, 0.0f);
|
|
|
|
v[i + 0].fColor = color;
|
|
|
|
v[i + 1].fPos.set(dx * i, 100.0f);
|
|
|
|
v[i + 1].fColor = color;
|
|
|
|
}
|
2018-07-20 18:50:44 +00:00
|
|
|
} else {
|
|
|
|
struct V {
|
|
|
|
SkPoint fPos;
|
|
|
|
GrColor fColor;
|
|
|
|
};
|
|
|
|
SkASSERT(sizeof(V) == vertexStride);
|
|
|
|
V* v = (V*)verts;
|
|
|
|
for (int i = 0; i < kVertexCount; i += 2) {
|
|
|
|
v[i + 0].fPos.set(dx * i, 0.0f);
|
|
|
|
v[i + 0].fColor = fColor;
|
|
|
|
v[i + 1].fPos.set(dx * i, 100.0f);
|
|
|
|
v[i + 1].fColor = fColor;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-12 13:41:54 +00:00
|
|
|
fMesh = target->allocMesh();
|
2020-03-13 15:21:12 +00:00
|
|
|
fMesh->set(std::move(vertexBuffer), kVertexCount, firstVertex);
|
2019-02-26 18:13:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) override {
|
2020-03-12 13:41:54 +00:00
|
|
|
if (!fProgramInfo || !fMesh) {
|
|
|
|
return;
|
|
|
|
}
|
2019-12-05 21:40:31 +00:00
|
|
|
|
2020-03-16 23:34:44 +00:00
|
|
|
flushState->bindPipelineAndScissorClip(*fProgramInfo, chainBounds);
|
2021-03-22 18:48:09 +00:00
|
|
|
flushState->bindTextures(fProgramInfo->geomProc(), nullptr, fProgramInfo->pipeline());
|
2020-03-16 23:34:44 +00:00
|
|
|
flushState->drawMesh(*fMesh);
|
2018-07-20 18:50:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Mode fMode;
|
|
|
|
GrColor fColor;
|
2018-10-16 19:19:28 +00:00
|
|
|
SkColor4f fColor4f;
|
2018-07-20 18:50:44 +00:00
|
|
|
sk_sp<GrColorSpaceXform> fColorSpaceXform;
|
|
|
|
|
2020-03-16 15:25:50 +00:00
|
|
|
GrSimpleMesh* fMesh = nullptr;
|
2020-03-12 13:41:54 +00:00
|
|
|
GrProgramInfo* fProgramInfo = nullptr;
|
|
|
|
|
2020-09-03 02:42:33 +00:00
|
|
|
using INHERITED = GrMeshDrawOp;
|
2018-07-20 18:50:44 +00:00
|
|
|
};
|
2020-08-06 18:11:56 +00:00
|
|
|
} // namespace
|
2018-07-20 18:50:44 +00:00
|
|
|
|
|
|
|
class VertexColorSpaceBench : public Benchmark {
|
|
|
|
public:
|
|
|
|
VertexColorSpaceBench(Mode mode, const char* name) : fMode(mode) {
|
|
|
|
fName = "vertexcolorspace";
|
|
|
|
fName.appendf("_%s", name);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool isSuitableFor(Backend backend) override { return kGPU_Backend == backend; }
|
|
|
|
const char* onGetName() override { return fName.c_str(); }
|
|
|
|
|
|
|
|
void onDraw(int loops, SkCanvas* canvas) override {
|
2020-07-06 17:45:34 +00:00
|
|
|
auto context = canvas->recordingContext()->asDirectContext();
|
2018-09-17 15:32:42 +00:00
|
|
|
SkASSERT(context);
|
|
|
|
|
|
|
|
if (kHalf_Mode == fMode &&
|
2019-02-04 18:26:26 +00:00
|
|
|
!context->priv().caps()->halfFloatVertexAttributeSupport()) {
|
2018-09-17 15:32:42 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-01-04 22:03:00 +00:00
|
|
|
auto p3 = SkColorSpace::MakeRGB(SkNamedTransferFn::kSRGB,
|
2020-01-16 17:11:06 +00:00
|
|
|
SkNamedGamut::kDisplayP3);
|
2018-08-22 15:52:16 +00:00
|
|
|
auto xform = GrColorSpaceXform::Make(sk_srgb_singleton(), kUnpremul_SkAlphaType,
|
|
|
|
p3.get(), kUnpremul_SkAlphaType);
|
2018-07-20 18:50:44 +00:00
|
|
|
|
|
|
|
SkRandom r;
|
|
|
|
const int kDrawsPerLoop = 32;
|
|
|
|
|
|
|
|
for (int i = 0; i < loops; ++i) {
|
2021-07-28 19:13:20 +00:00
|
|
|
auto sdc = skgpu::v1::SurfaceDrawContext::Make(context, GrColorType::kRGBA_8888, p3,
|
|
|
|
SkBackingFit::kApprox, {100, 100},
|
|
|
|
SkSurfaceProps());
|
|
|
|
SkASSERT(sdc);
|
2018-07-20 18:50:44 +00:00
|
|
|
|
|
|
|
for (int j = 0; j < kDrawsPerLoop; ++j) {
|
|
|
|
SkColor c = r.nextU();
|
2020-10-07 20:46:15 +00:00
|
|
|
GrOp::Owner op = nullptr;
|
|
|
|
GrRecordingContext* rContext = canvas->recordingContext();
|
2018-07-20 18:50:44 +00:00
|
|
|
switch (fMode) {
|
|
|
|
case kBaseline_Mode:
|
2020-10-07 20:46:15 +00:00
|
|
|
op = GrOp::Make<Op>(rContext, SkColorToPremulGrColor(c));
|
2018-07-20 18:50:44 +00:00
|
|
|
break;
|
|
|
|
case kShader_Mode:
|
2020-10-07 20:46:15 +00:00
|
|
|
op = GrOp::Make<Op>(rContext, SkColorToUnpremulGrColor(c), xform);
|
2018-07-20 18:50:44 +00:00
|
|
|
break;
|
2018-09-17 15:32:42 +00:00
|
|
|
case kHalf_Mode:
|
2018-07-20 18:50:44 +00:00
|
|
|
case kFloat_Mode: {
|
2018-10-16 19:19:28 +00:00
|
|
|
SkColor4f c4f = SkColor4f::FromColor(c);
|
2018-07-20 18:50:44 +00:00
|
|
|
c4f = xform->apply(c4f);
|
2020-10-07 20:46:15 +00:00
|
|
|
op = GrOp::Make<Op>(rContext, c4f, fMode);
|
2018-07-20 18:50:44 +00:00
|
|
|
}
|
|
|
|
}
|
2021-07-28 19:13:20 +00:00
|
|
|
sdc->addDrawOp(std::move(op));
|
2018-07-20 18:50:44 +00:00
|
|
|
}
|
|
|
|
|
2020-05-14 19:45:44 +00:00
|
|
|
context->flushAndSubmit();
|
2018-07-20 18:50:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
SkString fName;
|
|
|
|
Mode fMode;
|
|
|
|
|
2020-09-03 02:42:33 +00:00
|
|
|
using INHERITED = Benchmark;
|
2018-07-20 18:50:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
DEF_BENCH(return new VertexColorSpaceBench(kBaseline_Mode, "baseline"));
|
|
|
|
DEF_BENCH(return new VertexColorSpaceBench(kFloat_Mode, "float"));
|
2018-09-17 15:32:42 +00:00
|
|
|
DEF_BENCH(return new VertexColorSpaceBench(kHalf_Mode, "half"));
|
2018-07-20 18:50:44 +00:00
|
|
|
DEF_BENCH(return new VertexColorSpaceBench(kShader_Mode, "shader"));
|