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

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

Issue 1505993007: Another undefined shift caught by -fsanitize=shift. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } else { 84 } else {
85 if (!sectBounds.intersect(ir, clip.getBounds())) { 85 if (!sectBounds.intersect(ir, clip.getBounds())) {
86 sectBounds.setEmpty(); 86 sectBounds.setEmpty();
87 } 87 }
88 } 88 }
89 89
90 const int left = sectBounds.left(); 90 const int left = sectBounds.left();
91 const int right = sectBounds.right(); 91 const int right = sectBounds.right();
92 92
93 fLeft = left; 93 fLeft = left;
94 fSuperLeft = left << SHIFT; 94 fSuperLeft = SkLeftShift(left, SHIFT);
95 fWidth = right - left; 95 fWidth = right - left;
96 fTop = sectBounds.top(); 96 fTop = sectBounds.top();
97 fCurrIY = fTop - 1; 97 fCurrIY = fTop - 1;
98 fCurrY = (fTop << SHIFT) - 1; 98 fCurrY = SkLeftShift(fTop, SHIFT) - 1;
99 99
100 SkDEBUGCODE(fCurrX = -1;) 100 SkDEBUGCODE(fCurrX = -1;)
101 } 101 }
102 102
103 /// Run-length-encoded supersampling antialiased blitter. 103 /// Run-length-encoded supersampling antialiased blitter.
104 class SuperBlitter : public BaseSuperBlitter { 104 class SuperBlitter : public BaseSuperBlitter {
105 public: 105 public:
106 SuperBlitter(SkBlitter* realBlitter, const SkIRect& ir, const SkRegion& clip , bool isInverse); 106 SuperBlitter(SkBlitter* realBlitter, const SkIRect& ir, const SkRegion& clip , bool isInverse);
107 107
108 virtual ~SuperBlitter() { 108 virtual ~SuperBlitter() {
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 AntiFillPath(path, clip.bwRgn(), blitter); 758 AntiFillPath(path, clip.bwRgn(), blitter);
759 } else { 759 } else {
760 SkRegion tmp; 760 SkRegion tmp;
761 SkAAClipBlitter aaBlitter; 761 SkAAClipBlitter aaBlitter;
762 762
763 tmp.setRect(clip.getBounds()); 763 tmp.setRect(clip.getBounds());
764 aaBlitter.init(blitter, &clip.aaRgn()); 764 aaBlitter.init(blitter, &clip.aaRgn());
765 SkScan::AntiFillPath(path, tmp, &aaBlitter, true); 765 SkScan::AntiFillPath(path, tmp, &aaBlitter, true);
766 } 766 }
767 } 767 }
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