diff options
author | 2014-12-02 13:51:29 -0800 | |
---|---|---|
committer | 2014-12-02 13:51:30 -0800 | |
commit | e638d1c29b2895a4dcf41b5bc8868278192bf819 (patch) | |
tree | e0ecb5f001308d7a4001960a806f8b68b24d256b /src/gpu/GrContext.cpp | |
parent | 701dd4fbd7942f98e413807491f62898941c142c (diff) |
check matrix does not have rotation or perspective transformation
When checking whether we need apply AA to a rect for non-msaa target,
simply checking that the mapped rect is integer is not enough.
We need to check whether the transformation matrix has transformations
other than simple translation.
Original-Author: Henry Song <henrysong@samsung.com>
Review URL: https://codereview.chromium.org/772953002
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rwxr-xr-x | src/gpu/GrContext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 607d3c3cc7..852afe01ba 100755 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -650,6 +650,10 @@ static bool apply_aa_to_rect(GrDrawTarget* target, #endif combinedMatrix.mapRect(devBoundRect, rect); + if (!combinedMatrix.rectStaysRect()) { + return true; + } + if (strokeWidth < 0) { return !is_irect(*devBoundRect); } |