fix bug and add test for aaclip when blitV is called

git-svn-id: http://skia.googlecode.com/svn/trunk@3281 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2012-02-29 13:59:15 +00:00
parent aefdd06271
commit 9b0da23f0a
2 changed files with 16 additions and 0 deletions

View File

@ -1187,6 +1187,7 @@ public:
virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE {
this->recordMinY(y);
fBuilder->addColumn(x, y, alpha, height);
fLastY = y + height - 1;
}
virtual void blitRect(int x, int y, int width, int height) SK_OVERRIDE {

View File

@ -313,12 +313,27 @@ static void test_path_with_hole(skiatest::Reporter* reporter) {
}
}
static void test_regressions(skiatest::Reporter* reporter) {
// these should not assert in the debug build
// bug was introduced in rev. 3209
{
SkAAClip clip;
SkRect r;
r.fLeft = SkFloatToScalar(129.892181);
r.fTop = SkFloatToScalar(10.3999996);
r.fRight = SkFloatToScalar(130.892181);
r.fBottom = SkFloatToScalar(20.3999996);
clip.setRect(r, true);
}
}
static void TestAAClip(skiatest::Reporter* reporter) {
test_empty(reporter);
test_path_bounds(reporter);
test_irect(reporter);
test_rgn(reporter);
test_path_with_hole(reporter);
test_regressions(reporter);
}
#include "TestClassDef.h"