Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: tools/debugger/SkDebugCanvas.cpp

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/WritePixelsTest.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « tests/WritePixelsTest.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698