OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkCanvasPriv.h" | 8 #include "SkCanvasPriv.h" |
9 #include "SkClipStack.h" | 9 #include "SkClipStack.h" |
10 #include "SkDebugCanvas.h" | 10 #include "SkDebugCanvas.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 : INHERITED(width, height) | 35 : INHERITED(width, height) |
36 , fOverdrawXfermode(overdrawViz ? SkOverdrawMode::Make() : nullptr) | 36 , fOverdrawXfermode(overdrawViz ? SkOverdrawMode::Make() : nullptr) |
37 , fOverrideFilterQuality(overrideFilterQuality) | 37 , fOverrideFilterQuality(overrideFilterQuality) |
38 , fFilterQuality(quality) {} | 38 , fFilterQuality(quality) {} |
39 | 39 |
40 protected: | 40 protected: |
41 bool onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type) const override { | 41 bool onFilter(SkTCopyOnFirstWrite<SkPaint>* paint, Type) const override { |
42 if (*paint) { | 42 if (*paint) { |
43 if (nullptr != fOverdrawXfermode.get()) { | 43 if (nullptr != fOverdrawXfermode.get()) { |
44 paint->writable()->setAntiAlias(false); | 44 paint->writable()->setAntiAlias(false); |
45 paint->writable()->setXfermode(fOverdrawXfermode); | 45 // TODO: replace overdraw mode with something else |
| 46 // paint->writable()->setXfermode(fOverdrawXfermode); |
46 } | 47 } |
47 | 48 |
48 if (fOverrideFilterQuality) { | 49 if (fOverrideFilterQuality) { |
49 paint->writable()->setFilterQuality(fFilterQuality); | 50 paint->writable()->setFilterQuality(fFilterQuality); |
50 } | 51 } |
51 } | 52 } |
52 return true; | 53 return true; |
53 } | 54 } |
54 | 55 |
55 void onDrawPicture(const SkPicture* picture, | 56 void onDrawPicture(const SkPicture* picture, |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 } | 848 } |
848 | 849 |
849 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { | 850 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { |
850 if (fCalledAddStackData) { | 851 if (fCalledAddStackData) { |
851 fClipStackData.appendf("<br>"); | 852 fClipStackData.appendf("<br>"); |
852 addPathData(devPath, "pathOut"); | 853 addPathData(devPath, "pathOut"); |
853 return true; | 854 return true; |
854 } | 855 } |
855 return false; | 856 return false; |
856 } | 857 } |
OLD | NEW |