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

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

Issue 1893433002: In SkDraw::drawRect, use SkPath for huge rects. Base URL: https://skia.googlesource.com/skia@fixed-assert
Patch Set: Created 4 years, 8 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 | « src/core/SkAAClip.h ('k') | src/core/SkDraw.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 2011 Google Inc. 2 * Copyright 2011 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 "SkAAClip.h" 8 #include "SkAAClip.h"
9 #include "SkAtomics.h" 9 #include "SkAtomics.h"
10 #include "SkBlitter.h" 10 #include "SkBlitter.h"
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 return true; 933 return true;
934 } 934 }
935 rectWidth -= count; 935 rectWidth -= count;
936 row += 2; 936 row += 2;
937 count = row[0]; 937 count = row[0];
938 } 938 }
939 return false; 939 return false;
940 #endif 940 #endif
941 } 941 }
942 942
943 bool SkAAClip::quickContains(const SkRect& r) const {
944 if (this->isEmpty()) {
945 return false;
946 }
947 if (!fBounds.contains(r)) {
948 return false;
949 }
950 // If r is contained in fBounds, it has to be in range of int32.
951 return this->quickContains(r.roundOut());
952 }
953
943 /////////////////////////////////////////////////////////////////////////////// 954 ///////////////////////////////////////////////////////////////////////////////
944 955
945 class SkAAClip::Builder { 956 class SkAAClip::Builder {
946 SkIRect fBounds; 957 SkIRect fBounds;
947 struct Row { 958 struct Row {
948 int fY; 959 int fY;
949 int fWidth; 960 int fWidth;
950 SkTDArray<uint8_t>* fData; 961 SkTDArray<uint8_t>* fData;
951 }; 962 };
952 SkTDArray<Row> fRows; 963 SkTDArray<Row> fRows;
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 rowMask.fBounds.fBottom = y + 1; 2221 rowMask.fBounds.fBottom = y + 1;
2211 fBlitter->blitMask(rowMask, rowMask.fBounds); 2222 fBlitter->blitMask(rowMask, rowMask.fBounds);
2212 src = (const void*)((const char*)src + srcRB); 2223 src = (const void*)((const char*)src + srcRB);
2213 } while (++y < localStopY); 2224 } while (++y < localStopY);
2214 } while (y < stopY); 2225 } while (y < stopY);
2215 } 2226 }
2216 2227
2217 const SkPixmap* SkAAClipBlitter::justAnOpaqueColor(uint32_t* value) { 2228 const SkPixmap* SkAAClipBlitter::justAnOpaqueColor(uint32_t* value) {
2218 return nullptr; 2229 return nullptr;
2219 } 2230 }
OLDNEW
« no previous file with comments | « src/core/SkAAClip.h ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698