| 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 | 8 |
| 9 | 9 |
| 10 #ifndef GrPaint_DEFINED | 10 #ifndef GrPaint_DEFINED |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 * pixel is then D' = (1-C)*D + C*(Bd*D + Bs*S). | 37 * pixel is then D' = (1-C)*D + C*(Bd*D + Bs*S). |
| 38 * | 38 * |
| 39 * Note that the coverage is applied after the blend. This is why they are compu
ted as distinct | 39 * Note that the coverage is applied after the blend. This is why they are compu
ted as distinct |
| 40 * values. | 40 * values. |
| 41 * | 41 * |
| 42 * TODO: Encapsulate setXfermodeColorFilter in a GrEffect and remove from GrPain
t. | 42 * TODO: Encapsulate setXfermodeColorFilter in a GrEffect and remove from GrPain
t. |
| 43 */ | 43 */ |
| 44 class GrPaint { | 44 class GrPaint { |
| 45 public: | 45 public: |
| 46 enum { | 46 enum { |
| 47 kMaxColorStages = 2, | 47 kMaxColorStages = 3, |
| 48 kMaxCoverageStages = 1, | 48 kMaxCoverageStages = 1, |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 GrPaint() { this->reset(); } | 51 GrPaint() { this->reset(); } |
| 52 | 52 |
| 53 GrPaint(const GrPaint& paint) { *this = paint; } | 53 GrPaint(const GrPaint& paint) { *this = paint; } |
| 54 | 54 |
| 55 ~GrPaint() {} | 55 ~GrPaint() {} |
| 56 | 56 |
| 57 /** | 57 /** |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 for (int i = 0; i < kMaxColorStages; ++i) { | 298 for (int i = 0; i < kMaxColorStages; ++i) { |
| 299 fColorStages[i].reset(); | 299 fColorStages[i].reset(); |
| 300 } | 300 } |
| 301 for (int i = 0; i < kMaxCoverageStages; ++i) { | 301 for (int i = 0; i < kMaxCoverageStages; ++i) { |
| 302 fCoverageStages[i].reset(); | 302 fCoverageStages[i].reset(); |
| 303 } | 303 } |
| 304 } | 304 } |
| 305 }; | 305 }; |
| 306 | 306 |
| 307 #endif | 307 #endif |
| OLD | NEW |