| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 //#include "SkParsePath.h" | 10 //#include "SkParsePath.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 4.0f/3.0f * -20, | 108 4.0f/3.0f * -20, |
| 109 4.0f/3.0f * -20, | 109 4.0f/3.0f * -20, |
| 110 4.0f/3.0f * (this->getISize().fWidth - 20), | 110 4.0f/3.0f * (this->getISize().fWidth - 20), |
| 111 4.0f/3.0f * (this->getISize().fHeight - 20)); | 111 4.0f/3.0f * (this->getISize().fHeight - 20)); |
| 112 | 112 |
| 113 bounds.inset(SkIntToScalar(100), SkIntToScalar(100)); | 113 bounds.inset(SkIntToScalar(100), SkIntToScalar(100)); |
| 114 SkPaint boundPaint; | 114 SkPaint boundPaint; |
| 115 boundPaint.setColor(SK_ColorRED); | 115 boundPaint.setColor(SK_ColorRED); |
| 116 boundPaint.setStyle(SkPaint::kStroke_Style); | 116 boundPaint.setStyle(SkPaint::kStroke_Style); |
| 117 canvas->drawRect(bounds, boundPaint); | 117 canvas->drawRect(bounds, boundPaint); |
| 118 canvas->saveLayer(&bounds, NULL); | 118 canvas->saveLayer(&bounds, nullptr); |
| 119 } | 119 } |
| 120 | 120 |
| 121 for (int invBits = 0; invBits < 4; ++invBits) { | 121 for (int invBits = 0; invBits < 4; ++invBits) { |
| 122 canvas->save(); | 122 canvas->save(); |
| 123 for (size_t op = 0; op < SK_ARRAY_COUNT(gOps); ++op) { | 123 for (size_t op = 0; op < SK_ARRAY_COUNT(gOps); ++op) { |
| 124 this->drawHairlines(canvas, path, clipA, clipB); | 124 this->drawHairlines(canvas, path, clipA, clipB); |
| 125 | 125 |
| 126 bool doInvA = SkToBool(invBits & 1); | 126 bool doInvA = SkToBool(invBits & 1); |
| 127 bool doInvB = SkToBool(invBits & 2); | 127 bool doInvB = SkToBool(invBits & 2); |
| 128 canvas->save(); | 128 canvas->save(); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 DEF_GM(return new ComplexClipGM(false, false, false);) | 203 DEF_GM(return new ComplexClipGM(false, false, false);) |
| 204 DEF_GM(return new ComplexClipGM(false, false, true);) | 204 DEF_GM(return new ComplexClipGM(false, false, true);) |
| 205 DEF_GM(return new ComplexClipGM(false, true, false);) | 205 DEF_GM(return new ComplexClipGM(false, true, false);) |
| 206 DEF_GM(return new ComplexClipGM(false, true, true);) | 206 DEF_GM(return new ComplexClipGM(false, true, true);) |
| 207 DEF_GM(return new ComplexClipGM(true, false, false);) | 207 DEF_GM(return new ComplexClipGM(true, false, false);) |
| 208 DEF_GM(return new ComplexClipGM(true, false, true);) | 208 DEF_GM(return new ComplexClipGM(true, false, true);) |
| 209 DEF_GM(return new ComplexClipGM(true, true, false);) | 209 DEF_GM(return new ComplexClipGM(true, true, false);) |
| 210 DEF_GM(return new ComplexClipGM(true, true, true);) | 210 DEF_GM(return new ComplexClipGM(true, true, true);) |
| 211 } | 211 } |
| OLD | NEW |