OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 return gTable[SK_ARRAY_COUNT(gTable)-1]; | 119 return gTable[SK_ARRAY_COUNT(gTable)-1]; |
120 } | 120 } |
121 | 121 |
122 virtual Factory getFactory() const SK_OVERRIDE { return NULL; } | 122 virtual Factory getFactory() const SK_OVERRIDE { return NULL; } |
123 #ifndef SK_IGNORE_TO_STRING | 123 #ifndef SK_IGNORE_TO_STRING |
124 virtual void toString(SkString* str) const { str->set("OverdrawXfermode"); } | 124 virtual void toString(SkString* str) const { str->set("OverdrawXfermode"); } |
125 #endif | 125 #endif |
126 }; | 126 }; |
127 | 127 |
128 // The OverdrawFilter modifies every paint to use an SkProcXfermode which | |
129 // in turn invokes OverdrawXferModeProc | |
130 class SkOverdrawFilter : public SkDrawFilter { | 128 class SkOverdrawFilter : public SkDrawFilter { |
131 public: | 129 public: |
132 SkOverdrawFilter() { | 130 SkOverdrawFilter() { |
133 fXferMode = SkNEW(OverdrawXfermode); | 131 fXferMode = SkNEW(OverdrawXfermode); |
134 } | 132 } |
135 | 133 |
136 virtual ~SkOverdrawFilter() { | 134 virtual ~SkOverdrawFilter() { |
137 delete fXferMode; | 135 delete fXferMode; |
138 } | 136 } |
139 | 137 |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 | 581 |
584 void SkDebugCanvas::didSetMatrix(const SkMatrix& matrix) { | 582 void SkDebugCanvas::didSetMatrix(const SkMatrix& matrix) { |
585 this->addDrawCommand(new SkSetMatrixCommand(matrix)); | 583 this->addDrawCommand(new SkSetMatrixCommand(matrix)); |
586 this->INHERITED::didSetMatrix(matrix); | 584 this->INHERITED::didSetMatrix(matrix); |
587 } | 585 } |
588 | 586 |
589 void SkDebugCanvas::toggleCommand(int index, bool toggle) { | 587 void SkDebugCanvas::toggleCommand(int index, bool toggle) { |
590 SkASSERT(index < fCommandVector.count()); | 588 SkASSERT(index < fCommandVector.count()); |
591 fCommandVector[index]->setVisible(toggle); | 589 fCommandVector[index]->setVisible(toggle); |
592 } | 590 } |
OLD | NEW |