| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 #include "Benchmark.h" | 7 #include "Benchmark.h" |
| 8 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
| 9 #include "SkGradientShader.h" | 9 #include "SkGradientShader.h" |
| 10 #include "SkPaint.h" | 10 #include "SkPaint.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 vertexMode.set("texs"); | 94 vertexMode.set("texs"); |
| 95 break; | 95 break; |
| 96 case kBoth_VertexMode: | 96 case kBoth_VertexMode: |
| 97 vertexMode.set("colors_texs"); | 97 vertexMode.set("colors_texs"); |
| 98 break; | 98 break; |
| 99 default: | 99 default: |
| 100 break; | 100 break; |
| 101 } | 101 } |
| 102 SkString type; | 102 SkString type; |
| 103 this->appendName(&type); | 103 this->appendName(&type); |
| 104 fName.printf("patch_%s_%s_[%f,%f]", type.c_str(), vertexMode.c_str(), | 104 fName.printf("patch_%s_%s_%fx%f", type.c_str(), vertexMode.c_str(), |
| 105 fScale.x(), fScale.y()); | 105 fScale.x(), fScale.y()); |
| 106 return fName.c_str(); | 106 return fName.c_str(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void onDelayedSetup() override { | 109 void onDelayedSetup() override { |
| 110 this->setCubics(); | 110 this->setCubics(); |
| 111 this->setColors(); | 111 this->setColors(); |
| 112 this->setTexCoords(); | 112 this->setTexCoords(); |
| 113 this->setupPaint(&fPaint); | 113 this->setupPaint(&fPaint); |
| 114 switch (fVertexMode) { | 114 switch (fVertexMode) { |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 DEF_BENCH( return new LoopPatchBench(SkVector::Make(1.0f, 1.0f), | 315 DEF_BENCH( return new LoopPatchBench(SkVector::Make(1.0f, 1.0f), |
| 316 PatchBench::kBoth_VertexMode); ) | 316 PatchBench::kBoth_VertexMode); ) |
| 317 DEF_BENCH( return new LoopPatchBench(SkVector::Make(3.0f, 3.0f), | 317 DEF_BENCH( return new LoopPatchBench(SkVector::Make(3.0f, 3.0f), |
| 318 PatchBench::kNone_VertexMode); ) | 318 PatchBench::kNone_VertexMode); ) |
| 319 DEF_BENCH( return new LoopPatchBench(SkVector::Make(3.0f, 3.0f), | 319 DEF_BENCH( return new LoopPatchBench(SkVector::Make(3.0f, 3.0f), |
| 320 PatchBench::kColors_VertexMode); ) | 320 PatchBench::kColors_VertexMode); ) |
| 321 DEF_BENCH( return new LoopPatchBench(SkVector::Make(3.0f, 3.0f), | 321 DEF_BENCH( return new LoopPatchBench(SkVector::Make(3.0f, 3.0f), |
| 322 PatchBench::kTexCoords_VertexMode); ) | 322 PatchBench::kTexCoords_VertexMode); ) |
| 323 DEF_BENCH( return new LoopPatchBench(SkVector::Make(3.0f, 3.0f), | 323 DEF_BENCH( return new LoopPatchBench(SkVector::Make(3.0f, 3.0f), |
| 324 PatchBench::kBoth_VertexMode); ) | 324 PatchBench::kBoth_VertexMode); ) |
| OLD | NEW |