From 55b6b58d8f6e7529c9b9cea606a6e3637c8e2e39 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Wed, 2 Mar 2011 15:58:18 +0000 Subject: Fix inverse scanconversion -- be sure to keep our calls to SkBlitter in scanline order (top to bottom), since the region blitter explicitly requires this. git-svn-id: http://skia.googlecode.com/svn/trunk@876 2bbb7eff-a529-9590-31e7-b0007b416f81 --- samplecode/SampleComplexClip.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'samplecode/SampleComplexClip.cpp') diff --git a/samplecode/SampleComplexClip.cpp b/samplecode/SampleComplexClip.cpp index c01a9a30e7..8aee1bfb6a 100644 --- a/samplecode/SampleComplexClip.cpp +++ b/samplecode/SampleComplexClip.cpp @@ -25,14 +25,14 @@ static const struct { { SkPaint::kStrokeAndFill_Style, SkPaint::kMiter_Join, 10 }, }; -#define TEST_INVERSE 0 +#define TEST_INVERSE 1 class ComplexClipView : public SkView { SkScalar fWidth; public: ComplexClipView() { } - + protected: // overrides from SkEventSink virtual bool onQuery(SkEvent* evt) { @@ -42,11 +42,11 @@ protected: } return this->INHERITED::onQuery(evt); } - + void drawBG(SkCanvas* canvas) { canvas->drawColor(SkColorSetRGB(0xA0,0xDD,0xA0)); } - + virtual void onDraw(SkCanvas* canvas) { SkPath path; path.moveTo(SkIntToScalar(0), SkIntToScalar(50)); @@ -116,8 +116,8 @@ protected: canvas->scale(3 * SK_Scalar1 / 4, 3 * SK_Scalar1 / 4); canvas->save(); - int invALimit = TEST_INVERSE ? 1 : 2; - for (int invA = 0; invALimit < 2; ++invA) { + int invALimit = TEST_INVERSE ? 2 : 1; + for (int invA = 0; invA < invALimit; ++invA) { for (int op = 0; op < SK_ARRAY_COUNT(gOps); ++op) { int idx = invA * SK_ARRAY_COUNT(gOps) + op; if (!(idx % 3)) { -- cgit v1.2.3