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

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())
bsalomon 2014/12/02 21:36:56 style nit: we always use { }. Otherwise, lgtm
654 return true;
655
653 if (strokeWidth < 0) { 656 if (strokeWidth < 0) {
654 return !is_irect(*devBoundRect); 657 return !is_irect(*devBoundRect);
655 } 658 }
656 659
657 return true; 660 return true;
658 } 661 }
659 662
660 static inline bool rect_contains_inclusive(const SkRect& rect, const SkPoint& po int) { 663 static inline bool rect_contains_inclusive(const SkRect& rect, const SkPoint& po int) {
661 return point.fX >= rect.fLeft && point.fX <= rect.fRight && 664 return point.fX >= rect.fLeft && point.fX <= rect.fRight &&
662 point.fY >= rect.fTop && point.fY <= rect.fBottom; 665 point.fY >= rect.fTop && point.fY <= rect.fBottom;
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 fResourceCache2->printStats(); 1712 fResourceCache2->printStats();
1710 } 1713 }
1711 #endif 1714 #endif
1712 1715
1713 #if GR_GPU_STATS 1716 #if GR_GPU_STATS
1714 const GrContext::GPUStats* GrContext::gpuStats() const { 1717 const GrContext::GPUStats* GrContext::gpuStats() const {
1715 return fGpu->gpuStats(); 1718 return fGpu->gpuStats();
1716 } 1719 }
1717 #endif 1720 #endif
1718 1721
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