aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-27 17:36:38 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-27 17:36:38 +0000
commitfbd3047d2317acc752f4eb02ffceec7c87383ed8 (patch)
treeedb1cc4bbcf8a7262fcba011922f38982d8e1d79 /bench
parent065538997834b0a4f3b729560103d1ffa9c9d9da (diff)
Workaround for assertion in NVPR config in bench.
BUG=skia:2078 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/131503007 git-svn-id: http://skia.googlecode.com/svn/trunk@13196 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench')
-rw-r--r--bench/HairlinePathBench.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/bench/HairlinePathBench.cpp b/bench/HairlinePathBench.cpp
index 87557e8467..59eb1e833a 100644
--- a/bench/HairlinePathBench.cpp
+++ b/bench/HairlinePathBench.cpp
@@ -4,6 +4,9 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+
+#include "GrTest.h"
+#include "GrDrawTargetCaps.h"
#include "SkBenchmark.h"
#include "SkCanvas.h"
#include "SkPaint.h"
@@ -170,6 +173,20 @@ public:
weight);
}
}
+
+ virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
+ GrContext* context = canvas->getGrContext();
+ // This is a workaround for skbug.com/2078. See also skbug.com/2033.
+ if (NULL != context) {
+ GrTestTarget tt;
+ context->getTestTarget(&tt);
+ if (tt.target()->caps()->pathRenderingSupport()) {
+ return;
+ }
+ }
+ INHERITED::onDraw(loops, canvas);
+ }
+
private:
typedef HairlinePathBench INHERITED;
};