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

Side by Side Diff: src/core/SkScan_AntiPath.cpp

Issue 657793003: update dox for bounds in supersampler (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « no previous file | no next file » | 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 "SkScanPriv.h" 10 #include "SkScanPriv.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 SkIRect fSectBounds; 77 SkIRect fSectBounds;
78 }; 78 };
79 79
80 BaseSuperBlitter::BaseSuperBlitter(SkBlitter* realBlit, const SkIRect& ir, const SkRegion& clip, 80 BaseSuperBlitter::BaseSuperBlitter(SkBlitter* realBlit, const SkIRect& ir, const SkRegion& clip,
81 bool isInverse) { 81 bool isInverse) {
82 fRealBlitter = realBlit; 82 fRealBlitter = realBlit;
83 83
84 SkIRect sectBounds; 84 SkIRect sectBounds;
85 if (isInverse) { 85 if (isInverse) {
86 // We use the clip bounds instead of the ir, since we may be asked to
87 //draw outside of the rect when we're a inverse filltype
86 sectBounds = clip.getBounds(); 88 sectBounds = clip.getBounds();
87 } else { 89 } else {
88 if (!sectBounds.intersect(ir, clip.getBounds())) { 90 if (!sectBounds.intersect(ir, clip.getBounds())) {
89 sectBounds.setEmpty(); 91 sectBounds.setEmpty();
90 } 92 }
91 } 93 }
92 94
93 /*
94 * We use the clip bounds instead of the ir, since we may be asked to
95 * draw outside of the rect if we're a inverse filltype
96 */
97 const int left = sectBounds.left(); 95 const int left = sectBounds.left();
98 const int right = sectBounds.right(); 96 const int right = sectBounds.right();
99 97
100 fLeft = left; 98 fLeft = left;
101 fSuperLeft = left << SHIFT; 99 fSuperLeft = left << SHIFT;
102 fWidth = right - left; 100 fWidth = right - left;
103 fTop = sectBounds.top(); 101 fTop = sectBounds.top();
104 fCurrIY = fTop - 1; 102 fCurrIY = fTop - 1;
105 fCurrY = (fTop << SHIFT) - 1; 103 fCurrY = (fTop << SHIFT) - 1;
106 104
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 AntiFillPath(path, clip.bwRgn(), blitter); 763 AntiFillPath(path, clip.bwRgn(), blitter);
766 } else { 764 } else {
767 SkRegion tmp; 765 SkRegion tmp;
768 SkAAClipBlitter aaBlitter; 766 SkAAClipBlitter aaBlitter;
769 767
770 tmp.setRect(clip.getBounds()); 768 tmp.setRect(clip.getBounds());
771 aaBlitter.init(blitter, &clip.aaRgn()); 769 aaBlitter.init(blitter, &clip.aaRgn());
772 SkScan::AntiFillPath(path, tmp, &aaBlitter, true); 770 SkScan::AntiFillPath(path, tmp, &aaBlitter, true);
773 } 771 }
774 } 772 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698