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

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

Issue 1033453003: Remove SkClipStack's manual rounding of BW clip rects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Revert unneeded changes Created 5 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 | « 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 * 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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkClipStack.h" 9 #include "SkClipStack.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 fFiniteBoundType = kInsideOut_BoundsType; 412 fFiniteBoundType = kInsideOut_BoundsType;
413 } else { 413 } else {
414 fFiniteBoundType = kNormal_BoundsType; 414 fFiniteBoundType = kNormal_BoundsType;
415 } 415 }
416 break; 416 break;
417 case kEmpty_Type: 417 case kEmpty_Type:
418 SkDEBUGFAIL("We shouldn't get here with an empty element."); 418 SkDEBUGFAIL("We shouldn't get here with an empty element.");
419 break; 419 break;
420 } 420 }
421 421
422 if (!fDoAA) {
423 fFiniteBound.set(SkScalarFloorToScalar(fFiniteBound.fLeft+0.45f),
424 SkScalarRoundToScalar(fFiniteBound.fTop),
425 SkScalarRoundToScalar(fFiniteBound.fRight),
426 SkScalarRoundToScalar(fFiniteBound.fBottom));
427 }
428
429 // Now determine the previous Element's bound information taking into 422 // Now determine the previous Element's bound information taking into
430 // account that there may be no previous clip 423 // account that there may be no previous clip
431 SkRect prevFinite; 424 SkRect prevFinite;
432 SkClipStack::BoundsType prevType; 425 SkClipStack::BoundsType prevType;
433 426
434 if (NULL == prior) { 427 if (NULL == prior) {
435 // no prior clip means the entire plane is writable 428 // no prior clip means the entire plane is writable
436 prevFinite.setEmpty(); // there are no pixels that cannot be drawn to 429 prevFinite.setEmpty(); // there are no pixels that cannot be drawn to
437 prevType = kInsideOut_BoundsType; 430 prevType = kInsideOut_BoundsType;
438 } else { 431 } else {
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 899
907 void SkClipStack::dump() const { 900 void SkClipStack::dump() const {
908 B2TIter iter(*this); 901 B2TIter iter(*this);
909 const Element* e; 902 const Element* e;
910 while ((e = iter.next())) { 903 while ((e = iter.next())) {
911 e->dump(); 904 e->dump();
912 SkDebugf("\n"); 905 SkDebugf("\n");
913 } 906 }
914 } 907 }
915 #endif 908 #endif
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