Remove uses of unnamed namespace in bench/ directory.
Skia prefers to use static over unnamed namespace. BUG=None TEST=None, no functional changes. R=bsalomon@google.com, robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/24660003 git-svn-id: http://skia.googlecode.com/svn/trunk@11483 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
2c86fbb0b1
commit
97b4b67ee7
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Copyright 2013 Google Inc.
|
||||
*
|
||||
@ -16,10 +15,8 @@
|
||||
* to write one subclass that can be a GM, bench, and/or Sample.
|
||||
*/
|
||||
|
||||
namespace {
|
||||
|
||||
// Generates y values for the chart plots.
|
||||
void gen_data(SkScalar yAvg, SkScalar ySpread, int count, SkTDArray<SkScalar>* dataPts) {
|
||||
static void gen_data(SkScalar yAvg, SkScalar ySpread, int count, SkTDArray<SkScalar>* dataPts) {
|
||||
dataPts->setCount(count);
|
||||
static SkRandom gRandom;
|
||||
for (int i = 0; i < count; ++i) {
|
||||
@ -32,12 +29,12 @@ void gen_data(SkScalar yAvg, SkScalar ySpread, int count, SkTDArray<SkScalar>* d
|
||||
// plot. The fill path is bounded below by the bottomData plot points or a horizontal line at
|
||||
// yBase if bottomData == NULL.
|
||||
// The plots are animated by rotating the data points by leftShift.
|
||||
void gen_paths(const SkTDArray<SkScalar>& topData,
|
||||
const SkTDArray<SkScalar>* bottomData,
|
||||
SkScalar yBase,
|
||||
SkScalar xLeft, SkScalar xDelta,
|
||||
int leftShift,
|
||||
SkPath* plot, SkPath* fill) {
|
||||
static void gen_paths(const SkTDArray<SkScalar>& topData,
|
||||
const SkTDArray<SkScalar>* bottomData,
|
||||
SkScalar yBase,
|
||||
SkScalar xLeft, SkScalar xDelta,
|
||||
int leftShift,
|
||||
SkPath* plot, SkPath* fill) {
|
||||
plot->rewind();
|
||||
fill->rewind();
|
||||
plot->incReserve(topData.count());
|
||||
@ -85,8 +82,6 @@ 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 {
|
||||
|
@ -17,7 +17,6 @@
|
||||
// change this to 0 to compare GrMemoryPool to default new / delete
|
||||
#define OVERRIDE_NEW 1
|
||||
|
||||
namespace {
|
||||
struct A {
|
||||
int gStuff[10];
|
||||
#if OVERRIDE_NEW
|
||||
@ -27,8 +26,6 @@ struct A {
|
||||
static GrMemoryPool gPool;
|
||||
};
|
||||
GrMemoryPool A::gPool(10 * (1 << 10), 10 * (1 << 10));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This benchmark creates and deletes objects in stack order
|
||||
@ -154,4 +151,5 @@ private:
|
||||
DEF_BENCH( return new GrMemoryPoolBenchStack(); )
|
||||
DEF_BENCH( return new GrMemoryPoolBenchRandom(); )
|
||||
DEF_BENCH( return new GrMemoryPoolBenchQueue(); )
|
||||
|
||||
#endif
|
||||
|
@ -4,6 +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 "SkCanvas.h"
|
||||
#include "SkPaint.h"
|
||||
@ -16,15 +17,11 @@
|
||||
#define REAL SkFloatToScalar(1.5f)
|
||||
#define BIG SkIntToScalar(10)
|
||||
|
||||
namespace {
|
||||
|
||||
enum MorphologyType {
|
||||
kErode_MT,
|
||||
kDilate_MT
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
static const char* gStyleName[] = {
|
||||
"erode",
|
||||
"dilate"
|
||||
|
Loading…
Reference in New Issue
Block a user