aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleComplexClip.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-02 15:58:18 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-02 15:58:18 +0000
commit55b6b58d8f6e7529c9b9cea606a6e3637c8e2e39 (patch)
tree8c53f352afb649fb8472964b4887636add54e069 /samplecode/SampleComplexClip.cpp
parent7239aab311e180960e48de8586b03e261741cc14 (diff)
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
Diffstat (limited to 'samplecode/SampleComplexClip.cpp')
-rw-r--r--samplecode/SampleComplexClip.cpp12
1 files changed, 6 insertions, 6 deletions
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)) {