Avoid warning in nanobench related to loop count with nvprmsaa4

The tests path_hairline_{small,big}_AA_conic were calling the test
function with NVPR. This caused a warning in nanobench.

The here removed hunk comes from commit referring to skia:2042 ("Enable
NVPR by default"). This is a workaround for a bug. The bug is fixed by
the commit referring to skia:2078 ("Logan bot fails NVPR assertion in
bench").

The proper fix is indeed make sure that path renderer chain ends up
trying software path renderer, if the path contains conics and is a
hairline.

The removed hunk refers also to skia:2033 ("Figure out what is happening
with conic path segments in NVPR"). The above solution is correct also in case
NVPR would support conics, as NVPR would not still support hairlines.

BUG=skia:2078

Review URL: https://codereview.chromium.org/685213005
This commit is contained in:
kkinnunen 2014-11-11 06:57:07 -08:00 committed by Commit bot
parent 5da116f920
commit 839425177c

View File

@ -12,11 +12,6 @@
#include "SkShader.h"
#include "SkString.h"
#if SK_SUPPORT_GPU
#include "GrDrawTargetCaps.h"
#include "GrTest.h"
#endif
enum Flags {
kBig_Flag = 1 << 0,
kAA_Flag = 1 << 1
@ -177,21 +172,6 @@ public:
}
}
virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
#if SK_SUPPORT_GPU
GrContext* context = canvas->getGrContext();
// This is a workaround for skbug.com/2078. See also skbug.com/2033.
if (context) {
GrTestTarget tt;
context->getTestTarget(&tt);
if (tt.target()->caps()->pathRenderingSupport()) {
return;
}
}
#endif
INHERITED::onDraw(loops, canvas);
}
private:
typedef HairlinePathBench INHERITED;
};