aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar tfarina <tfarina@chromium.org>2014-06-19 12:32:29 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-19 12:32:29 -0700
commitf168b86d7fafc5c20c87bebc6fd393cb17e120ca (patch)
tree9a1b1cff3725cc6cc030657fd83b5dca12137d86
parent8e80d17d2b63fa84081236012f31bb10c58d344d (diff)
Remove Sk prefix from some bench classes.
This idea came while commenting on https://codereview.chromium.org/343583005/ Since SkBenchmark, SkBenchLogger and SkGMBench are not part of the Skia library, they should not have the Sk prefix. BUG=None TEST=make all R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/347823004
-rw-r--r--bench/AAClipBench.cpp22
-rw-r--r--bench/BenchLogger.cpp (renamed from bench/SkBenchLogger.cpp)12
-rw-r--r--bench/BenchLogger.h (renamed from bench/SkBenchLogger.h)19
-rw-r--r--bench/BenchTool/BenchTool.xcodeproj/project.pbxproj8
-rw-r--r--bench/Benchmark.cpp (renamed from bench/SkBenchmark.cpp)16
-rw-r--r--bench/Benchmark.h (renamed from bench/SkBenchmark.h)18
-rw-r--r--bench/BicubicBench.cpp8
-rw-r--r--bench/BitmapBench.cpp8
-rw-r--r--bench/BitmapRectBench.cpp8
-rw-r--r--bench/BitmapScaleBench.cpp8
-rw-r--r--bench/BlurBench.cpp8
-rw-r--r--bench/BlurImageFilterBench.cpp6
-rw-r--r--bench/BlurRectBench.cpp8
-rw-r--r--bench/BlurRoundRectBench.cpp8
-rw-r--r--bench/ChartBench.cpp6
-rw-r--r--bench/ChecksumBench.cpp6
-rw-r--r--bench/ChromeBench.cpp6
-rw-r--r--bench/CmapBench.cpp6
-rw-r--r--bench/ColorFilterBench.cpp6
-rw-r--r--bench/ColorPrivBench.cpp4
-rw-r--r--bench/CoverageBench.cpp6
-rw-r--r--bench/DashBench.cpp26
-rw-r--r--bench/DecodeBench.cpp6
-rw-r--r--bench/DeferredCanvasBench.cpp6
-rw-r--r--bench/DeferredSurfaceCopyBench.cpp6
-rw-r--r--bench/DisplacementBench.cpp6
-rw-r--r--bench/ETCBitmapBench.cpp22
-rw-r--r--bench/FSRectBench.cpp6
-rw-r--r--bench/FontCacheBench.cpp10
-rw-r--r--bench/FontScalerBench.cpp6
-rw-r--r--bench/GMBench.cpp (renamed from bench/SkGMBench.cpp)14
-rw-r--r--bench/GMBench.h (renamed from bench/SkGMBench.h)12
-rw-r--r--bench/GameBench.cpp6
-rw-r--r--bench/GrMemoryPoolBench.cpp14
-rw-r--r--bench/GrOrderedSetBench.cpp14
-rw-r--r--bench/GrResourceCacheBench.cpp12
-rw-r--r--bench/GradientBench.cpp10
-rw-r--r--bench/HairlinePathBench.cpp8
-rw-r--r--bench/ImageCacheBench.cpp6
-rw-r--r--bench/ImageDecodeBench.cpp6
-rw-r--r--bench/ImageFilterDAGBench.cpp8
-rw-r--r--bench/InterpBench.cpp8
-rw-r--r--bench/LightingBench.cpp6
-rw-r--r--bench/LineBench.cpp6
-rw-r--r--bench/MagnifierBench.cpp6
-rw-r--r--bench/MathBench.cpp30
-rw-r--r--bench/Matrix44Bench.cpp6
-rw-r--r--bench/MatrixBench.cpp6
-rw-r--r--bench/MatrixConvolutionBench.cpp8
-rw-r--r--bench/MemcpyBench.cpp4
-rw-r--r--bench/MemoryBench.cpp10
-rw-r--r--bench/MemsetBench.cpp8
-rw-r--r--bench/MergeBench.cpp6
-rw-r--r--bench/MorphologyBench.cpp8
-rw-r--r--bench/MutexBench.cpp6
-rw-r--r--bench/PathBench.cpp34
-rw-r--r--bench/PathIterBench.cpp6
-rw-r--r--bench/PathUtilsBench.cpp8
-rw-r--r--bench/PerlinNoiseBench.cpp6
-rw-r--r--bench/PicturePlaybackBench.cpp6
-rw-r--r--bench/PictureRecordBench.cpp6
-rw-r--r--bench/PremulAndUnpremulAlphaOpsBench.cpp6
-rw-r--r--bench/QuadTreeBench.cpp10
-rw-r--r--bench/RTreeBench.cpp10
-rw-r--r--bench/ReadPixBench.cpp6
-rw-r--r--bench/RectBench.cpp10
-rw-r--r--bench/RectanizerBench.cpp6
-rw-r--r--bench/RectoriBench.cpp10
-rw-r--r--bench/RefCntBench.cpp28
-rw-r--r--bench/RegionBench.cpp10
-rw-r--r--bench/RegionContainBench.cpp6
-rw-r--r--bench/RepeatTileBench.cpp6
-rw-r--r--bench/ResultsWriter.h8
-rw-r--r--bench/ScalarBench.cpp10
-rw-r--r--bench/ShaderMaskBench.cpp6
-rw-r--r--bench/SkipZeroesBench.cpp6
-rw-r--r--bench/SortBench.cpp14
-rw-r--r--bench/StackBench.cpp4
-rw-r--r--bench/StrokeBench.cpp6
-rw-r--r--bench/TableBench.cpp6
-rw-r--r--bench/TextBench.cpp6
-rw-r--r--bench/TileBench.cpp6
-rw-r--r--bench/VertBench.cpp8
-rw-r--r--bench/WritePixelsBench.cpp6
-rw-r--r--bench/WriterBench.cpp6
-rw-r--r--bench/XfermodeBench.cpp10
-rw-r--r--bench/benchmain.cpp62
-rw-r--r--dm/DM.cpp6
-rw-r--r--dm/DMBenchTask.cpp8
-rw-r--r--dm/DMBenchTask.h10
-rw-r--r--dm/DMUtil.h2
-rw-r--r--gyp/bench.gyp8
-rw-r--r--gyp/bench.gypi4
-rw-r--r--gyp/tools.gyp4
-rw-r--r--tools/PictureBenchmark.h6
-rw-r--r--tools/PictureResultsWriter.h10
-rw-r--r--tools/bbh_shootout.cpp4
-rw-r--r--tools/bench_pictures_main.cpp8
98 files changed, 463 insertions, 464 deletions
diff --git a/bench/AAClipBench.cpp b/bench/AAClipBench.cpp
index ab0f4f9a00..4cc9abe9fc 100644
--- a/bench/AAClipBench.cpp
+++ b/bench/AAClipBench.cpp
@@ -5,17 +5,17 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkAAClip.h"
+#include "SkCanvas.h"
#include "SkPath.h"
+#include "SkRandom.h"
#include "SkRegion.h"
#include "SkString.h"
-#include "SkCanvas.h"
-#include "SkRandom.h"
////////////////////////////////////////////////////////////////////////////////
// This bench tests out AA/BW clipping via canvas' clipPath and clipRect calls
-class AAClipBench : public SkBenchmark {
+class AAClipBench : public Benchmark {
SkString fName;
SkPath fClipPath;
SkRect fClipRect;
@@ -79,13 +79,13 @@ protected:
}
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
////////////////////////////////////////////////////////////////////////////////
// This bench tests out nested clip stacks. It is intended to simulate
// how WebKit nests clips.
-class NestedAAClipBench : public SkBenchmark {
+class NestedAAClipBench : public Benchmark {
SkString fName;
bool fDoAA;
SkRect fDrawRect;
@@ -167,11 +167,11 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
////////////////////////////////////////////////////////////////////////////////
-class AAClipBuilderBench : public SkBenchmark {
+class AAClipBuilderBench : public Benchmark {
SkString fName;
SkPath fPath;
SkRect fRect;
@@ -209,11 +209,11 @@ protected:
}
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
////////////////////////////////////////////////////////////////////////////////
-class AAClipRegionBench : public SkBenchmark {
+class AAClipRegionBench : public Benchmark {
public:
AAClipRegionBench() {
SkPath path;
@@ -239,7 +239,7 @@ protected:
private:
SkRegion fRegion;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/bench/SkBenchLogger.cpp b/bench/BenchLogger.cpp
index 7cda32772c..98423d0150 100644
--- a/bench/SkBenchLogger.cpp
+++ b/bench/BenchLogger.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2012 Google Inc.
*
@@ -6,24 +5,25 @@
* found in the LICENSE file.
*/
-#include "SkBenchLogger.h"
+#include "BenchLogger.h"
+
#include "SkStream.h"
-SkBenchLogger::SkBenchLogger()
+BenchLogger::BenchLogger()
: fFileStream(NULL) {}
-SkBenchLogger::~SkBenchLogger() {
+BenchLogger::~BenchLogger() {
if (fFileStream) {
SkDELETE(fFileStream);
}
}
-bool SkBenchLogger::SetLogFile(const char *file) {
+bool BenchLogger::SetLogFile(const char *file) {
fFileStream = SkNEW_ARGS(SkFILEWStream, (file));
return fFileStream->isValid();
}
-void SkBenchLogger::fileWrite(const char msg[], size_t size) {
+void BenchLogger::fileWrite(const char msg[], size_t size) {
if (fFileStream && fFileStream->isValid()) {
fFileStream->write(msg, size);
}
diff --git a/bench/SkBenchLogger.h b/bench/BenchLogger.h
index 77a08373bf..a7c283ad50 100644
--- a/bench/SkBenchLogger.h
+++ b/bench/BenchLogger.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2012 Google Inc.
*
@@ -6,30 +5,30 @@
* found in the LICENSE file.
*/
-#ifndef SkBenchLogger_DEFINED
-#define SkBenchLogger_DEFINED
+#ifndef BenchLogger_DEFINED
+#define BenchLogger_DEFINED
-#include "SkTypes.h"
-#include "SkString.h"
#include <stdio.h>
+#include "SkString.h"
+#include "SkTypes.h"
class SkFILEWStream;
/**
* Class that allows logging to a file while simultaneously logging to stdout/stderr.
*/
-class SkBenchLogger {
+class BenchLogger {
public:
- SkBenchLogger();
+ BenchLogger();
/**
* Not virtual, since this class is not intended to be subclassed.
*/
- ~SkBenchLogger();
+ ~BenchLogger();
/**
* Specify a file to write progress logs to. Unless this is called with a valid file path,
- * SkBenchLogger will only write to stdout/stderr.
+ * BenchLogger will only write to stdout/stderr.
*/
bool SetLogFile(const char file[]);
@@ -74,4 +73,4 @@ private:
SkFILEWStream* fFileStream;
};
-#endif // SkBenchLogger_DEFINED
+#endif // BenchLogger_DEFINED
diff --git a/bench/BenchTool/BenchTool.xcodeproj/project.pbxproj b/bench/BenchTool/BenchTool.xcodeproj/project.pbxproj
index b6374949fe..4bb4b9cdc4 100644
--- a/bench/BenchTool/BenchTool.xcodeproj/project.pbxproj
+++ b/bench/BenchTool/BenchTool.xcodeproj/project.pbxproj
@@ -8,7 +8,7 @@
/* Begin PBXBuildFile section */
272FB43A0F11A19C00CA935D /* RectBench.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 272FB4390F11A19C00CA935D /* RectBench.cpp */; };
- 272FB4F30F11B40300CA935D /* SkBenchmark.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 272FB4F20F11B40300CA935D /* SkBenchmark.cpp */; };
+ 272FB4F30F11B40300CA935D /* Benchmark.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 272FB4F20F11B40300CA935D /* Benchmark.cpp */; };
2752A08A0F14CE1300BBDC03 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2752A0890F14CE1300BBDC03 /* main.cpp */; };
27739F4D0F11439200F233EA /* libmaccore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27739F240F11404A00F233EA /* libmaccore.a */; };
27739F4E0F11439300F233EA /* libcore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27739F1A0F11403B00F233EA /* libcore.a */; };
@@ -62,7 +62,7 @@
/* Begin PBXFileReference section */
272FB4390F11A19C00CA935D /* RectBench.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RectBench.cpp; path = ../RectBench.cpp; sourceTree = SOURCE_ROOT; };
- 272FB4F20F11B40300CA935D /* SkBenchmark.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkBenchmark.cpp; path = ../SkBenchmark.cpp; sourceTree = SOURCE_ROOT; };
+ 272FB4F20F11B40300CA935D /* Benchmark.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Benchmark.cpp; path = ../Benchmark.cpp; sourceTree = SOURCE_ROOT; };
2752A0890F14CE1300BBDC03 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../main.cpp; sourceTree = SOURCE_ROOT; };
27739F120F11403B00F233EA /* core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = core.xcodeproj; path = ../../xcode/core/core.xcodeproj; sourceTree = SOURCE_ROOT; };
27739F1C0F11404A00F233EA /* maccore.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = maccore.xcodeproj; path = ../../xcode/maccore/maccore.xcodeproj; sourceTree = SOURCE_ROOT; };
@@ -102,7 +102,7 @@
isa = PBXGroup;
children = (
2752A0890F14CE1300BBDC03 /* main.cpp */,
- 272FB4F20F11B40300CA935D /* SkBenchmark.cpp */,
+ 272FB4F20F11B40300CA935D /* Benchmark.cpp */,
272FB4390F11A19C00CA935D /* RectBench.cpp */,
);
name = Source;
@@ -213,7 +213,7 @@
buildActionMask = 2147483647;
files = (
272FB43A0F11A19C00CA935D /* RectBench.cpp in Sources */,
- 272FB4F30F11B40300CA935D /* SkBenchmark.cpp in Sources */,
+ 272FB4F30F11B40300CA935D /* Benchmark.cpp in Sources */,
2752A08A0F14CE1300BBDC03 /* main.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
diff --git a/bench/SkBenchmark.cpp b/bench/Benchmark.cpp
index 4c5d077b53..ae614f04f9 100644
--- a/bench/SkBenchmark.cpp
+++ b/bench/Benchmark.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkPaint.h"
#include "SkParse.h"
@@ -14,7 +14,7 @@ const char* SkTriState::Name[] = { "default", "true", "false" };
template BenchRegistry* BenchRegistry::gHead;
-SkBenchmark::SkBenchmark() {
+Benchmark::Benchmark() {
fForceAlpha = 0xFF;
fForceAA = true;
fForceFilter = false;
@@ -22,23 +22,23 @@ SkBenchmark::SkBenchmark() {
fOrMask = fClearMask = 0;
}
-const char* SkBenchmark::getName() {
+const char* Benchmark::getName() {
return this->onGetName();
}
-SkIPoint SkBenchmark::getSize() {
+SkIPoint Benchmark::getSize() {
return this->onGetSize();
}
-void SkBenchmark::preDraw() {
+void Benchmark::preDraw() {
this->onPreDraw();
}
-void SkBenchmark::draw(const int loops, SkCanvas* canvas) {
+void Benchmark::draw(const int loops, SkCanvas* canvas) {
this->onDraw(loops, canvas);
}
-void SkBenchmark::setupPaint(SkPaint* paint) {
+void Benchmark::setupPaint(SkPaint* paint) {
paint->setAlpha(fForceAlpha);
paint->setAntiAlias(fForceAA);
paint->setFilterLevel(fForceFilter ? SkPaint::kLow_FilterLevel
@@ -51,6 +51,6 @@ void SkBenchmark::setupPaint(SkPaint* paint) {
}
}
-SkIPoint SkBenchmark::onGetSize() {
+SkIPoint Benchmark::onGetSize() {
return SkIPoint::Make(640, 480);
}
diff --git a/bench/SkBenchmark.h b/bench/Benchmark.h
index 012d0fd0b0..db70bbe49c 100644
--- a/bench/SkBenchmark.h
+++ b/bench/Benchmark.h
@@ -1,21 +1,21 @@
-
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#ifndef SkBenchmark_DEFINED
-#define SkBenchmark_DEFINED
-#include "SkRefCnt.h"
+#ifndef Benchmark_DEFINED
+#define Benchmark_DEFINED
+
#include "SkPoint.h"
+#include "SkRefCnt.h"
#include "SkString.h"
#include "SkTRegistry.h"
#define DEF_BENCH(code) \
namespace { \
-static SkBenchmark* SK_MACRO_APPEND_LINE(factory)(void*) { code; } \
+static Benchmark* SK_MACRO_APPEND_LINE(factory)(void*) { code; } \
BenchRegistry SK_MACRO_APPEND_LINE(g_R_)(SK_MACRO_APPEND_LINE(factory)); \
}
@@ -42,11 +42,11 @@ public:
static const char* Name[];
};
-class SkBenchmark : public SkRefCnt {
+class Benchmark : public SkRefCnt {
public:
- SK_DECLARE_INST_COUNT(SkBenchmark)
+ SK_DECLARE_INST_COUNT(Benchmark)
- SkBenchmark();
+ Benchmark();
const char* getName();
SkIPoint getSize();
@@ -123,6 +123,6 @@ private:
typedef SkRefCnt INHERITED;
};
-typedef SkTRegistry<SkBenchmark*(*)(void*)> BenchRegistry;
+typedef SkTRegistry<Benchmark*(*)(void*)> BenchRegistry;
#endif
diff --git a/bench/BicubicBench.cpp b/bench/BicubicBench.cpp
index 162ec61370..9d03dd1574 100644
--- a/bench/BicubicBench.cpp
+++ b/bench/BicubicBench.cpp
@@ -5,16 +5,16 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
+#include "SkBicubicImageFilter.h"
#include "SkCanvas.h"
#include "SkShader.h"
#include "SkString.h"
-#include "SkBicubicImageFilter.h"
// This bench exercises SkBicubicImageFilter, upsampling a 40x40 input to
// 100x100, 400x100, 100x400, and 400x400.
-class BicubicBench : public SkBenchmark {
+class BicubicBench : public Benchmark {
SkSize fScale;
SkString fName;
@@ -49,7 +49,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH( return new BicubicBench(10.0f, 10.0f); )
diff --git a/bench/BitmapBench.cpp b/bench/BitmapBench.cpp
index e877bd472d..a269e906f6 100644
--- a/bench/BitmapBench.cpp
+++ b/bench/BitmapBench.cpp
@@ -5,11 +5,11 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
-#include "SkPaint.h"
#include "SkCanvas.h"
#include "SkColorPriv.h"
+#include "SkPaint.h"
#include "SkRandom.h"
#include "SkString.h"
#include "sk_tool_utils.h"
@@ -70,7 +70,7 @@ static void convertToIndex666(const SkBitmap& src, SkBitmap* dst, SkAlphaType aT
*/
-class BitmapBench : public SkBenchmark {
+class BitmapBench : public Benchmark {
const SkColorType fColorType;
const SkAlphaType fAlphaType;
const bool fForceUpdate; //bitmap marked as dirty before each draw. forces bitmap to be updated on device cache
@@ -168,7 +168,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
/** Explicitly invoke some filter types to improve coverage of acceleration
diff --git a/bench/BitmapRectBench.cpp b/bench/BitmapRectBench.cpp
index 32589fc38d..2ad7bdf9b5 100644
--- a/bench/BitmapRectBench.cpp
+++ b/bench/BitmapRectBench.cpp
@@ -5,11 +5,11 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
-#include "SkPaint.h"
#include "SkCanvas.h"
#include "SkColorPriv.h"
+#include "SkPaint.h"
#include "SkRandom.h"
#include "SkString.h"
@@ -38,7 +38,7 @@ static void draw_into_bitmap(const SkBitmap& bm) {
paint : filter-p
*/
-class BitmapRectBench : public SkBenchmark {
+class BitmapRectBench : public Benchmark {
SkBitmap fBitmap;
bool fSlightMatrix;
uint8_t fAlpha;
@@ -101,7 +101,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH(return new BitmapRectBench(0xFF, SkPaint::kNone_FilterLevel, false))
diff --git a/bench/BitmapScaleBench.cpp b/bench/BitmapScaleBench.cpp
index 93e10fa43c..fad741aebc 100644
--- a/bench/BitmapScaleBench.cpp
+++ b/bench/BitmapScaleBench.cpp
@@ -5,15 +5,15 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
+#include "SkBlurMask.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkRandom.h"
#include "SkShader.h"
#include "SkString.h"
-#include "SkBlurMask.h"
-class BitmapScaleBench: public SkBenchmark {
+class BitmapScaleBench: public Benchmark {
int fLoopCount;
int fInputSize;
int fOutputSize;
@@ -79,7 +79,7 @@ protected:
virtual void doScaleImage() = 0;
virtual void preBenchSetup() {}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class BitmapFilterScaleBench: public BitmapScaleBench {
diff --git a/bench/BlurBench.cpp b/bench/BlurBench.cpp
index ae31804deb..cafc6f3a2a 100644
--- a/bench/BlurBench.cpp
+++ b/bench/BlurBench.cpp
@@ -5,14 +5,14 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBlurMask.h"
+#include "SkBlurMaskFilter.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkRandom.h"
#include "SkShader.h"
#include "SkString.h"
-#include "SkBlurMaskFilter.h"
#define SMALL SkIntToScalar(2)
#define REAL 1.5f
@@ -26,7 +26,7 @@ static const char* gStyleName[] = {
"inner"
};
-class BlurBench : public SkBenchmark {
+class BlurBench : public Benchmark {
SkScalar fRadius;
SkBlurStyle fStyle;
uint32_t fFlags;
@@ -75,7 +75,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH(return new BlurBench(SMALL, kNormal_SkBlurStyle);)
diff --git a/bench/BlurImageFilterBench.cpp b/bench/BlurImageFilterBench.cpp
index 7739730a77..786611b150 100644
--- a/bench/BlurImageFilterBench.cpp
+++ b/bench/BlurImageFilterBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmapDevice.h"
#include "SkBlurImageFilter.h"
#include "SkCanvas.h"
@@ -22,7 +22,7 @@
#define BLUR_SIGMA_LARGE 10.0f
#define BLUR_SIGMA_HUGE 80.0f
-class BlurImageFilterBench : public SkBenchmark {
+class BlurImageFilterBench : public Benchmark {
public:
BlurImageFilterBench(SkScalar sigmaX, SkScalar sigmaY, bool small) :
fIsSmall(small), fInitialized(false), fSigmaX(sigmaX), fSigmaY(sigmaY) {
@@ -80,7 +80,7 @@ private:
bool fInitialized;
SkBitmap fCheckerboard;
SkScalar fSigmaX, fSigmaY;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_LARGE, 0, false);)
diff --git a/bench/BlurRectBench.cpp b/bench/BlurRectBench.cpp
index 6871e0e4ca..cdcdfe57f3 100644
--- a/bench/BlurRectBench.cpp
+++ b/bench/BlurRectBench.cpp
@@ -5,13 +5,13 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
+#include "SkBlurMask.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkRandom.h"
#include "SkShader.h"
#include "SkString.h"
-#include "SkBlurMask.h"
#define SMALL SkIntToScalar(2)
#define REAL 1.5f
@@ -20,7 +20,7 @@ static const SkScalar kMedium = SkIntToScalar(5);
static const SkScalar kMedBig = SkIntToScalar(20);
#define REALBIG 30.5f
-class BlurRectBench: public SkBenchmark {
+class BlurRectBench: public Benchmark {
int fLoopCount;
SkScalar fRadius;
SkString fName;
@@ -70,7 +70,7 @@ protected:
virtual void makeBlurryRect(const SkRect&) = 0;
virtual void preBenchSetup(const SkRect&) {}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
diff --git a/bench/BlurRoundRectBench.cpp b/bench/BlurRoundRectBench.cpp
index 43391bf57c..52de22a4dc 100644
--- a/bench/BlurRoundRectBench.cpp
+++ b/bench/BlurRoundRectBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBlurMask.h"
#include "SkBlurMaskFilter.h"
#include "SkCanvas.h"
@@ -14,14 +14,14 @@
#include "SkPaint.h"
#include "SkPath.h"
#include "SkPoint.h"
-#include "SkRect.h"
#include "SkRRect.h"
+#include "SkRect.h"
#include "SkString.h"
#include "SkXfermode.h"
// Large blurred RR appear frequently on web pages. This benchmark measures our
// performance in this case.
-class BlurRoundRectBench : public SkBenchmark {
+class BlurRoundRectBench : public Benchmark {
public:
BlurRoundRectBench(int width, int height, int cornerRadius)
: fName("blurroundrect") {
@@ -81,7 +81,7 @@ private:
SkString fName;
SkRRect fRRect;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// Create one with dimensions/rounded corners based on the skp
diff --git a/bench/ChartBench.cpp b/bench/ChartBench.cpp
index 9dae5b8070..f33d2da398 100644
--- a/bench/ChartBench.cpp
+++ b/bench/ChartBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkRandom.h"
@@ -84,7 +84,7 @@ static void gen_paths(const SkTDArray<SkScalar>& topData,
// A set of scrolling line plots with the area between each plot filled. Stresses out GPU path
// filling
-class ChartBench : public SkBenchmark {
+class ChartBench : public Benchmark {
public:
ChartBench(bool aa) {
fShift = 0;
@@ -183,7 +183,7 @@ private:
SkTDArray<SkScalar> fData[kNumGraphs];
bool fAA;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
//////////////////////////////////////////////////////////////////////////////
diff --git a/bench/ChecksumBench.cpp b/bench/ChecksumBench.cpp
index 898c411641..7d3ec9ff9f 100644
--- a/bench/ChecksumBench.cpp
+++ b/bench/ChecksumBench.cpp
@@ -4,7 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkChecksum.h"
#include "SkMD5.h"
@@ -19,7 +19,7 @@ enum ChecksumType {
kMurmur3_ChecksumType,
};
-class ComputeChecksumBench : public SkBenchmark {
+class ComputeChecksumBench : public Benchmark {
enum {
U32COUNT = 256,
SIZE = U32COUNT * 4,
@@ -86,7 +86,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/ChromeBench.cpp b/bench/ChromeBench.cpp
index b2fc185f20..493878526a 100644
--- a/bench/ChromeBench.cpp
+++ b/bench/ChromeBench.cpp
@@ -4,7 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkString.h"
@@ -449,7 +449,7 @@ int gmailScrollingRectSpec [431*3] = {
};
/// Emulates the mix of rects blitted by gmail during scrolling
-class ScrollGmailBench : public SkBenchmark {
+class ScrollGmailBench : public Benchmark {
enum {
W = 1254,
H = 1160,
@@ -488,7 +488,7 @@ protected:
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// Disabled this benchmark: it takes 15x longer than any other benchmark
diff --git a/bench/CmapBench.cpp b/bench/CmapBench.cpp
index fcf40be88a..db4ed74951 100644
--- a/bench/CmapBench.cpp
+++ b/bench/CmapBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkTypeface.h"
@@ -62,7 +62,7 @@ static void charsToGlyphsNull_proc(int loops, const SkPaint& paint, const void*
}
}
-class CMAPBench : public SkBenchmark {
+class CMAPBench : public Benchmark {
TypefaceProc fProc;
SkString fName;
char fText[NGLYPHS];
@@ -91,7 +91,7 @@ protected:
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
//////////////////////////////////////////////////////////////////////////////
diff --git a/bench/ColorFilterBench.cpp b/bench/ColorFilterBench.cpp
index 3d9515477c..7eae21aa75 100644
--- a/bench/ColorFilterBench.cpp
+++ b/bench/ColorFilterBench.cpp
@@ -4,7 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkColorFilterImageFilter.h"
#include "SkColorMatrixFilter.h"
@@ -16,7 +16,7 @@
#define FILTER_WIDTH_LARGE SkIntToScalar(256)
#define FILTER_HEIGHT_LARGE SkIntToScalar(256)
-class ColorFilterBaseBench : public SkBenchmark {
+class ColorFilterBaseBench : public Benchmark {
public:
ColorFilterBaseBench(bool small) : fIsSmall(small) { }
@@ -58,7 +58,7 @@ protected:
private:
bool fIsSmall;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class ColorFilterDimBrightBench : public ColorFilterBaseBench {
diff --git a/bench/ColorPrivBench.cpp b/bench/ColorPrivBench.cpp
index 9c15a8400c..01810ed239 100644
--- a/bench/ColorPrivBench.cpp
+++ b/bench/ColorPrivBench.cpp
@@ -1,10 +1,10 @@
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkColorPriv.h"
#include "SkRandom.h"
#include "SkString.h"
template <bool kFast, bool kScale>
-class FourByteInterpBench : public SkBenchmark {
+class FourByteInterpBench : public Benchmark {
public:
FourByteInterpBench() {
fName.set("four_byte_interp");
diff --git a/bench/CoverageBench.cpp b/bench/CoverageBench.cpp
index 0631c179ac..ecb0ee6fa7 100644
--- a/bench/CoverageBench.cpp
+++ b/bench/CoverageBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkColorPriv.h"
@@ -14,7 +14,7 @@
#include "SkPath.h"
#include "SkRasterClip.h"
-class DrawPathBench : public SkBenchmark {
+class DrawPathBench : public Benchmark {
SkPaint fPaint;
SkString fName;
SkPath fPath;
@@ -61,7 +61,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/DashBench.cpp b/bench/DashBench.cpp
index bbe9512245..f4d09c66f2 100644
--- a/bench/DashBench.cpp
+++ b/bench/DashBench.cpp
@@ -5,7 +5,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkDashPathEffect.h"
@@ -29,7 +29,7 @@ static void path_hline(SkPath* path) {
path->lineTo(SkIntToScalar(600), SkIntToScalar(10));
}
-class DashBench : public SkBenchmark {
+class DashBench : public Benchmark {
protected:
SkString fName;
SkTDArray<SkScalar> fIntervals;
@@ -94,7 +94,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class RectDashBench : public DashBench {
@@ -175,7 +175,7 @@ static void make_cubic(SkPath* path) {
x0 + 600 * SK_Scalar1, y0);
}
-class MakeDashBench : public SkBenchmark {
+class MakeDashBench : public Benchmark {
SkString fName;
SkPath fPath;
SkAutoTUnref<SkPathEffect> fPE;
@@ -205,13 +205,13 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
/*
* We try to special case square dashes (intervals are equal to strokewidth).
*/
-class DashLineBench : public SkBenchmark {
+class DashLineBench : public Benchmark {
SkString fName;
SkScalar fStrokeWidth;
bool fIsRound;
@@ -245,10 +245,10 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
-class DrawPointsDashingBench : public SkBenchmark {
+class DrawPointsDashingBench : public Benchmark {
SkString fName;
int fStrokeWidth;
bool fDoAA;
@@ -292,11 +292,11 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// Want to test how we handle dashing when 99% of the dash is clipped out
-class GiantDashBench : public SkBenchmark {
+class GiantDashBench : public Benchmark {
SkString fName;
SkScalar fStrokeWidth;
SkPoint fPts[2];
@@ -370,12 +370,12 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// Want to test how we draw a dashed grid (like what is used in spreadsheets) of many
// small dashed lines switching back and forth between horizontal and vertical
-class DashGridBench : public SkBenchmark {
+class DashGridBench : public Benchmark {
SkString fName;
int fStrokeWidth;
bool fDoAA;
@@ -437,7 +437,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/DecodeBench.cpp b/bench/DecodeBench.cpp
index 15a80b1b5c..a4717f8eb7 100644
--- a/bench/DecodeBench.cpp
+++ b/bench/DecodeBench.cpp
@@ -5,7 +5,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCommandLineFlags.h"
#include "SkImageDecoder.h"
@@ -15,7 +15,7 @@
DEFINE_string(decodeBenchFilename, "resources/CMYK.jpeg", "Path to image for DecodeBench.");
-class DecodeBench : public SkBenchmark {
+class DecodeBench : public Benchmark {
const SkColorType fPrefColorType;
SkString fName;
public:
@@ -42,7 +42,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH( return new DecodeBench(kN32_SkColorType); )
diff --git a/bench/DeferredCanvasBench.cpp b/bench/DeferredCanvasBench.cpp
index 6ffd2d2327..667895c22f 100644
--- a/bench/DeferredCanvasBench.cpp
+++ b/bench/DeferredCanvasBench.cpp
@@ -4,12 +4,12 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkDeferredCanvas.h"
#include "SkDevice.h"
#include "SkString.h"
-class DeferredCanvasBench : public SkBenchmark {
+class DeferredCanvasBench : public Benchmark {
public:
DeferredCanvasBench(const char name[]) {
fName.printf("deferred_canvas_%s", name);
@@ -46,7 +46,7 @@ protected:
SkString fName;
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class SimpleNotificationClient : public SkDeferredCanvas::NotificationClient {
diff --git a/bench/DeferredSurfaceCopyBench.cpp b/bench/DeferredSurfaceCopyBench.cpp
index 6449b611bd..f4002b87be 100644
--- a/bench/DeferredSurfaceCopyBench.cpp
+++ b/bench/DeferredSurfaceCopyBench.cpp
@@ -6,7 +6,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkDeferredCanvas.h"
#include "SkDevice.h"
#include "SkImage.h"
@@ -15,7 +15,7 @@
#include "GrRenderTarget.h"
#endif
-class DeferredSurfaceCopyBench : public SkBenchmark {
+class DeferredSurfaceCopyBench : public Benchmark {
enum {
kSurfaceWidth = 1000,
kSurfaceHeight = 1000,
@@ -73,7 +73,7 @@ protected:
private:
bool fDiscardableContents;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
//////////////////////////////////////////////////////////////////////////////
diff --git a/bench/DisplacementBench.cpp b/bench/DisplacementBench.cpp
index 904f47d842..881ba33b24 100644
--- a/bench/DisplacementBench.cpp
+++ b/bench/DisplacementBench.cpp
@@ -4,7 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmapDevice.h"
#include "SkBitmapSource.h"
#include "SkCanvas.h"
@@ -15,7 +15,7 @@
#define FILTER_WIDTH_LARGE 256
#define FILTER_HEIGHT_LARGE 256
-class DisplacementBaseBench : public SkBenchmark {
+class DisplacementBaseBench : public Benchmark {
public:
DisplacementBaseBench(bool small) :
fInitialized(false), fIsSmall(small) {
@@ -82,7 +82,7 @@ protected:
private:
bool fInitialized;
bool fIsSmall;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class DisplacementZeroBench : public DisplacementBaseBench {
diff --git a/bench/ETCBitmapBench.cpp b/bench/ETCBitmapBench.cpp
index d5f32db3e0..aaa2ce7a66 100644
--- a/bench/ETCBitmapBench.cpp
+++ b/bench/ETCBitmapBench.cpp
@@ -5,8 +5,8 @@
* found in the LICENSE file.
*/
+#include "Benchmark.h"
#include "Resources.h"
-#include "SkBenchmark.h"
#include "SkCanvas.h"
#include "SkData.h"
#include "SkDecodingImageGenerator.h"
@@ -77,7 +77,7 @@ static etc1_byte* create_expanded_etc1_bitmap(const uint8_t* orig, int factor) {
// the ETC1 benches should all be working on the same data. Due to the
// simplicity of the PKM file, that data is the 128x128 mandrill etc1
// compressed texture repeated by some factor (currently 8 -> 1024x1024)
-class ETCBitmapBenchBase : public SkBenchmark {
+class ETCBitmapBenchBase : public Benchmark {
public:
ETCBitmapBenchBase() : fPKMData(loadPKM()) {
if (NULL == fPKMData) {
@@ -115,7 +115,7 @@ private:
return SkData::NewFromMalloc(expandedETC1, dataSz);
}
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// This is the rendering benchmark. Prior to rendering the data, create a
@@ -220,16 +220,16 @@ private:
typedef ETCBitmapBench INHERITED;
};
-DEF_BENCH(return new ETCBitmapBench(false, SkBenchmark::kRaster_Backend);)
-DEF_BENCH(return new ETCBitmapBench(true, SkBenchmark::kRaster_Backend);)
+DEF_BENCH(return new ETCBitmapBench(false, Benchmark::kRaster_Backend);)
+DEF_BENCH(return new ETCBitmapBench(true, Benchmark::kRaster_Backend);)
-DEF_BENCH(return new ETCBitmapBench(false, SkBenchmark::kGPU_Backend);)
-DEF_BENCH(return new ETCBitmapBench(true, SkBenchmark::kGPU_Backend);)
+DEF_BENCH(return new ETCBitmapBench(false, Benchmark::kGPU_Backend);)
+DEF_BENCH(return new ETCBitmapBench(true, Benchmark::kGPU_Backend);)
-DEF_BENCH(return new ETCBitmapUploadBench(false, SkBenchmark::kRaster_Backend);)
-DEF_BENCH(return new ETCBitmapUploadBench(true, SkBenchmark::kRaster_Backend);)
+DEF_BENCH(return new ETCBitmapUploadBench(false, Benchmark::kRaster_Backend);)
+DEF_BENCH(return new ETCBitmapUploadBench(true, Benchmark::kRaster_Backend);)
-DEF_BENCH(return new ETCBitmapUploadBench(false, SkBenchmark::kGPU_Backend);)
-DEF_BENCH(return new ETCBitmapUploadBench(true, SkBenchmark::kGPU_Backend);)
+DEF_BENCH(return new ETCBitmapUploadBench(false, Benchmark::kGPU_Backend);)
+DEF_BENCH(return new ETCBitmapUploadBench(true, Benchmark::kGPU_Backend);)
#endif // SK_IGNORE_ETC1_SUPPORT
diff --git a/bench/FSRectBench.cpp b/bench/FSRectBench.cpp
index ea65f30eee..3c5304294d 100644
--- a/bench/FSRectBench.cpp
+++ b/bench/FSRectBench.cpp
@@ -6,7 +6,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkRandom.h"
@@ -15,7 +15,7 @@
* Draws full screen opaque rectangles. It is designed to test any optimizations in the GPU backend
* to turn such draws into clears.
*/
-class FSRectBench : public SkBenchmark {
+class FSRectBench : public Benchmark {
public:
FSRectBench() : fInit(false) { }
@@ -57,7 +57,7 @@ private:
SkColor fColors[N];
bool fInit;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH( return SkNEW_ARGS(FSRectBench, ()); )
diff --git a/bench/FontCacheBench.cpp b/bench/FontCacheBench.cpp
index a3c0672ef4..0e75c9cb17 100644
--- a/bench/FontCacheBench.cpp
+++ b/bench/FontCacheBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkFontHost.h"
#include "SkPaint.h"
@@ -23,7 +23,7 @@ static int count_glyphs(const uint16_t start[]) {
return static_cast<int>(curr - start);
}
-class FontCacheBench : public SkBenchmark {
+class FontCacheBench : public Benchmark {
public:
FontCacheBench() {}
@@ -48,7 +48,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
@@ -107,7 +107,7 @@ static void dump_array(const uint16_t array[], int count) {
SkDebugf("\n");
}
-class FontCacheEfficiency : public SkBenchmark {
+class FontCacheEfficiency : public Benchmark {
public:
FontCacheEfficiency() {
if (false) dump_array(NULL, 0);
@@ -147,7 +147,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/FontScalerBench.cpp b/bench/FontScalerBench.cpp
index a14723c0ff..0326a0cce6 100644
--- a/bench/FontScalerBench.cpp
+++ b/bench/FontScalerBench.cpp
@@ -5,14 +5,14 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkGraphics.h"
#include "SkPaint.h"
#include "SkRandom.h"
#include "SkString.h"
-class FontScalerBench : public SkBenchmark {
+class FontScalerBench : public Benchmark {
SkString fName;
SkString fText;
bool fDoLCD;
@@ -43,7 +43,7 @@ protected:
}
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/SkGMBench.cpp b/bench/GMBench.cpp
index 77d29a70a9..41a8e8c5f4 100644
--- a/bench/SkGMBench.cpp
+++ b/bench/GMBench.cpp
@@ -5,19 +5,19 @@
* found in the LICENSE file.
*/
-#include "SkGMBench.h"
+#include "GMBench.h"
-SkGMBench::SkGMBench(skiagm::GM* gm) : fGM(gm) {
+GMBench::GMBench(skiagm::GM* gm) : fGM(gm) {
fName.printf("GM:%s", gm->getName());
}
-SkGMBench::~SkGMBench() { delete fGM; }
+GMBench::~GMBench() { delete fGM; }
-const char* SkGMBench::onGetName() {
+const char* GMBench::onGetName() {
return fName.c_str();
}
-bool SkGMBench::isSuitableFor(Backend backend) {
+bool GMBench::isSuitableFor(Backend backend) {
uint32_t flags = fGM->getFlags();
switch (backend) {
case kGPU_Backend:
@@ -36,7 +36,7 @@ bool SkGMBench::isSuitableFor(Backend backend) {
}
}
-void SkGMBench::onDraw(const int loops, SkCanvas* canvas) {
+void GMBench::onDraw(const int loops, SkCanvas* canvas) {
// Do we care about timing the draw of the background (once)?
// Does the GM ever rely on drawBackground to lazily compute something?
fGM->drawBackground(canvas);
@@ -45,7 +45,7 @@ void SkGMBench::onDraw(const int loops, SkCanvas* canvas) {
}
}
-SkIPoint SkGMBench::onGetSize() {
+SkIPoint GMBench::onGetSize() {
SkISize size = fGM->getISize();
return SkIPoint::Make(size.fWidth, size.fHeight);
}
diff --git a/bench/SkGMBench.h b/bench/GMBench.h
index 925a87583c..75cee6c063 100644
--- a/bench/SkGMBench.h
+++ b/bench/GMBench.h
@@ -5,18 +5,18 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
-#include "gm.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
+#include "gm.h"
/**
* Runs a GM as a benchmark by repeatedly drawing the GM.
*/
-class SkGMBench : public SkBenchmark {
+class GMBench : public Benchmark {
public:
// Constructor takes ownership of the GM param.
- SkGMBench(skiagm::GM* gm);
- virtual ~SkGMBench();
+ GMBench(skiagm::GM* gm);
+ virtual ~GMBench();
protected:
virtual const char* onGetName() SK_OVERRIDE;
@@ -27,5 +27,5 @@ protected:
private:
skiagm::GM* fGM;
SkString fName;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
diff --git a/bench/GameBench.cpp b/bench/GameBench.cpp
index d197f3e170..c37f46df30 100644
--- a/bench/GameBench.cpp
+++ b/bench/GameBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkRandom.h"
@@ -14,7 +14,7 @@
// This bench simulates the calls Skia sees from various HTML5 canvas
// game bench marks
-class GameBench : public SkBenchmark {
+class GameBench : public Benchmark {
public:
enum Type {
kScale_Type,
@@ -304,7 +304,7 @@ private:
}
}
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// Partial clear
diff --git a/bench/GrMemoryPoolBench.cpp b/bench/GrMemoryPoolBench.cpp
index 96526e5fc2..6e6a37e76c 100644
--- a/bench/GrMemoryPoolBench.cpp
+++ b/bench/GrMemoryPoolBench.cpp
@@ -8,8 +8,8 @@
// This tests a Gr class
#if SK_SUPPORT_GPU
+#include "Benchmark.h"
#include "GrMemoryPool.h"
-#include "SkBenchmark.h"
#include "SkRandom.h"
#include "SkTDArray.h"
#include "SkTemplates.h"
@@ -30,7 +30,7 @@ GrMemoryPool A::gBenchPool(10 * (1 << 10), 10 * (1 << 10));
/**
* This benchmark creates and deletes objects in stack order
*/
-class GrMemoryPoolBenchStack : public SkBenchmark {
+class GrMemoryPoolBenchStack : public Benchmark {
public:
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
return backend == kNonRendering_Backend;
@@ -76,7 +76,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
struct B {
@@ -92,7 +92,7 @@ GrMemoryPool B::gBenchPool(10 * (1 << 10), 10 * (1 << 10));
/**
* This benchmark creates objects and deletes them in random order
*/
-class GrMemoryPoolBenchRandom : public SkBenchmark {
+class GrMemoryPoolBenchRandom : public Benchmark {
public:
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
return backend == kNonRendering_Backend;
@@ -121,7 +121,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
struct C {
@@ -137,7 +137,7 @@ GrMemoryPool C::gBenchPool(10 * (1 << 10), 10 * (1 << 10));
/**
* This benchmark creates objects and deletes them in queue order
*/
-class GrMemoryPoolBenchQueue : public SkBenchmark {
+class GrMemoryPoolBenchQueue : public Benchmark {
enum {
M = 4 * (1 << 10),
};
@@ -166,7 +166,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/GrOrderedSetBench.cpp b/bench/GrOrderedSetBench.cpp
index 4d32f0dc04..dde1c4a3f0 100644
--- a/bench/GrOrderedSetBench.cpp
+++ b/bench/GrOrderedSetBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkRandom.h"
#include "SkString.h"
@@ -15,7 +15,7 @@
static const int NUM_ELEMENTS = 1000;
// Time how long it takes to build a set
-class GrOrderedSetBuildBench : public SkBenchmark {
+class GrOrderedSetBuildBench : public Benchmark {
public:
GrOrderedSetBuildBench() {
fName.append("ordered_set_build");
@@ -52,11 +52,11 @@ protected:
private:
SkString fName;
int fData[NUM_ELEMENTS];
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// Time how long it takes to find elements in a set
-class GrOrderedSetFindBench : public SkBenchmark {
+class GrOrderedSetFindBench : public Benchmark {
public:
GrOrderedSetFindBench() {
fName.append("ordered_set_find");
@@ -93,11 +93,11 @@ private:
SkString fName;
int fData[NUM_ELEMENTS];
GrOrderedSet<int> fSet;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// Time how long it takes to iterate over and remove all elements from set
-class GrOrderedSetRemoveBench : public SkBenchmark {
+class GrOrderedSetRemoveBench : public Benchmark {
public:
GrOrderedSetRemoveBench() {
fName.append("ordered_set_remove");
@@ -137,7 +137,7 @@ protected:
private:
SkString fName;
GrOrderedSet<int> fSet;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/GrResourceCacheBench.cpp b/bench/GrResourceCacheBench.cpp
index b2a5d1e718..93ae356a4c 100644
--- a/bench/GrResourceCacheBench.cpp
+++ b/bench/GrResourceCacheBench.cpp
@@ -8,12 +8,12 @@
#if SK_SUPPORT_GPU
-#include "GrContext.h"
+#include "Benchmark.h"
#include "GrCacheable.h"
+#include "GrContext.h"
#include "GrResourceCache.h"
#include "GrStencilBuffer.h"
#include "GrTexture.h"
-#include "SkBenchmark.h"
#include "SkCanvas.h"
enum {
@@ -164,7 +164,7 @@ static void check_cache_contents_or_die(GrResourceCache* cache, int k) {
}
}
-class GrResourceCacheBenchAdd : public SkBenchmark {
+class GrResourceCacheBenchAdd : public Benchmark {
enum {
RESOURCE_COUNT = CACHE_SIZE_COUNT / 2,
DUPLICATE_COUNT = CACHE_SIZE_COUNT / 4,
@@ -197,10 +197,10 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
-class GrResourceCacheBenchFind : public SkBenchmark {
+class GrResourceCacheBenchFind : public Benchmark {
enum {
RESOURCE_COUNT = (CACHE_SIZE_COUNT / 2) - 100,
DUPLICATE_COUNT = 100
@@ -230,7 +230,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH( return new GrResourceCacheBenchAdd(); )
diff --git a/bench/GradientBench.cpp b/bench/GradientBench.cpp
index fa07bce4fd..90d45c812c 100644
--- a/bench/GradientBench.cpp
+++ b/bench/GradientBench.cpp
@@ -5,7 +5,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkColorPriv.h"
@@ -197,7 +197,7 @@ static const char* geomtypename(GeomType gt) {
///////////////////////////////////////////////////////////////////////////////
-class GradientBench : public SkBenchmark {
+class GradientBench : public Benchmark {
SkString fName;
SkShader* fShader;
enum {
@@ -262,7 +262,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
GeomType fGeomType;
};
@@ -306,7 +306,7 @@ DEF_BENCH( return new GradientBench(kConicalOutZero_GradType, gGradData[2]); )
///////////////////////////////////////////////////////////////////////////////
-class Gradient2Bench : public SkBenchmark {
+class Gradient2Bench : public Benchmark {
SkString fName;
bool fHasAlpha;
@@ -347,7 +347,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH( return new Gradient2Bench(false); )
diff --git a/bench/HairlinePathBench.cpp b/bench/HairlinePathBench.cpp
index 11faff57f8..e7e2b428e8 100644
--- a/bench/HairlinePathBench.cpp
+++ b/bench/HairlinePathBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkRandom.h"
@@ -13,8 +13,8 @@
#include "SkString.h"
#if SK_SUPPORT_GPU
-#include "GrTest.h"
#include "GrDrawTargetCaps.h"
+#include "GrTest.h"
#endif
enum Flags {
@@ -36,7 +36,7 @@ static const int points[] = {
static const int kMaxPathSize = 10;
-class HairlinePathBench : public SkBenchmark {
+class HairlinePathBench : public Benchmark {
public:
HairlinePathBench(Flags flags) : fFlags(flags) {
fPaint.setStyle(SkPaint::kStroke_Style);
@@ -78,7 +78,7 @@ private:
SkPaint fPaint;
SkString fName;
Flags fFlags;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class LinePathBench : public HairlinePathBench {
diff --git a/bench/ImageCacheBench.cpp b/bench/ImageCacheBench.cpp
index ef29cf88ff..5f1715fc31 100644
--- a/bench/ImageCacheBench.cpp
+++ b/bench/ImageCacheBench.cpp
@@ -5,10 +5,10 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkScaledImageCache.h"
-class ImageCacheBench : public SkBenchmark {
+class ImageCacheBench : public Benchmark {
SkScaledImageCache fCache;
SkBitmap fBM;
@@ -49,7 +49,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/ImageDecodeBench.cpp b/bench/ImageDecodeBench.cpp
index a2ca0ecaec..47993cfa7d 100644
--- a/bench/ImageDecodeBench.cpp
+++ b/bench/ImageDecodeBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkData.h"
#include "SkForceLinking.h"
@@ -18,7 +18,7 @@ __SK_FORCE_IMAGE_DECODER_LINKING;
class SkCanvas;
-class ImageDecodeBench : public SkBenchmark {
+class ImageDecodeBench : public Benchmark {
public:
ImageDecodeBench(void* p, const char* filename)
: fName("image_decode_")
@@ -85,7 +85,7 @@ private:
SkMemoryStream fStream;
bool fValid;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// These are files which call decodePalette
diff --git a/bench/ImageFilterDAGBench.cpp b/bench/ImageFilterDAGBench.cpp
index e6a3169507..29d1da1a61 100644
--- a/bench/ImageFilterDAGBench.cpp
+++ b/bench/ImageFilterDAGBench.cpp
@@ -5,10 +5,10 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBlurImageFilter.h"
-#include "SkMergeImageFilter.h"
#include "SkCanvas.h"
+#include "SkMergeImageFilter.h"
enum { kNumInputs = 5 };
@@ -16,7 +16,7 @@ enum { kNumInputs = 5 };
// This bench shows an improvement in performance once cacheing of re-used
// nodes is implemented, since the DAG is no longer flattened to a tree.
-class ImageFilterDAGBench : public SkBenchmark {
+class ImageFilterDAGBench : public Benchmark {
public:
ImageFilterDAGBench() {
}
@@ -40,7 +40,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH(return new ImageFilterDAGBench;)
diff --git a/bench/InterpBench.cpp b/bench/InterpBench.cpp
index f6f70d44c8..b19af8f35f 100644
--- a/bench/InterpBench.cpp
+++ b/bench/InterpBench.cpp
@@ -1,13 +1,13 @@
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkColorPriv.h"
#include "SkMatrix.h"
+#include "SkPaint.h"
#include "SkRandom.h"
#include "SkString.h"
-#include "SkPaint.h"
#define TILE(x, width) (((x) & 0xFFFF) * width >> 16)
-class InterpBench : public SkBenchmark {
+class InterpBench : public Benchmark {
enum {
kBuffer = 128,
kLoop = 20000
@@ -43,7 +43,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class Fixed16D16Interp : public InterpBench {
diff --git a/bench/LightingBench.cpp b/bench/LightingBench.cpp
index 4529041a78..4d234b951f 100644
--- a/bench/LightingBench.cpp
+++ b/bench/LightingBench.cpp
@@ -4,7 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmapSource.h"
#include "SkCanvas.h"
#include "SkDevice.h"
@@ -15,7 +15,7 @@
#define FILTER_WIDTH_LARGE SkIntToScalar(256)
#define FILTER_HEIGHT_LARGE SkIntToScalar(256)
-class LightingBaseBench : public SkBenchmark {
+class LightingBaseBench : public Benchmark {
public:
LightingBaseBench(bool small) : fIsSmall(small) { }
@@ -92,7 +92,7 @@ protected:
}
bool fIsSmall;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class LightingPointLitDiffuseBench : public LightingBaseBench {
diff --git a/bench/LineBench.cpp b/bench/LineBench.cpp
index dc57d9f165..bb6215b03f 100644
--- a/bench/LineBench.cpp
+++ b/bench/LineBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkColorPriv.h"
@@ -16,7 +16,7 @@
#include "SkTArray.h"
-class LineBench : public SkBenchmark {
+class LineBench : public Benchmark {
SkScalar fStrokeWidth;
bool fDoAA;
SkString fName;
@@ -56,7 +56,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH(return new LineBench(0, false);)
diff --git a/bench/MagnifierBench.cpp b/bench/MagnifierBench.cpp
index e4a51815d4..875ec4f465 100644
--- a/bench/MagnifierBench.cpp
+++ b/bench/MagnifierBench.cpp
@@ -4,7 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmapDevice.h"
#include "SkCanvas.h"
#include "SkMagnifierImageFilter.h"
@@ -15,7 +15,7 @@
#define FILTER_WIDTH_LARGE 256
#define FILTER_HEIGHT_LARGE 256
-class MagnifierBench : public SkBenchmark {
+class MagnifierBench : public Benchmark {
public:
MagnifierBench(bool small) :
fIsSmall(small), fInitialized(false) {
@@ -76,7 +76,7 @@ private:
bool fIsSmall;
bool fInitialized;
SkBitmap fCheckerboard;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/MathBench.cpp b/bench/MathBench.cpp
index da65456822..dbd661f8d3 100644
--- a/bench/MathBench.cpp
+++ b/bench/MathBench.cpp
@@ -1,9 +1,9 @@
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkColorPriv.h"
#include "SkMatrix.h"
+#include "SkPaint.h"
#include "SkRandom.h"
#include "SkString.h"
-#include "SkPaint.h"
static float sk_fsel(float pred, float result_ge, float result_lt) {
return pred >= 0 ? result_ge : result_lt;
@@ -15,7 +15,7 @@ static float fast_floor(float x) {
return (x + big) - big;
}
-class MathBench : public SkBenchmark {
+class MathBench : public Benchmark {
enum {
kBuffer = 100,
};
@@ -54,7 +54,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class MathBenchU32 : public MathBench {
@@ -262,7 +262,7 @@ static bool isFinite(const SkRect& r) {
return value == value;
}
-class IsFiniteBench : public SkBenchmark {
+class IsFiniteBench : public Benchmark {
enum {
N = 1000,
};
@@ -328,10 +328,10 @@ private:
IsFiniteProc fProc;
const char* fName;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
-class FloorBench : public SkBenchmark {
+class FloorBench : public Benchmark {
enum {
ARRAY = 1000,
};
@@ -389,10 +389,10 @@ protected:
private:
const char* fName;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
-class CLZBench : public SkBenchmark {
+class CLZBench : public Benchmark {
enum {
ARRAY = 1000,
};
@@ -449,12 +449,12 @@ protected:
private:
const char* fName;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
-class NormalizeBench : public SkBenchmark {
+class NormalizeBench : public Benchmark {
enum {
ARRAY =1000,
};
@@ -496,12 +496,12 @@ protected:
private:
const char* fName;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
-class FixedMathBench : public SkBenchmark {
+class FixedMathBench : public Benchmark {
enum {
N = 1000,
};
@@ -540,13 +540,13 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
template <typename T>
-class DivModBench : public SkBenchmark {
+class DivModBench : public Benchmark {
SkString fName;
public:
explicit DivModBench(const char* name) {
diff --git a/bench/Matrix44Bench.cpp b/bench/Matrix44Bench.cpp
index 55f377cb03..8a7c50e606 100644
--- a/bench/Matrix44Bench.cpp
+++ b/bench/Matrix44Bench.cpp
@@ -5,12 +5,12 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkMatrix44.h"
#include "SkRandom.h"
#include "SkString.h"
-class Matrix44Bench : public SkBenchmark {
+class Matrix44Bench : public Benchmark {
SkString fName;
public:
Matrix44Bench(const char name[]) {
@@ -37,7 +37,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class EqualsMatrix44Bench : public Matrix44Bench {
diff --git a/bench/MatrixBench.cpp b/bench/MatrixBench.cpp
index fa19fc8157..78482d963d 100644
--- a/bench/MatrixBench.cpp
+++ b/bench/MatrixBench.cpp
@@ -5,13 +5,13 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkMatrix.h"
#include "SkMatrixUtils.h"
#include "SkRandom.h"
#include "SkString.h"
-class MatrixBench : public SkBenchmark {
+class MatrixBench : public Benchmark {
SkString fName;
public:
MatrixBench(const char name[]) {
@@ -38,7 +38,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
diff --git a/bench/MatrixConvolutionBench.cpp b/bench/MatrixConvolutionBench.cpp
index 77910c90a9..6593ab0259 100644
--- a/bench/MatrixConvolutionBench.cpp
+++ b/bench/MatrixConvolutionBench.cpp
@@ -4,14 +4,14 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
+#include "SkMatrixConvolutionImageFilter.h"
#include "SkPaint.h"
#include "SkRandom.h"
#include "SkString.h"
-#include "SkMatrixConvolutionImageFilter.h"
-class MatrixConvolutionBench : public SkBenchmark {
+class MatrixConvolutionBench : public Benchmark {
public:
MatrixConvolutionBench(SkMatrixConvolutionImageFilter::TileMode tileMode, bool convolveAlpha)
: fName("matrixconvolution") {
@@ -49,7 +49,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
SkMatrixConvolutionImageFilter* fFilter;
SkString fName;
};
diff --git a/bench/MemcpyBench.cpp b/bench/MemcpyBench.cpp
index 3fd6dcbcfb..f550192751 100644
--- a/bench/MemcpyBench.cpp
+++ b/bench/MemcpyBench.cpp
@@ -5,13 +5,13 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkRandom.h"
#include "SkTemplates.h"
#include "SkUtils.h"
template <typename Memcpy32>
-class Memcpy32Bench : public SkBenchmark {
+class Memcpy32Bench : public Benchmark {
public:
explicit Memcpy32Bench(int count, Memcpy32 memcpy32, const char* name)
: fCount(count)
diff --git a/bench/MemoryBench.cpp b/bench/MemoryBench.cpp
index 19919ab635..3fc46dccf4 100644
--- a/bench/MemoryBench.cpp
+++ b/bench/MemoryBench.cpp
@@ -5,14 +5,14 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
+#include "SkChunkAlloc.h"
#include "SkPaint.h"
#include "SkRandom.h"
-#include "SkChunkAlloc.h"
#include "SkString.h"
-class ChunkAllocBench : public SkBenchmark {
+class ChunkAllocBench : public Benchmark {
SkString fName;
size_t fMinSize;
public:
@@ -50,7 +50,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH( return new ChunkAllocBench(64); )
@@ -67,7 +67,7 @@ static int* malloc_bzero(size_t num) {
return ints;
}
-class ZerosBench : public SkBenchmark {
+class ZerosBench : public Benchmark {
size_t fNum;
bool fRead;
bool fWrite;
diff --git a/bench/MemsetBench.cpp b/bench/MemsetBench.cpp
index bfdff5cbcc..6a1bd24c84 100644
--- a/bench/MemsetBench.cpp
+++ b/bench/MemsetBench.cpp
@@ -5,12 +5,12 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
-#include "SkUtils.h"
#include "SkString.h"
+#include "SkUtils.h"
-class MemsetBench : public SkBenchmark {
+class MemsetBench : public Benchmark {
SkString fName;
protected:
@@ -54,7 +54,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class Memset32Bench : public MemsetBench {
diff --git a/bench/MergeBench.cpp b/bench/MergeBench.cpp
index 9f16449a82..a6bb3acfb1 100644
--- a/bench/MergeBench.cpp
+++ b/bench/MergeBench.cpp
@@ -4,7 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmapDevice.h"
#include "SkBitmapSource.h"
#include "SkCanvas.h"
@@ -15,7 +15,7 @@
#define FILTER_WIDTH_LARGE SkIntToScalar(256)
#define FILTER_HEIGHT_LARGE SkIntToScalar(256)
-class MergeBench : public SkBenchmark {
+class MergeBench : public Benchmark {
public:
MergeBench(bool small) : fIsSmall(small), fInitialized(false) { }
@@ -88,7 +88,7 @@ private:
bool fInitialized;
SkBitmap fBitmap, fCheckerboard;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/MorphologyBench.cpp b/bench/MorphologyBench.cpp
index a32bca620a..97995e8195 100644
--- a/bench/MorphologyBench.cpp
+++ b/bench/MorphologyBench.cpp
@@ -5,13 +5,13 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
+#include "SkMorphologyImageFilter.h"
#include "SkPaint.h"
#include "SkRandom.h"
#include "SkShader.h"
#include "SkString.h"
-#include "SkMorphologyImageFilter.h"
#define SMALL SkIntToScalar(2)
#define REAL 1.5f
@@ -27,7 +27,7 @@ static const char* gStyleName[] = {
"dilate"
};
-class MorphologyBench : public SkBenchmark {
+class MorphologyBench : public Benchmark {
SkScalar fRadius;
MorphologyType fStyle;
SkString fName;
@@ -81,7 +81,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH( return new MorphologyBench(SMALL, kErode_MT); )
diff --git a/bench/MutexBench.cpp b/bench/MutexBench.cpp
index 3191ce17be..67648b5dec 100644
--- a/bench/MutexBench.cpp
+++ b/bench/MutexBench.cpp
@@ -4,10 +4,10 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkThread.h"
-class MutexBench : public SkBenchmark {
+class MutexBench : public Benchmark {
public:
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
return backend == kNonRendering_Backend;
@@ -27,7 +27,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/PathBench.cpp b/bench/PathBench.cpp
index 4b21ccf7f1..59b3bfa2ef 100644
--- a/bench/PathBench.cpp
+++ b/bench/PathBench.cpp
@@ -5,7 +5,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkColorPriv.h"
@@ -25,7 +25,7 @@ enum Flags {
#define FLAGS10 Flags(kBig_Flag)
#define FLAGS11 Flags(kStroke_Flag | kBig_Flag)
-class PathBench : public SkBenchmark {
+class PathBench : public Benchmark {
SkPaint fPaint;
SkString fName;
Flags fFlags;
@@ -74,7 +74,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class TrianglePathBench : public PathBench {
@@ -214,7 +214,7 @@ private:
typedef PathBench INHERITED;
};
-class RandomPathBench : public SkBenchmark {
+class RandomPathBench : public Benchmark {
public:
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
return backend == kNonRendering_Backend;
@@ -312,7 +312,7 @@ private:
int fCurrVerb;
int fCurrPoint;
SkRandom fRandom;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class PathCreateBench : public RandomPathBench {
@@ -567,7 +567,7 @@ private:
};
-class CirclesBench : public SkBenchmark {
+class CirclesBench : public Benchmark {
protected:
SkString fName;
Flags fFlags;
@@ -619,7 +619,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
@@ -628,7 +628,7 @@ private:
// Note: PathTest::test_arb_round_rect_is_convex and
// test_arb_zero_rad_round_rect_is_rect perform almost exactly
// the same test (but with no drawing)
-class ArbRoundRectBench : public SkBenchmark {
+class ArbRoundRectBench : public Benchmark {
protected:
SkString fName;
@@ -723,10 +723,10 @@ protected:
private:
bool fZeroRad; // should 0 radius rounds rects be tested?
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
-class ConservativelyContainsBench : public SkBenchmark {
+class ConservativelyContainsBench : public Benchmark {
public:
enum Type {
kRect_Type,
@@ -799,14 +799,14 @@ private:
bool fParity;
SkTDArray<SkRect> fQueryRects;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
#include "SkGeometry.h"
-class ConicBench_Chop5 : public SkBenchmark {
+class ConicBench_Chop5 : public Benchmark {
SkConic fRQ;
public:
ConicBench_Chop5() {
@@ -828,10 +828,10 @@ private:
}
}
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
-class ConicBench_ChopHalf : public SkBenchmark {
+class ConicBench_ChopHalf : public Benchmark {
SkConic fRQ;
public:
ConicBench_ChopHalf() {
@@ -853,7 +853,7 @@ private:
}
}
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
@@ -869,7 +869,7 @@ static void rand_conic(SkConic* conic, SkRandom& rand) {
}
}
-class ConicBench : public SkBenchmark {
+class ConicBench : public Benchmark {
public:
ConicBench() {
SkRandom rand;
@@ -889,7 +889,7 @@ protected:
SkConic fConics[CONICS];
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class ConicBench_ComputeError : public ConicBench {
diff --git a/bench/PathIterBench.cpp b/bench/PathIterBench.cpp
index 4e956ce3a5..b82146d1b2 100644
--- a/bench/PathIterBench.cpp
+++ b/bench/PathIterBench.cpp
@@ -5,7 +5,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkColorPriv.h"
@@ -25,7 +25,7 @@ static int rand_pts(SkRandom& rand, SkPoint pts[4]) {
return n;
}
-class PathIterBench : public SkBenchmark {
+class PathIterBench : public Benchmark {
SkString fName;
SkPath fPath;
bool fRaw;
@@ -86,7 +86,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/PathUtilsBench.cpp b/bench/PathUtilsBench.cpp
index 4231b72fab..6c8086fb9d 100644
--- a/bench/PathUtilsBench.cpp
+++ b/bench/PathUtilsBench.cpp
@@ -4,12 +4,12 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkPathUtils.h"
#include "SkRandom.h"
-#include "SkTime.h"
#include "SkString.h"
+#include "SkTime.h"
#define H 16
#define W 16
@@ -34,7 +34,7 @@ static void region_proc(char* bits, SkPath* path) {
}
/// Emulates the mix of rects blitted by gmail during scrolling
-class PathUtilsBench : public SkBenchmark {
+class PathUtilsBench : public Benchmark {
typedef void (*Proc)(char*, SkPath*);
Proc fProc;
@@ -65,7 +65,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH( return SkNEW_ARGS(PathUtilsBench, (path_proc, "path")); )
diff --git a/bench/PerlinNoiseBench.cpp b/bench/PerlinNoiseBench.cpp
index ff0baf35fc..560628f4fd 100644
--- a/bench/PerlinNoiseBench.cpp
+++ b/bench/PerlinNoiseBench.cpp
@@ -4,11 +4,11 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkPerlinNoiseShader.h"
-class PerlinNoiseBench : public SkBenchmark {
+class PerlinNoiseBench : public Benchmark {
SkISize fSize;
public:
@@ -54,7 +54,7 @@ private:
}
}
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/PicturePlaybackBench.cpp b/bench/PicturePlaybackBench.cpp
index 08c96d59b5..0109c720fc 100644
--- a/bench/PicturePlaybackBench.cpp
+++ b/bench/PicturePlaybackBench.cpp
@@ -4,7 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkColor.h"
#include "SkPaint.h"
@@ -17,7 +17,7 @@
// This is designed to emulate about 4 screens of textual content
-class PicturePlaybackBench : public SkBenchmark {
+class PicturePlaybackBench : public Benchmark {
public:
PicturePlaybackBench(const char name[]) {
fName.printf("picture_playback_%s", name);
@@ -63,7 +63,7 @@ protected:
SkScalar fPictureHeight;
SkScalar fTextSize;
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
diff --git a/bench/PictureRecordBench.cpp b/bench/PictureRecordBench.cpp
index f890e0d4f6..ef5361d20a 100644
--- a/bench/PictureRecordBench.cpp
+++ b/bench/PictureRecordBench.cpp
@@ -4,7 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkColor.h"
#include "SkPaint.h"
@@ -15,7 +15,7 @@
#include "SkRect.h"
#include "SkString.h"
-class PictureRecordBench : public SkBenchmark {
+class PictureRecordBench : public Benchmark {
public:
PictureRecordBench(const char name[]) {
fName.printf("picture_record_%s", name);
@@ -35,7 +35,7 @@ protected:
}
private:
SkString fName;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
diff --git a/bench/PremulAndUnpremulAlphaOpsBench.cpp b/bench/PremulAndUnpremulAlphaOpsBench.cpp
index e937e14f17..311bdf2d47 100644
--- a/bench/PremulAndUnpremulAlphaOpsBench.cpp
+++ b/bench/PremulAndUnpremulAlphaOpsBench.cpp
@@ -5,13 +5,13 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkConfig8888.h"
#include "SkString.h"
#include "sk_tool_utils.h"
-class PremulAndUnpremulAlphaOpsBench : public SkBenchmark {
+class PremulAndUnpremulAlphaOpsBench : public Benchmark {
enum {
W = 256,
H = 256,
@@ -58,7 +58,7 @@ private:
SkColorType fColorType;
SkString fName;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
diff --git a/bench/QuadTreeBench.cpp b/bench/QuadTreeBench.cpp
index 3846ada307..79078a8ae9 100644
--- a/bench/QuadTreeBench.cpp
+++ b/bench/QuadTreeBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkQuadTree.h"
#include "SkRandom.h"
@@ -22,7 +22,7 @@ static const SkIRect QUAD_TREE_BOUNDS = SkIRect::MakeLTRB(
typedef SkIRect (*MakeRectProc)(SkRandom&, int, int);
// Time how long it takes to build an QuadTree
-class QuadTreeBuildBench : public SkBenchmark {
+class QuadTreeBuildBench : public Benchmark {
public:
QuadTreeBuildBench(const char* name, MakeRectProc proc, SkBBoxHierarchy* tree)
: fTree(tree)
@@ -57,11 +57,11 @@ private:
SkBBoxHierarchy* fTree;
MakeRectProc fProc;
SkString fName;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// Time how long it takes to perform queries on an QuadTree
-class QuadTreeQueryBench : public SkBenchmark {
+class QuadTreeQueryBench : public Benchmark {
public:
enum QueryType {
kSmall_QueryType, // small queries
@@ -141,7 +141,7 @@ private:
MakeRectProc fProc;
SkString fName;
QueryType fQuery;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
static inline SkIRect make_concentric_rects_increasing(SkRandom&, int index, int numRects) {
diff --git a/bench/RTreeBench.cpp b/bench/RTreeBench.cpp
index d8e6347379..95f55c9a8f 100644
--- a/bench/RTreeBench.cpp
+++ b/bench/RTreeBench.cpp
@@ -6,7 +6,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkRTree.h"
#include "SkRandom.h"
@@ -21,7 +21,7 @@ static const int GRID_WIDTH = 100;
typedef SkIRect (*MakeRectProc)(SkRandom&, int, int);
// Time how long it takes to build an R-Tree either bulk-loaded or not
-class RTreeBuildBench : public SkBenchmark {
+class RTreeBuildBench : public Benchmark {
public:
RTreeBuildBench(const char* name, MakeRectProc proc, bool bulkLoad,
SkBBoxHierarchy* tree)
@@ -63,11 +63,11 @@ private:
MakeRectProc fProc;
SkString fName;
bool fBulkLoad;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// Time how long it takes to perform queries on an R-Tree, bulk-loaded or not
-class RTreeQueryBench : public SkBenchmark {
+class RTreeQueryBench : public Benchmark {
public:
enum QueryType {
kSmall_QueryType, // small queries
@@ -152,7 +152,7 @@ private:
SkString fName;
bool fBulkLoad;
QueryType fQuery;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
static inline SkIRect make_concentric_rects_increasing(SkRandom&, int index, int numRects) {
diff --git a/bench/ReadPixBench.cpp b/bench/ReadPixBench.cpp
index 805aaeb5f8..7848ebc757 100644
--- a/bench/ReadPixBench.cpp
+++ b/bench/ReadPixBench.cpp
@@ -6,7 +6,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
@@ -15,7 +15,7 @@
* and then reads small chunks from it repeatedly. This can cause trouble
* for the GPU as readbacks are very expensive.
*/
-class ReadPixBench : public SkBenchmark {
+class ReadPixBench : public Benchmark {
public:
ReadPixBench() {}
@@ -59,7 +59,7 @@ private:
static const int kNumStepsY = 30;
static const int kWindowSize = 5;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/bench/RectBench.cpp b/bench/RectBench.cpp
index a2029e601f..f50324a580 100644
--- a/bench/RectBench.cpp
+++ b/bench/RectBench.cpp
@@ -5,7 +5,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkCommandLineFlags.h"
#include "SkPaint.h"
@@ -15,7 +15,7 @@
DEFINE_double(strokeWidth, -1.0, "If set, use this stroke width in RectBench.");
-class RectBench : public SkBenchmark {
+class RectBench : public Benchmark {
public:
int fShift, fStroke;
enum {
@@ -78,7 +78,7 @@ protected:
}
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class SrcModeRectBench : public RectBench {
@@ -170,7 +170,7 @@ protected:
virtual const char* onGetName() { return fName; }
};
-class AARectBench : public SkBenchmark {
+class AARectBench : public Benchmark {
public:
enum {
W = 640,
@@ -221,7 +221,7 @@ protected:
}
private:
bool fRotate;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
/*******************************************************************************
diff --git a/bench/RectanizerBench.cpp b/bench/RectanizerBench.cpp
index 99f10c0014..286b681d38 100644
--- a/bench/RectanizerBench.cpp
+++ b/bench/RectanizerBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkRandom.h"
#include "SkSize.h"
#include "SkTDArray.h"
@@ -25,7 +25,7 @@
* random power of two rects
* small constant sized power of 2 rects (e.g., glyph cache use case)
*/
-class RectanizerBench : public SkBenchmark {
+class RectanizerBench : public Benchmark {
public:
static const int kWidth = 1024;
static const int kHeight = 1024;
@@ -117,7 +117,7 @@ private:
RectType fRectType;
SkAutoTDelete<GrRectanizer> fRectanizer;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
//////////////////////////////////////////////////////////////////////////////
diff --git a/bench/RectoriBench.cpp b/bench/RectoriBench.cpp
index 84af352a37..5c115115e3 100644
--- a/bench/RectoriBench.cpp
+++ b/bench/RectoriBench.cpp
@@ -5,16 +5,16 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
+#include "SkBlurMaskFilter.h"
#include "SkCanvas.h"
+#include "SkLayerDrawLooper.h"
#include "SkPaint.h"
#include "SkRandom.h"
-#include "SkBlurMaskFilter.h"
-#include "SkLayerDrawLooper.h"
// This bench replicates a problematic use case of a draw looper used
// to create an inner blurred rect
-class RectoriBench : public SkBenchmark {
+class RectoriBench : public Benchmark {
public:
RectoriBench() {}
@@ -98,7 +98,7 @@ private:
return looperBuilder.detachLooper();
}
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH( return SkNEW_ARGS(RectoriBench, ()); )
diff --git a/bench/RefCntBench.cpp b/bench/RefCntBench.cpp
index b7a111bcb0..351513b831 100644
--- a/bench/RefCntBench.cpp
+++ b/bench/RefCntBench.cpp
@@ -4,17 +4,17 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include <memory>
+#include "Benchmark.h"
#include "SkRefCnt.h"
#include "SkThread.h"
#include "SkWeakRefCnt.h"
-#include <memory>
enum {
M = 2
};
-class RefCntBench_Stack : public SkBenchmark {
+class RefCntBench_Stack : public Benchmark {
public:
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
return backend == kNonRendering_Backend;
@@ -36,7 +36,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class PlacedRefCnt : public SkRefCnt {
@@ -50,7 +50,7 @@ private:
typedef SkRefCnt INHERITED;
};
-class RefCntBench_Heap : public SkBenchmark {
+class RefCntBench_Heap : public Benchmark {
public:
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
return backend == kNonRendering_Backend;
@@ -74,10 +74,10 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
-class RefCntBench_New : public SkBenchmark {
+class RefCntBench_New : public Benchmark {
public:
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
return backend == kNonRendering_Backend;
@@ -100,12 +100,12 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
-class WeakRefCntBench_Stack : public SkBenchmark {
+class WeakRefCntBench_Stack : public Benchmark {
public:
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
return backend == kNonRendering_Backend;
@@ -127,7 +127,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
class PlacedWeakRefCnt : public SkWeakRefCnt {
@@ -136,7 +136,7 @@ public:
void operator delete(void*) { }
};
-class WeakRefCntBench_Heap : public SkBenchmark {
+class WeakRefCntBench_Heap : public Benchmark {
public:
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
return backend == kNonRendering_Backend;
@@ -160,10 +160,10 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
-class WeakRefCntBench_New : public SkBenchmark {
+class WeakRefCntBench_New : public Benchmark {
public:
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
return backend == kNonRendering_Backend;
@@ -186,7 +186,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/RegionBench.cpp b/bench/RegionBench.cpp
index 21c10afd4e..b3722d4caa 100644
--- a/bench/RegionBench.cpp
+++ b/bench/RegionBench.cpp
@@ -5,7 +5,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkRandom.h"
#include "SkRegion.h"
#include "SkString.h"
@@ -67,7 +67,7 @@ static bool containsxy_proc(SkRegion& a, SkRegion& b) {
return true;
}
-class RegionBench : public SkBenchmark {
+class RegionBench : public Benchmark {
public:
typedef bool (*Proc)(SkRegion& a, SkRegion& b);
@@ -114,10 +114,10 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
-class RectSectBench : public SkBenchmark {
+class RectSectBench : public Benchmark {
enum {
N = 1000
};
@@ -167,7 +167,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/RegionContainBench.cpp b/bench/RegionContainBench.cpp
index 35ca46ff0f..a47ab3395f 100644
--- a/bench/RegionContainBench.cpp
+++ b/bench/RegionContainBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkRandom.h"
#include "SkRegion.h"
#include "SkString.h"
@@ -15,7 +15,7 @@ static bool sect_proc(SkRegion& a, SkRegion& b) {
return result.op(a, b, SkRegion::kIntersect_Op);
}
-class RegionContainBench : public SkBenchmark {
+class RegionContainBench : public Benchmark {
public:
typedef bool (*Proc)(SkRegion& a, SkRegion& b);
SkRegion fA, fB;
@@ -61,7 +61,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH( return SkNEW_ARGS(RegionContainBench, (sect_proc, "sect")); )
diff --git a/bench/RepeatTileBench.cpp b/bench/RepeatTileBench.cpp
index 0e33ec0281..cf29b6a460 100644
--- a/bench/RepeatTileBench.cpp
+++ b/bench/RepeatTileBench.cpp
@@ -5,7 +5,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkColorPriv.h"
@@ -81,7 +81,7 @@ static void convert_to_index666(const SkBitmap& src, SkBitmap* dst) {
}
}
-class RepeatTileBench : public SkBenchmark {
+class RepeatTileBench : public Benchmark {
const SkColorType fColorType;
const SkAlphaType fAlphaType;
SkPaint fPaint;
@@ -137,7 +137,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH(return new RepeatTileBench(kN32_SkColorType, kOpaque_SkAlphaType))
diff --git a/bench/ResultsWriter.h b/bench/ResultsWriter.h
index e089d7fd07..ed10afa3ca 100644
--- a/bench/ResultsWriter.h
+++ b/bench/ResultsWriter.h
@@ -6,17 +6,17 @@
*
* Classes for writing out bench results in various formats.
*/
+
#ifndef SkResultsWriter_DEFINED
#define SkResultsWriter_DEFINED
-#include "SkBenchLogger.h"
+#include "BenchLogger.h"
#include "SkJSONCPP.h"
#include "SkStream.h"
#include "SkString.h"
#include "SkTArray.h"
#include "SkTypes.h"
-
/**
* Base class for writing out the bench results.
*
@@ -50,7 +50,7 @@ public:
*/
class LoggerResultsWriter : public ResultsWriter {
public:
- explicit LoggerResultsWriter(SkBenchLogger& logger, const char* timeFormat)
+ explicit LoggerResultsWriter(BenchLogger& logger, const char* timeFormat)
: fLogger(logger)
, fTimeFormat(timeFormat) {
fLogger.logProgress("skia bench:");
@@ -73,7 +73,7 @@ public:
fLogger.logProgress("\n");
}
private:
- SkBenchLogger& fLogger;
+ BenchLogger& fLogger;
const char* fTimeFormat;
};
diff --git a/bench/ScalarBench.cpp b/bench/ScalarBench.cpp
index 77849c6444..e09fa7533b 100644
--- a/bench/ScalarBench.cpp
+++ b/bench/ScalarBench.cpp
@@ -5,13 +5,13 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkFloatBits.h"
#include "SkRandom.h"
#include "SkRect.h"
#include "SkString.h"
-class ScalarBench : public SkBenchmark {
+class ScalarBench : public Benchmark {
SkString fName;
public:
ScalarBench(const char name[]) {
@@ -38,7 +38,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// having unknown values in our arrays can throw off the timing a lot, perhaps
@@ -125,7 +125,7 @@ private:
///////////////////////////////////////////////////////////////////////////////
-class RectBoundsBench : public SkBenchmark {
+class RectBoundsBench : public Benchmark {
enum {
PTS = 100,
};
@@ -157,7 +157,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/ShaderMaskBench.cpp b/bench/ShaderMaskBench.cpp
index 7323d8ee7a..aa3dadff2f 100644
--- a/bench/ShaderMaskBench.cpp
+++ b/bench/ShaderMaskBench.cpp
@@ -5,7 +5,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkColorShader.h"
#include "SkFontHost.h"
@@ -32,7 +32,7 @@ static const char* fontQualityName(const SkPaint& paint) {
return "AA";
}
-class ShaderMaskBench : public SkBenchmark {
+class ShaderMaskBench : public Benchmark {
SkPaint fPaint;
SkString fText;
SkString fName;
@@ -85,7 +85,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/SkipZeroesBench.cpp b/bench/SkipZeroesBench.cpp
index 46acb9f1b2..30d9377a5e 100644
--- a/bench/SkipZeroesBench.cpp
+++ b/bench/SkipZeroesBench.cpp
@@ -5,8 +5,8 @@
* found in the LICENSE file.
*/
+#include "Benchmark.h"
#include "Resources.h"
-#include "SkBenchmark.h"
#include "SkBitmap.h"
#include "SkData.h"
#include "SkForceLinking.h"
@@ -19,7 +19,7 @@ __SK_FORCE_IMAGE_DECODER_LINKING;
class SkCanvas;
-class SkipZeroesBench : public SkBenchmark {
+class SkipZeroesBench : public Benchmark {
public:
SkipZeroesBench(const char* filename, bool skipZeroes)
: fName("SkipZeroes_")
@@ -110,7 +110,7 @@ private:
bool fSkipZeroes;
bool fValid;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
// Enable the true version once the feature is checked in.
diff --git a/bench/SortBench.cpp b/bench/SortBench.cpp
index 1f888f2462..a7e8c2cd0b 100644
--- a/bench/SortBench.cpp
+++ b/bench/SortBench.cpp
@@ -5,10 +5,10 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkRandom.h"
-#include "SkTSort.h"
#include "SkString.h"
+#include "SkTSort.h"
static const int N = 1000;
@@ -96,7 +96,7 @@ static const struct {
{ "qsort", qsort_sort },
};
-class SortBench : public SkBenchmark {
+class SortBench : public Benchmark {
SkString fName;
const Type fType;
const SortProc fSortProc;
@@ -136,18 +136,18 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
-static SkBenchmark* NewSkQSort(Type t) {
+static Benchmark* NewSkQSort(Type t) {
return new SortBench(t, kSKQSort);
}
-static SkBenchmark* NewSkHeap(Type t) {
+static Benchmark* NewSkHeap(Type t) {
return new SortBench(t, kSKHeap);
}
-static SkBenchmark* NewQSort(Type t) {
+static Benchmark* NewQSort(Type t) {
return new SortBench(t, kQSort);
}
diff --git a/bench/StackBench.cpp b/bench/StackBench.cpp
index 61af99fb1a..3b41cb65ce 100644
--- a/bench/StackBench.cpp
+++ b/bench/StackBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkRandom.h"
#include "SkChunkAlloc.h"
@@ -29,7 +29,7 @@
// It wins every benchmark on every machine I tried (Desktop, Nexus S, Laptop).
template <typename Impl>
-struct StackBench : public SkBenchmark {
+struct StackBench : public Benchmark {
virtual bool isSuitableFor(Backend b) SK_OVERRIDE { return b == kNonRendering_Backend; }
virtual const char* onGetName() SK_OVERRIDE { return Impl::kName; }
virtual void onDraw(const int loops, SkCanvas*) SK_OVERRIDE { Impl::bench(loops); }
diff --git a/bench/StrokeBench.cpp b/bench/StrokeBench.cpp
index 975c01f7b6..24e0cabbb0 100644
--- a/bench/StrokeBench.cpp
+++ b/bench/StrokeBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkRRect.h"
@@ -53,7 +53,7 @@ static const char* draw_oval(const RRectRec* rec, int count) {
// Test drawing a small stroked version to see the effect of special-casing
// our stroke code for these convex single-contour shapes.
//
-class StrokeRRectBench : public SkBenchmark {
+class StrokeRRectBench : public Benchmark {
SkString fName;
SkPaint::Join fJoin;
RRectRec fRec;
@@ -88,7 +88,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH( return new StrokeRRectBench(SkPaint::kRound_Join, draw_rect); )
diff --git a/bench/TableBench.cpp b/bench/TableBench.cpp
index ce5c3d293d..a99e03b513 100644
--- a/bench/TableBench.cpp
+++ b/bench/TableBench.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkRect.h"
@@ -23,7 +23,7 @@ static const SkScalar kCellHeight = SkIntToScalar(10);
// 2&4 are then drawn grey. Areas 2&3 are thus double drawn while area 4 is
// triple drawn.
// This trio of drawRects is then repeat for the next cell.
-class TableBench : public SkBenchmark {
+class TableBench : public Benchmark {
public:
static const int kNumRows = 48;
static const int kNumCols = 32;
@@ -66,7 +66,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH( return new TableBench(); )
diff --git a/bench/TextBench.cpp b/bench/TextBench.cpp
index d32d0fd105..f150be2188 100644
--- a/bench/TextBench.cpp
+++ b/bench/TextBench.cpp
@@ -5,7 +5,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkFontHost.h"
#include "SkPaint.h"
@@ -38,7 +38,7 @@ static const char* fontQualityName(const SkPaint& paint) {
textencoding?
text -vs- postext - pathtext
*/
-class TextBench : public SkBenchmark {
+class TextBench : public Benchmark {
SkPaint fPaint;
SkString fText;
SkString fName;
@@ -123,7 +123,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/TileBench.cpp b/bench/TileBench.cpp
index 12c9629ee2..7487b1b8ea 100644
--- a/bench/TileBench.cpp
+++ b/bench/TileBench.cpp
@@ -6,7 +6,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkShader.h"
@@ -28,7 +28,7 @@ static void create_gradient(SkBitmap* bm) {
// Test out the special case of a tiled 1xN texture. Test out opacity,
// filtering and the different tiling modes
-class ConstXTileBench : public SkBenchmark {
+class ConstXTileBench : public Benchmark {
SkPaint fPaint;
SkString fName;
bool fDoFilter;
@@ -111,7 +111,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
DEF_BENCH(return new ConstXTileBench(SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, false, false, true))
diff --git a/bench/VertBench.cpp b/bench/VertBench.cpp
index 3f07528142..e426ad8a5e 100644
--- a/bench/VertBench.cpp
+++ b/bench/VertBench.cpp
@@ -5,19 +5,19 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkRandom.h"
-#include "SkString.h"
#include "SkShader.h"
+#include "SkString.h"
enum VertFlags {
kColors_VertFlag,
kTexture_VertFlag,
};
-class VertBench : public SkBenchmark {
+class VertBench : public Benchmark {
SkString fName;
enum {
W = 640,
@@ -87,7 +87,7 @@ protected:
}
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/bench/WritePixelsBench.cpp b/bench/WritePixelsBench.cpp
index 80aeda74cb..5138375ffb 100644
--- a/bench/WritePixelsBench.cpp
+++ b/bench/WritePixelsBench.cpp
@@ -5,11 +5,11 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkString.h"
-class WritePixelsBench : public SkBenchmark {
+class WritePixelsBench : public Benchmark {
public:
WritePixelsBench(SkColorType ct, SkAlphaType at)
: fColorType(ct)
@@ -68,7 +68,7 @@ private:
SkAlphaType fAlphaType;
SkString fName;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
//////////////////////////////////////////////////////////////////////////////
diff --git a/bench/WriterBench.cpp b/bench/WriterBench.cpp
index 7696eab832..906a9d2ee8 100644
--- a/bench/WriterBench.cpp
+++ b/bench/WriterBench.cpp
@@ -6,11 +6,11 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkWriter32.h"
-class WriterBench : public SkBenchmark {
+class WriterBench : public Benchmark {
public:
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
return backend == kNonRendering_Backend;
@@ -33,7 +33,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/bench/XfermodeBench.cpp b/bench/XfermodeBench.cpp
index 1910b75b21..f73943bcf7 100644
--- a/bench/XfermodeBench.cpp
+++ b/bench/XfermodeBench.cpp
@@ -6,7 +6,7 @@
* found in the LICENSE file.
*/
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkRandom.h"
@@ -14,7 +14,7 @@
#include "SkXfermode.h"
// Benchmark that draws non-AA rects with an SkXfermode::Mode
-class XfermodeBench : public SkBenchmark {
+class XfermodeBench : public Benchmark {
public:
XfermodeBench(SkXfermode::Mode mode) {
fXfermode.reset(SkXfermode::Create(mode));
@@ -58,10 +58,10 @@ private:
SkAutoTUnref<SkXfermode> fXfermode;
SkString fName;
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
-class XferCreateBench : public SkBenchmark {
+class XferCreateBench : public Benchmark {
public:
virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
return backend == kNonRendering_Backend;
@@ -80,7 +80,7 @@ protected:
}
private:
- typedef SkBenchmark INHERITED;
+ typedef Benchmark INHERITED;
};
//////////////////////////////////////////////////////////////////////////////
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index b82dd017b0..6b3f5872f2 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -5,18 +5,18 @@
* found in the LICENSE file.
*/
+#include "BenchLogger.h"
#include "BenchTimer.h"
+#include "Benchmark.h"
#include "CrashHandler.h"
+#include "GMBench.h"
#include "ResultsWriter.h"
-#include "SkBenchLogger.h"
-#include "SkBenchmark.h"
#include "SkBitmapDevice.h"
#include "SkCanvas.h"
#include "SkColorPriv.h"
#include "SkCommandLineFlags.h"
#include "SkData.h"
#include "SkDeferredCanvas.h"
-#include "SkGMBench.h"
#include "SkGraphics.h"
#include "SkImageEncoder.h"
#include "SkOSFile.h"
@@ -56,7 +56,7 @@ class Iter {
public:
Iter() : fBenches(BenchRegistry::Head()), fGMs(skiagm::GMRegistry::Head()) {}
- SkBenchmark* next() {
+ Benchmark* next() {
if (fBenches) {
BenchRegistry::Factory f = fBenches->factory();
fBenches = fBenches->next();
@@ -67,7 +67,7 @@ public:
SkAutoTDelete<skiagm::GM> gm(fGMs->factory()(NULL));
fGMs = fGMs->next();
if (gm->getFlags() & skiagm::GM::kAsBench_Flag) {
- return SkNEW_ARGS(SkGMBench, (gm.detach()));
+ return SkNEW_ARGS(GMBench, (gm.detach()));
}
}
@@ -144,24 +144,24 @@ static void perform_scale(SkCanvas* canvas, int w, int h) {
}
static SkSurface* make_surface(SkColorType colorType, const SkIPoint& size,
- SkBenchmark::Backend backend, int sampleCount,
+ Benchmark::Backend backend, int sampleCount,
GrContext* context) {
SkSurface* surface = NULL;
SkImageInfo info = SkImageInfo::Make(size.fX, size.fY, colorType,
kPremul_SkAlphaType);
switch (backend) {
- case SkBenchmark::kRaster_Backend:
+ case Benchmark::kRaster_Backend:
surface = SkSurface::NewRaster(info);
surface->getCanvas()->clear(SK_ColorWHITE);
break;
#if SK_SUPPORT_GPU
- case SkBenchmark::kGPU_Backend: {
+ case Benchmark::kGPU_Backend: {
surface = SkSurface::NewRenderTarget(context, info, sampleCount);
break;
}
#endif
- case SkBenchmark::kPDF_Backend:
+ case Benchmark::kPDF_Backend:
default:
SkDEBUGFAIL("unsupported");
}
@@ -193,24 +193,24 @@ static const struct Config {
SkColorType fColorType;
const char* name;
int sampleCount;
- SkBenchmark::Backend backend;
+ Benchmark::Backend backend;
GLContextType contextType;
bool runByDefault;
} gConfigs[] = {
- { kN32_SkColorType, "NONRENDERING", 0, SkBenchmark::kNonRendering_Backend, kNative, true},
- { kN32_SkColorType, "8888", 0, SkBenchmark::kRaster_Backend, kNative, true},
- { kRGB_565_SkColorType, "565", 0, SkBenchmark::kRaster_Backend, kNative, true},
+ { kN32_SkColorType, "NONRENDERING", 0, Benchmark::kNonRendering_Backend, kNative, true},
+ { kN32_SkColorType, "8888", 0, Benchmark::kRaster_Backend, kNative, true},
+ { kRGB_565_SkColorType, "565", 0, Benchmark::kRaster_Backend, kNative, true},
#if SK_SUPPORT_GPU
- { kN32_SkColorType, "GPU", 0, SkBenchmark::kGPU_Backend, kNative, true},
- { kN32_SkColorType, "MSAA4", 4, SkBenchmark::kGPU_Backend, kNative, false},
- { kN32_SkColorType, "MSAA16", 16, SkBenchmark::kGPU_Backend, kNative, false},
- { kN32_SkColorType, "NVPRMSAA4", 4, SkBenchmark::kGPU_Backend, kNVPR, true},
- { kN32_SkColorType, "NVPRMSAA16", 16, SkBenchmark::kGPU_Backend, kNVPR, false},
+ { kN32_SkColorType, "GPU", 0, Benchmark::kGPU_Backend, kNative, true},
+ { kN32_SkColorType, "MSAA4", 4, Benchmark::kGPU_Backend, kNative, false},
+ { kN32_SkColorType, "MSAA16", 16, Benchmark::kGPU_Backend, kNative, false},
+ { kN32_SkColorType, "NVPRMSAA4", 4, Benchmark::kGPU_Backend, kNVPR, true},
+ { kN32_SkColorType, "NVPRMSAA16", 16, Benchmark::kGPU_Backend, kNVPR, false},
#if SK_ANGLE
- { kN32_SkColorType, "ANGLE", 0, SkBenchmark::kGPU_Backend, kANGLE, true},
+ { kN32_SkColorType, "ANGLE", 0, Benchmark::kGPU_Backend, kANGLE, true},
#endif // SK_ANGLE
- { kN32_SkColorType, "Debug", 0, SkBenchmark::kGPU_Backend, kDebug, kIsDebug},
- { kN32_SkColorType, "NULLGPU", 0, SkBenchmark::kGPU_Backend, kNull, true},
+ { kN32_SkColorType, "Debug", 0, Benchmark::kGPU_Backend, kDebug, kIsDebug},
+ { kN32_SkColorType, "NULLGPU", 0, Benchmark::kGPU_Backend, kNull, true},
#endif // SK_SUPPORT_GPU
};
@@ -281,7 +281,7 @@ int tool_main(int argc, char** argv) {
SkAutoGraphics ag;
// First, parse some flags.
- SkBenchLogger logger;
+ BenchLogger logger;
if (FLAGS_logFile.count()) {
logger.SetLogFile(FLAGS_logFile[0]);
}
@@ -340,7 +340,7 @@ int tool_main(int argc, char** argv) {
// Non-rendering configs only run in normal mode
for (int i = 0; i < configs.count(); ++i) {
const Config& config = gConfigs[configs[i]];
- if (SkBenchmark::kNonRendering_Backend == config.backend) {
+ if (Benchmark::kNonRendering_Backend == config.backend) {
configs.remove(i, 1);
--i;
}
@@ -351,7 +351,7 @@ int tool_main(int argc, char** argv) {
for (int i = 0; i < configs.count(); ++i) {
const Config& config = gConfigs[configs[i]];
- if (SkBenchmark::kGPU_Backend == config.backend) {
+ if (Benchmark::kGPU_Backend == config.backend) {
GrContext* context = gContextFactory.get(config.contextType);
if (NULL == context) {
SkDebugf("GrContext could not be created for config %s. Config will be skipped.\n",
@@ -409,7 +409,7 @@ int tool_main(int argc, char** argv) {
for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); ++i) {
#if SK_SUPPORT_GPU
const Config& config = gConfigs[i];
- if (SkBenchmark::kGPU_Backend != config.backend) {
+ if (Benchmark::kGPU_Backend != config.backend) {
continue;
}
GrContext* context = gContextFactory.get(config.contextType);
@@ -432,9 +432,9 @@ int tool_main(int argc, char** argv) {
// Run each bench in each configuration it supports and we asked for.
Iter iter;
- SkBenchmark* bench;
+ Benchmark* bench;
while ((bench = iter.next()) != NULL) {
- SkAutoTUnref<SkBenchmark> benchUnref(bench);
+ SkAutoTUnref<Benchmark> benchUnref(bench);
if (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getName())) {
continue;
}
@@ -457,7 +457,7 @@ int tool_main(int argc, char** argv) {
GrContext* context = NULL;
#if SK_SUPPORT_GPU
SkGLContextHelper* glContext = NULL;
- if (SkBenchmark::kGPU_Backend == config.backend) {
+ if (Benchmark::kGPU_Backend == config.backend) {
context = gContextFactory.get(config.contextType);
if (NULL == context) {
continue;
@@ -472,7 +472,7 @@ int tool_main(int argc, char** argv) {
const SkIPoint dim = bench->getSize();
SkAutoTUnref<SkSurface> surface;
- if (SkBenchmark::kNonRendering_Backend != config.backend) {
+ if (Benchmark::kNonRendering_Backend != config.backend) {
surface.reset(make_surface(config.fColorType,
dim,
config.backend,
@@ -527,7 +527,7 @@ int tool_main(int argc, char** argv) {
#if SK_SUPPORT_GPU
SkGLContextHelper* contextHelper = NULL;
- if (SkBenchmark::kGPU_Backend == config.backend) {
+ if (Benchmark::kGPU_Backend == config.backend) {
contextHelper = gContextFactory.getGLContext(config.contextType);
}
BenchTimer timer(contextHelper);
@@ -642,7 +642,7 @@ int tool_main(int argc, char** argv) {
}
if (FLAGS_verbose) { SkDebugf("\n"); }
- if (!FLAGS_dryRun && FLAGS_outDir.count() && SkBenchmark::kNonRendering_Backend != config.backend) {
+ if (!FLAGS_dryRun && FLAGS_outDir.count() && Benchmark::kNonRendering_Backend != config.backend) {
SkAutoTUnref<SkImage> image(surface->newImageSnapshot());
if (image.get()) {
saveFile(bench->getName(), config.name, FLAGS_outDir[0],
diff --git a/dm/DM.cpp b/dm/DM.cpp
index fde057d03f..29810130c3 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -1,7 +1,8 @@
// Main binary for DM.
// For a high-level overview, please see dm/README.
-#include "SkBenchmark.h"
+#include "Benchmark.h"
+#include "CrashHandler.h"
#include "SkCommandLineFlags.h"
#include "SkForceLinking.h"
#include "SkGraphics.h"
@@ -9,7 +10,6 @@
#include "SkString.h"
#include "Test.h"
#include "gm.h"
-#include "CrashHandler.h"
#include "DMBenchTask.h"
#include "DMCpuGMTask.h"
@@ -249,7 +249,7 @@ int tool_main(int argc, char** argv) {
SkTDArray<BenchRegistry::Factory> benches;
if (FLAGS_benches) {
- append_matching_factories<SkBenchmark>(BenchRegistry::Head(), &benches);
+ append_matching_factories<Benchmark>(BenchRegistry::Head(), &benches);
}
SkTDArray<TestRegistry::Factory> tests;
diff --git a/dm/DMBenchTask.cpp b/dm/DMBenchTask.cpp
index 619bbc1b14..7cd2fdcb03 100644
--- a/dm/DMBenchTask.cpp
+++ b/dm/DMBenchTask.cpp
@@ -41,18 +41,18 @@ GpuBenchTask::GpuBenchTask(const char* config,
, fSampleCount(sampleCount) {}
bool NonRenderingBenchTask::shouldSkip() const {
- return !fBench->isSuitableFor(SkBenchmark::kNonRendering_Backend);
+ return !fBench->isSuitableFor(Benchmark::kNonRendering_Backend);
}
bool CpuBenchTask::shouldSkip() const {
- return !fBench->isSuitableFor(SkBenchmark::kRaster_Backend);
+ return !fBench->isSuitableFor(Benchmark::kRaster_Backend);
}
bool GpuBenchTask::shouldSkip() const {
- return kGPUDisabled || !fBench->isSuitableFor(SkBenchmark::kGPU_Backend);
+ return kGPUDisabled || !fBench->isSuitableFor(Benchmark::kGPU_Backend);
}
-static void draw_raster(SkBenchmark* bench, SkColorType colorType) {
+static void draw_raster(Benchmark* bench, SkColorType colorType) {
SkBitmap bitmap;
AllocatePixels(colorType, bench->getSize().x(), bench->getSize().y(), &bitmap);
SkCanvas canvas(bitmap);
diff --git a/dm/DMBenchTask.h b/dm/DMBenchTask.h
index ac7030b5f0..3c71cd76f0 100644
--- a/dm/DMBenchTask.h
+++ b/dm/DMBenchTask.h
@@ -1,14 +1,14 @@
#ifndef DMBenchTask_DEFINED
#define DMBenchTask_DEFINED
+#include "Benchmark.h"
#include "DMReporter.h"
#include "DMTask.h"
#include "DMTaskRunner.h"
-#include "SkBenchmark.h"
#include "SkString.h"
#include "SkTemplates.h"
-// Tasks that run an SkBenchmark once as a check that it doesn't crash.
+// Tasks that run an Benchmark once as a check that it doesn't crash.
namespace DM {
@@ -21,7 +21,7 @@ public:
virtual SkString name() const SK_OVERRIDE { return fName; }
private:
- SkAutoTDelete<SkBenchmark> fBench;
+ SkAutoTDelete<Benchmark> fBench;
const SkString fName;
};
@@ -34,7 +34,7 @@ public:
virtual SkString name() const SK_OVERRIDE { return fName; }
private:
- SkAutoTDelete<SkBenchmark> fBench;
+ SkAutoTDelete<Benchmark> fBench;
const SkString fName;
const SkColorType fColorType;
};
@@ -53,7 +53,7 @@ public:
virtual SkString name() const SK_OVERRIDE { return fName; }
private:
- SkAutoTDelete<SkBenchmark> fBench;
+ SkAutoTDelete<Benchmark> fBench;
const SkString fName;
const GrContextFactory::GLContextType fContextType;
int fSampleCount;
diff --git a/dm/DMUtil.h b/dm/DMUtil.h
index 8011e96e1e..b99fe0c01a 100644
--- a/dm/DMUtil.h
+++ b/dm/DMUtil.h
@@ -1,7 +1,7 @@
#ifndef DMUtil_DEFINED
#define DMUtil_DEFINED
-#include "SkBenchmark.h"
+#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkString.h"
#include "gm_expectations.h"
diff --git a/gyp/bench.gyp b/gyp/bench.gyp
index 6ec972f328..15927e6413 100644
--- a/gyp/bench.gyp
+++ b/gyp/bench.gyp
@@ -18,11 +18,11 @@
'skia_lib.gyp:skia_lib',
],
'sources': [
+ '../bench/BenchLogger.cpp',
+ '../bench/BenchLogger.h',
+ '../bench/GMBench.cpp',
+ '../bench/GMBench.h',
'../bench/ResultsWriter.cpp',
- '../bench/SkBenchLogger.cpp',
- '../bench/SkBenchLogger.h',
- '../bench/SkGMBench.cpp',
- '../bench/SkGMBench.h',
'../bench/benchmain.cpp',
'../tools/sk_tool_utils.cpp',
],
diff --git a/gyp/bench.gypi b/gyp/bench.gypi
index 82a7cd6ba4..06df30bd26 100644
--- a/gyp/bench.gypi
+++ b/gyp/bench.gypi
@@ -9,8 +9,8 @@
'skia_lib.gyp:skia_lib',
],
'sources': [
- '../bench/SkBenchmark.cpp',
- '../bench/SkBenchmark.h',
+ '../bench/Benchmark.cpp',
+ '../bench/Benchmark.h',
'../bench/AAClipBench.cpp',
'../bench/BicubicBench.cpp',
diff --git a/gyp/tools.gyp b/gyp/tools.gyp
index 7af70f782f..5ea127296a 100644
--- a/gyp/tools.gyp
+++ b/gyp/tools.gyp
@@ -286,11 +286,11 @@
'target_name': 'bench_pictures',
'type': 'executable',
'sources': [
+ '../bench/BenchLogger.cpp',
+ '../bench/BenchLogger.h',
'../bench/ResultsWriter.cpp',
'../tools/PictureBenchmark.cpp',
'../tools/PictureResultsWriter.h',
- '../bench/SkBenchLogger.h',
- '../bench/SkBenchLogger.cpp',
'../tools/bench_pictures_main.cpp',
],
'include_dirs': [
diff --git a/tools/PictureBenchmark.h b/tools/PictureBenchmark.h
index 3ec3c6691c..142d52685e 100644
--- a/tools/PictureBenchmark.h
+++ b/tools/PictureBenchmark.h
@@ -8,15 +8,13 @@
#ifndef PictureBenchmark_DEFINED
#define PictureBenchmark_DEFINED
-#include "SkTypes.h"
#include "PictureRenderer.h"
-#include "TimerData.h"
#include "PictureResultsWriter.h"
+#include "SkTypes.h"
+#include "TimerData.h"
class BenchTimer;
-class SkBenchLogger;
class SkPicture;
-class SkString;
namespace sk_tools {
diff --git a/tools/PictureResultsWriter.h b/tools/PictureResultsWriter.h
index 272a50c4c3..d4a15765f0 100644
--- a/tools/PictureResultsWriter.h
+++ b/tools/PictureResultsWriter.h
@@ -6,15 +6,17 @@
*
* Classes for writing out bench results in various formats.
*/
+
#ifndef SkPictureResultsWriter_DEFINED
#define SkPictureResultsWriter_DEFINED
+#include "BenchLogger.h"
#include "ResultsWriter.h"
-#include "SkBenchLogger.h"
#include "SkJSONCPP.h"
#include "SkStream.h"
#include "SkString.h"
#include "SkTArray.h"
+#include "TimerData.h"
/**
* Base class for writing picture bench results.
@@ -93,7 +95,7 @@ private:
};
/**
- * Writes to SkBenchLogger to mimic original behavior
+ * Writes to BenchLogger to mimic original behavior
*/
class PictureResultsLoggerWriter : public PictureResultsWriter {
private:
@@ -103,7 +105,7 @@ private:
}
}
public:
- PictureResultsLoggerWriter(SkBenchLogger* log)
+ PictureResultsLoggerWriter(BenchLogger* log)
: fLogger(log), currentLine() {}
virtual void bench(const char name[], int32_t x, int32_t y) {
SkString result;
@@ -136,7 +138,7 @@ public:
}
virtual void end() {}
private:
- SkBenchLogger* fLogger;
+ BenchLogger* fLogger;
SkString currentLine;
};
diff --git a/tools/bbh_shootout.cpp b/tools/bbh_shootout.cpp
index f3758cb903..e657917aad 100644
--- a/tools/bbh_shootout.cpp
+++ b/tools/bbh_shootout.cpp
@@ -6,16 +6,16 @@
*/
#include "BenchTimer.h"
+#include "Benchmark.h"
#include "LazyDecodeBitmap.h"
#include "PictureBenchmark.h"
#include "PictureRenderer.h"
-#include "SkBenchmark.h"
+#include "SkCommandLineFlags.h"
#include "SkForceLinking.h"
#include "SkGraphics.h"
#include "SkStream.h"
#include "SkString.h"
#include "SkTArray.h"
-#include "SkCommandLineFlags.h"
typedef sk_tools::PictureRenderer::BBoxHierarchyType BBoxType;
static const int kBBoxTypeCount = sk_tools::PictureRenderer::kLast_BBoxHierarchyType + 1;
diff --git a/tools/bench_pictures_main.cpp b/tools/bench_pictures_main.cpp
index c63ffff5b7..d9b767b2aa 100644
--- a/tools/bench_pictures_main.cpp
+++ b/tools/bench_pictures_main.cpp
@@ -5,13 +5,14 @@
* found in the LICENSE file.
*/
+#include "BenchLogger.h"
#include "BenchTimer.h"
-#include "CrashHandler.h"
#include "CopyTilesRenderer.h"
+#include "CrashHandler.h"
#include "LazyDecodeBitmap.h"
#include "PictureBenchmark.h"
#include "PictureRenderingFlags.h"
-#include "SkBenchLogger.h"
+#include "PictureResultsWriter.h"
#include "SkCommandLineFlags.h"
#include "SkData.h"
#include "SkDiscardableMemoryPool.h"
@@ -22,9 +23,8 @@
#include "SkPicture.h"
#include "SkStream.h"
#include "picture_utils.h"
-#include "PictureResultsWriter.h"
-SkBenchLogger gLogger;
+BenchLogger gLogger;
PictureResultsLoggerWriter gLogWriter(&gLogger);
PictureResultsMultiWriter gWriter;