| Index: bench/PatchBench.cpp
|
| diff --git a/bench/PatchBench.cpp b/bench/PatchBench.cpp
|
| index 8ce80c4bc5d2a039688e91e8fb72620cf5aa9372..0fda68bec4a78a4e429fb50d203d0632fb950b2b 100644
|
| --- a/bench/PatchBench.cpp
|
| +++ b/bench/PatchBench.cpp
|
| @@ -5,16 +5,11 @@
|
| * found in the LICENSE file.
|
| */
|
| #include "Benchmark.h"
|
| -#include "SkBitmap.h"
|
| #include "SkCanvas.h"
|
| -#include "SkColorPriv.h"
|
| #include "SkGradientShader.h"
|
| #include "SkPaint.h"
|
| #include "SkPatchUtils.h"
|
| -#include "SkRandom.h"
|
| -#include "SkShader.h"
|
| #include "SkString.h"
|
| -#include "SkTArray.h"
|
|
|
| class PatchBench : public Benchmark {
|
|
|
| @@ -92,7 +87,7 @@ protected:
|
| vertexMode.set("texs");
|
| break;
|
| case kBoth_VertexMode:
|
| - vertexMode.set("colors&texs");
|
| + vertexMode.set("colors_texs");
|
| break;
|
| default:
|
| break;
|
| @@ -104,12 +99,7 @@ protected:
|
| return fName.c_str();
|
| }
|
|
|
| - virtual void preDraw() {
|
| -
|
| - }
|
| -
|
| - virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
|
| -
|
| + virtual void onPreDraw() {
|
| this->setCubics();
|
| this->setColors();
|
| this->setTexCoords();
|
| @@ -123,7 +113,9 @@ protected:
|
| fPaint.setShader(NULL);
|
| break;
|
| }
|
| + }
|
|
|
| + virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
|
| canvas->scale(fScale.x(), fScale.y());
|
| for (int i = 0; i < loops; i++) {
|
| switch (fVertexMode) {
|
|
|