Skip to content

Commit

Permalink
Eliminate 'skia_compare_vm_vs_rp' benchmarking code.
Browse files Browse the repository at this point in the history
SkVM is being removed; we no longer need to benchmark it.

Change-Id: I7d98daf6ce65fa516d32ffab7921dd752bb3b596
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/677717
Auto-Submit: John Stiles <[email protected]>
Reviewed-by: Herb Derby <[email protected]>
Commit-Queue: John Stiles <[email protected]>
  • Loading branch information
johnstiles-google authored and SkCQ committed Apr 24, 2023
1 parent 4ec419b commit 22e3776
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 344 deletions.
3 changes: 0 additions & 3 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ config("skia_private") {
defines += [ "GRAPHITE_TEST_UTILS=1" ]
}
}
if (skia_compare_vm_vs_rp) {
defines += [ "SKIA_COMPARE_VM_VS_RP" ]
}
libs = []
lib_dirs = []
if (skia_use_gl && skia_use_angle) {
Expand Down
6 changes: 0 additions & 6 deletions bench/nanobench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ extern bool gUseSkVMBlitter;
extern bool gSkVMAllowJIT;
extern bool gSkVMJITViaDylib;

#include "src/utils/SkBlitterTraceCommon.h"
SK_BLITTER_TRACE_INIT

#ifndef SK_BUILD_FOR_WIN
#include <unistd.h>

Expand Down Expand Up @@ -394,9 +391,7 @@ static double time(int loops, Benchmark* bench, Target* target) {
double start = now_ms();
canvas = target->beginTiming(canvas);

SK_BLITTER_TRACE_LOCAL_SETUP;
bench->draw(loops, canvas);
SK_BLITTER_TRACE_LOCAL_TEARDOWN;

target->endTiming();
double elapsed = now_ms() - start;
Expand Down Expand Up @@ -1593,7 +1588,6 @@ int main(int argc, char** argv) {
, sk_tools::getMaxResidentSetSizeMB()
, bench->getUniqueName()
, config);
SK_BLITTER_TRACE_PRINT;
SkDebugf("\n");
} else if (FLAGS_quiet) {
const char* mark = " ";
Expand Down
2 changes: 0 additions & 2 deletions gn/skia.gni
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ declare_args() {
skia_ios_profile = "Google Development"
}

skia_compare_vm_vs_rp = false

# Temporary GN arg for flutter to control updating their unit tests synchronously with new alg.
skia_use_legacy_layer_bounds = false

Expand Down
3 changes: 0 additions & 3 deletions gn/utils.gni
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ skia_utils_private = [
"$_src/utils/SkAnimCodecPlayer.cpp",
"$_src/utils/SkBase64.cpp",
"$_src/utils/SkBitSet.h",
"$_src/utils/SkBlitterTrace.h",
"$_src/utils/SkBlitterTraceCommon.h",
"$_src/utils/SkCallableTraits.h",
"$_src/utils/SkCamera.cpp",
"$_src/utils/SkCanvasStack.cpp",
Expand All @@ -68,7 +66,6 @@ skia_utils_private = [
"$_src/utils/SkClipStackUtils.cpp",
"$_src/utils/SkClipStackUtils.h",
"$_src/utils/SkCustomTypeface.cpp",
"$_src/utils/SkCycles.h",
"$_src/utils/SkDashPath.cpp",
"$_src/utils/SkDashPathPriv.h",
"$_src/utils/SkEventTracer.cpp",
Expand Down
3 changes: 0 additions & 3 deletions public.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1671,8 +1671,6 @@ BASE_SRCS_ALL = [
"src/utils/SkAnimCodecPlayer.cpp",
"src/utils/SkBase64.cpp",
"src/utils/SkBitSet.h",
"src/utils/SkBlitterTrace.h",
"src/utils/SkBlitterTraceCommon.h",
"src/utils/SkCallableTraits.h",
"src/utils/SkCanvasStack.cpp",
"src/utils/SkCanvasStack.h",
Expand All @@ -1682,7 +1680,6 @@ BASE_SRCS_ALL = [
"src/utils/SkClipStackUtils.cpp",
"src/utils/SkClipStackUtils.h",
"src/utils/SkCustomTypeface.cpp",
"src/utils/SkCycles.h",
"src/utils/SkDashPath.cpp",
"src/utils/SkDashPathPriv.h",
"src/utils/SkEventTracer.cpp",
Expand Down
14 changes: 0 additions & 14 deletions src/core/SkRasterPipelineBlitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
#include "src/core/SkRasterPipeline.h"
#include "src/shaders/SkShaderBase.h"

#define SK_BLITTER_TRACE_IS_RASTER_PIPELINE
#include "src/utils/SkBlitterTrace.h"

class SkRasterPipelineBlitter final : public SkBlitter {
public:
// This is our common entrypoint for creating the blitter once we've sorted out shaders.
Expand Down Expand Up @@ -374,10 +371,6 @@ void SkRasterPipelineBlitter::blitRect(int x, int y, int w, int h) {

void SkRasterPipelineBlitter::blitRectWithTrace(int x, int y, int w, int h, bool trace) {
if (fMemset2D) {
SK_BLITTER_TRACE_STEP(blitRectByMemset,
trace,
/*scanlines=*/h,
/*pixels=*/w * h);
fMemset2D(&fDst, x,y, w,h, fMemsetColor);
return;
}
Expand Down Expand Up @@ -411,7 +404,6 @@ void SkRasterPipelineBlitter::blitRectWithTrace(int x, int y, int w, int h, bool
fBlitRect = p.compile();
}

SK_BLITTER_TRACE_STEP(blitRect, trace, /*scanlines=*/h, /*pixels=*/w * h);
fBlitRect(x,y,w,h);
}

Expand All @@ -437,9 +429,7 @@ void SkRasterPipelineBlitter::blitAntiH(int x, int y, const SkAlpha aa[], const
fBlitAntiH = p.compile();
}

SK_BLITTER_TRACE_STEP(blitAntiH, true, /*scanlines=*/1ul, /*pixels=*/0ul);
for (int16_t run = *runs; run > 0; run = *runs) {
SK_BLITTER_TRACE_STEP_ACCUMULATE(blitAntiH, /*pixels=*/run);
switch (*aa) {
case 0x00: break;
case 0xff:this->blitRectWithTrace(x,y,run, 1, false); break;
Expand Down Expand Up @@ -599,9 +589,5 @@ void SkRasterPipelineBlitter::blitMask(const SkMask& mask, const SkIRect& clip)
}

SkASSERT(blitter);
SK_BLITTER_TRACE_STEP(blitMask,
true,
/*scanlines=*/clip.height(),
/*pixels=*/clip.width() * clip.height());
(*blitter)(clip.left(),clip.top(), clip.width(),clip.height());
}
12 changes: 0 additions & 12 deletions src/core/SkVMBlitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@

#ifdef SK_ENABLE_SKVM

#define SK_BLITTER_TRACE_IS_SKVM
#include "src/utils/SkBlitterTrace.h"

namespace {

// Uniforms set by the Blitter itself,
Expand Down Expand Up @@ -681,10 +678,8 @@ void SkVMBlitter::blitH(int x, int y, int w) {
skvm::Program* blit_h = this->buildProgram(Coverage::Full);
this->updateUniforms(x+w, y);
if (const void* sprite = this->isSprite(x,y)) {
SK_BLITTER_TRACE_STEP(blitH1, true, /*scanlines=*/1, /*pixels=*/w);
blit_h->eval(w, fUniforms.buf.data(), fDevice.addr(x,y), sprite);
} else {
SK_BLITTER_TRACE_STEP(blitH2, true, /*scanlines=*/1, /*pixels=*/w);
blit_h->eval(w, fUniforms.buf.data(), fDevice.addr(x,y));
}
}
Expand All @@ -693,9 +688,7 @@ void SkVMBlitter::blitAntiH(int x, int y, const SkAlpha cov[], const int16_t run
skvm::Program* blit_anti_h = this->buildProgram(Coverage::UniformF);
skvm::Program* blit_h = this->buildProgram(Coverage::Full);

SK_BLITTER_TRACE_STEP(blitAntiH, true, /*scanlines=*/1ul, /*pixels=*/0ul);
for (int16_t run = *runs; run > 0; run = *runs) {
SK_BLITTER_TRACE_STEP_ACCUMULATE(blitAntiH, /*pixels=*/run);
const SkAlpha coverage = *cov;
if (coverage != 0x00) {
this->updateUniforms(x+run, y);
Expand Down Expand Up @@ -745,11 +738,6 @@ void SkVMBlitter::blitMask(const SkMask& mask, const SkIRect& clip) {

SkASSERT(program);
if (program) {
SK_BLITTER_TRACE_STEP(blitMask,
true,
/*scanlines=*/clip.height(),
/*pixels=*/clip.width() * clip.height());

for (int y = clip.top(); y < clip.bottom(); y++) {
int x = clip.left(),
w = clip.width();
Expand Down
3 changes: 0 additions & 3 deletions src/utils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ CORE_FILES = [
"SkAnimCodecPlayer.cpp",
"SkBase64.cpp",
"SkBitSet.h",
"SkBlitterTrace.h",
"SkBlitterTraceCommon.h",
"SkCallableTraits.h",
"SkCamera.cpp",
"SkCanvasStack.cpp",
Expand All @@ -33,7 +31,6 @@ CORE_FILES = [
"SkClipStackUtils.cpp",
"SkClipStackUtils.h",
"SkCustomTypeface.cpp",
"SkCycles.h",
"SkDashPath.cpp",
"SkDashPathPriv.h",
"SkEventTracer.cpp",
Expand Down
62 changes: 0 additions & 62 deletions src/utils/SkBlitterTrace.h

This file was deleted.

Loading

0 comments on commit 22e3776

Please sign in to comment.