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

Side by Side Diff: src/gpu/GrContext.cpp

Issue 772953002: check matrix does not have rotation or perspective transformation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 #include "GrContext.h" 9 #include "GrContext.h"
10 10
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 643
644 #if defined(SHADER_AA_FILL_RECT) || !defined(IGNORE_ROT_AA_RECT_OPT) 644 #if defined(SHADER_AA_FILL_RECT) || !defined(IGNORE_ROT_AA_RECT_OPT)
645 } else { 645 } else {
646 if (!combinedMatrix.preservesRightAngles()) { 646 if (!combinedMatrix.preservesRightAngles()) {
647 return false; 647 return false;
648 } 648 }
649 } 649 }
650 #endif 650 #endif
651 651
652 combinedMatrix.mapRect(devBoundRect, rect); 652 combinedMatrix.mapRect(devBoundRect, rect);
653 if (!combinedMatrix.rectStaysRect()) {
654 return true;
655 }
656
653 if (strokeWidth < 0) { 657 if (strokeWidth < 0) {
654 return !is_irect(*devBoundRect); 658 return !is_irect(*devBoundRect);
655 } 659 }
656 660
657 return true; 661 return true;
658 } 662 }
659 663
660 static inline bool rect_contains_inclusive(const SkRect& rect, const SkPoint& po int) { 664 static inline bool rect_contains_inclusive(const SkRect& rect, const SkPoint& po int) {
661 return point.fX >= rect.fLeft && point.fX <= rect.fRight && 665 return point.fX >= rect.fLeft && point.fX <= rect.fRight &&
662 point.fY >= rect.fTop && point.fY <= rect.fBottom; 666 point.fY >= rect.fTop && point.fY <= rect.fBottom;
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 fResourceCache2->printStats(); 1713 fResourceCache2->printStats();
1710 } 1714 }
1711 #endif 1715 #endif
1712 1716
1713 #if GR_GPU_STATS 1717 #if GR_GPU_STATS
1714 const GrContext::GPUStats* GrContext::gpuStats() const { 1718 const GrContext::GPUStats* GrContext::gpuStats() const {
1715 return fGpu->gpuStats(); 1719 return fGpu->gpuStats();
1716 } 1720 }
1717 #endif 1721 #endif
1718 1722
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