Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@8919 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-04-30 07:01:03 +00:00
Родитель 0cb7df9718
Коммит 8152113073
7 изменённых файлов: 39 добавлений и 40 удалений

Просмотреть файл

@ -59,12 +59,12 @@ private:
class MathBenchU32 : public MathBench {
public:
MathBenchU32(void* param, const char name[]) : INHERITED(param, name) {}
protected:
virtual void performITest(uint32_t* SK_RESTRICT dst,
const uint32_t* SK_RESTRICT src,
int count) = 0;
virtual void performTest(float* SK_RESTRICT dst,
const float* SK_RESTRICT src,
int count) SK_OVERRIDE {
@ -379,7 +379,7 @@ class CLZBench : public SkBenchmark {
uint32_t fData[ARRAY];
bool fUsePortable;
public:
public:
CLZBench(void* param, bool usePortable)
: INHERITED(param)
, fUsePortable(usePortable) {
@ -388,7 +388,7 @@ public:
for (int i = 0; i < ARRAY; ++i) {
fData[i] = rand.nextU();
}
if (fUsePortable) {
fName = "clz_portable";
} else {
@ -396,14 +396,14 @@ public:
}
fIsRendering = false;
}
// just so the compiler doesn't remove our loops
virtual void process(int) {}
protected:
virtual void onDraw(SkCanvas*) {
int accum = 0;
if (fUsePortable) {
for (int j = 0; j < LOOP; ++j) {
for (int i = 0; i < ARRAY; ++i) {
@ -420,14 +420,14 @@ protected:
}
}
}
virtual const char* onGetName() {
return fName;
}
private:
const char* fName;
typedef SkBenchmark INHERITED;
};

Просмотреть файл

@ -907,19 +907,19 @@ public:
fRQ.fPts[2].set(100, 100);
fRQ.fW = SkScalarCos(SK_ScalarPI/4);
}
private:
virtual const char* onGetName() SK_OVERRIDE {
return "ratquad-chop-half";
}
virtual void onDraw(SkCanvas*) SK_OVERRIDE {
SkConic dst[2];
for (int i = 0; i < N; ++i) {
fRQ.chop(dst);
}
}
typedef SkBenchmark INHERITED;
};
@ -945,14 +945,14 @@ public:
}
fIsRendering = false;
}
protected:
enum {
N = 20000,
CONICS = 100
};
SkConic fConics[CONICS];
private:
typedef SkBenchmark INHERITED;
};
@ -960,12 +960,12 @@ private:
class ConicBench_ComputeError : public ConicBench {
public:
ConicBench_ComputeError(void* param) : INHERITED(param) {}
protected:
virtual const char* onGetName() SK_OVERRIDE {
return "conic-compute-error";
}
virtual void onDraw(SkCanvas*) SK_OVERRIDE {
SkVector err;
for (int i = 0; i < N; ++i) {
@ -974,7 +974,7 @@ protected:
}
}
}
private:
typedef ConicBench INHERITED;
};
@ -982,12 +982,12 @@ private:
class ConicBench_asQuadTol : public ConicBench {
public:
ConicBench_asQuadTol(void* param) : INHERITED(param) {}
protected:
virtual const char* onGetName() SK_OVERRIDE {
return "conic-asQuadTol";
}
virtual void onDraw(SkCanvas*) SK_OVERRIDE {
for (int i = 0; i < N; ++i) {
for (int j = 0; j < CONICS; ++j) {
@ -995,7 +995,7 @@ protected:
}
}
}
private:
typedef ConicBench INHERITED;
};
@ -1008,7 +1008,7 @@ protected:
virtual const char* onGetName() SK_OVERRIDE {
return "conic-quadPow2";
}
virtual void onDraw(SkCanvas*) SK_OVERRIDE {
for (int i = 0; i < N; ++i) {
for (int j = 0; j < CONICS; ++j) {
@ -1016,7 +1016,7 @@ protected:
}
}
}
private:
typedef ConicBench INHERITED;
};
@ -1083,4 +1083,3 @@ DEF_BENCH( return new ConicBench_ChopHalf(p) )
DEF_BENCH( return new ConicBench_ComputeError(p) )
DEF_BENCH( return new ConicBench_asQuadTol(p) )
DEF_BENCH( return new ConicBench_quadPow2(p) )

Просмотреть файл

@ -126,7 +126,7 @@ void SkEvent::SignalQueueTimer(SkMSec ms)
return;
}
env->CallVoidMethod(gWindowGlue.m_obj,
gWindowGlue.m_startTimer, ms);
gWindowGlue.m_startTimer, ms);
}
void SkEvent::SignalNonEmptyQueue()
@ -157,7 +157,7 @@ static jmethodID GetJMethod(JNIEnv* env, jclass clazz, const char name[],
JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_init(JNIEnv* env,
jobject thiz, jobject jsampleActivity)
{
// setup jni hooks to the java activity
// setup jni hooks to the java activity
gActivityGlue.m_env = env;
jclass clazz = env->FindClass("com/skia/SkiaSampleActivity");
gActivityGlue.m_obj = env->NewWeakGlobalRef(jsampleActivity);
@ -246,19 +246,19 @@ JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_handleClick(JNIEnv* env,
JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_nextSample(
JNIEnv* env, jobject thiz)
{
gWindow->nextSample();
gWindow->nextSample();
}
JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_previousSample(
JNIEnv* env, jobject thiz)
{
gWindow->previousSample();
gWindow->previousSample();
}
JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_goToSample(
JNIEnv* env, jobject thiz, jint position)
{
gWindow->goToSample(position);
gWindow->goToSample(position);
}
JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_toggleRenderingMode(
@ -320,5 +320,5 @@ JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_saveToPDF(
JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_postInval(
JNIEnv* env, jobject thiz)
{
gWindow->postInvalDelay();
gWindow->postInvalDelay();
}

Просмотреть файл

@ -1,12 +1,12 @@
# This GYP file stores the dependencies necessary to build Skia on the Android
# platform. The OS doesn't provide many stable libraries as part of the
# distribution so we have to build a few of them ourselves.
# distribution so we have to build a few of them ourselves.
#
# NOTE: We tried adding the gyp file to the android/ directory at the root of
# NOTE: We tried adding the gyp file to the android/ directory at the root of
# the Skia repo, but that resulted in the generated makefiles being created
# outside of the out directory. We may be able to move the bulk of this gyp
# to the /android directory and put a simple shim here, but that has yet to be
# tested.
# tested.
{
'variables': {
@ -210,7 +210,7 @@
'direct_dependent_settings': {
'target_conditions': [
# '_type' is an 'automatic variable' which is defined for any
# target which defines a key-value pair with 'type' as the key (so,
# target which defines a key-value pair with 'type' as the key (so,
# all of them). Conditionals inside 'target_conditions' are evaluated
# *after* all other definitions and conditionals are evaluated, so
# we're guaranteed that '_type' will be defined when we get here.
@ -239,7 +239,7 @@
'direct_dependent_settings': {
'target_conditions': [
# '_type' is an 'automatic variable' which is defined for any
# target which defines a key-value pair with 'type' as the key (so,
# target which defines a key-value pair with 'type' as the key (so,
# all of them). Conditionals inside 'target_conditions' are evaluated
# *after* all other definitions and conditionals are evaluated, so
# we're guaranteed that '_type' will be defined when we get here.

Просмотреть файл

@ -238,8 +238,8 @@ GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexStorage2D(GrGLenum target,
GrGLsizei height) {
}
GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDiscardFramebuffer(GrGLenum target,
GrGLsizei numAttachments,
GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDiscardFramebuffer(GrGLenum target,
GrGLsizei numAttachments,
const GrGLenum* attachments) {
}

Просмотреть файл

@ -159,8 +159,8 @@ GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexStorage2D(GrGLenum target,
GrGLsizei width,
GrGLsizei height);
GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDiscardFramebuffer(GrGLenum target,
GrGLsizei numAttachments,
GrGLvoid GR_GL_FUNCTION_TYPE noOpGLDiscardFramebuffer(GrGLenum target,
GrGLsizei numAttachments,
const GrGLenum* attachments);
GrGLvoid GR_GL_FUNCTION_TYPE noOpGLTexSubImage2D(GrGLenum target,

Просмотреть файл

@ -18,7 +18,7 @@ static void test_clz(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, 31 == SkCLZ(1));
REPORTER_ASSERT(reporter, 1 == SkCLZ(1 << 30));
REPORTER_ASSERT(reporter, 0 == SkCLZ(~0U));
SkRandom rand;
for (int i = 0; i < 1000; ++i) {
uint32_t mask = rand.nextU();