| OLD | NEW |
| 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 "GrAAHairLinePathRenderer.h" | 9 #include "GrAAHairLinePathRenderer.h" |
| 10 | 10 |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 &lineCnt, | 801 &lineCnt, |
| 802 &quadCnt, | 802 &quadCnt, |
| 803 &arg, | 803 &arg, |
| 804 &devBounds)) { | 804 &devBounds)) { |
| 805 return false; | 805 return false; |
| 806 } | 806 } |
| 807 | 807 |
| 808 GrDrawTarget::AutoStateRestore asr(target, GrDrawTarget::kPreserve_ASRInit); | 808 GrDrawTarget::AutoStateRestore asr(target, GrDrawTarget::kPreserve_ASRInit); |
| 809 GrDrawState* drawState = target->drawState(); | 809 GrDrawState* drawState = target->drawState(); |
| 810 | 810 |
| 811 GrDrawState::AutoDeviceCoordDraw adcd; | 811 GrDrawState::AutoViewMatrixRestore avmr; |
| 812 // createGeom transforms the geometry to device space when the matrix does n
ot have | 812 // createGeom transforms the geometry to device space when the matrix does n
ot have |
| 813 // perspective. | 813 // perspective. |
| 814 if (!drawState->getViewMatrix().hasPerspective()) { | 814 if (!drawState->getViewMatrix().hasPerspective()) { |
| 815 adcd.set(drawState); | 815 if (!avmr.setIdentity(drawState)) { |
| 816 if (!adcd.succeeded()) { | |
| 817 return false; | 816 return false; |
| 818 } | 817 } |
| 819 } | 818 } |
| 820 | 819 |
| 821 // TODO: See whether rendering lines as degenerate quads improves perf | 820 // TODO: See whether rendering lines as degenerate quads improves perf |
| 822 // when we have a mix | 821 // when we have a mix |
| 823 | 822 |
| 824 enum { | 823 enum { |
| 825 // the edge effects share this stage with glyph rendering | 824 // the edge effects share this stage with glyph rendering |
| 826 // (kGlyphMaskStage in GrTextContext) && SW path rendering | 825 // (kGlyphMaskStage in GrTextContext) && SW path rendering |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 0, // startI | 883 0, // startI |
| 885 kVertsPerQuad*n, // vCount | 884 kVertsPerQuad*n, // vCount |
| 886 kIdxsPerQuad*n, // iCount | 885 kIdxsPerQuad*n, // iCount |
| 887 &devBounds); | 886 &devBounds); |
| 888 quads += n; | 887 quads += n; |
| 889 } | 888 } |
| 890 target->resetIndexSource(); | 889 target->resetIndexSource(); |
| 891 | 890 |
| 892 return true; | 891 return true; |
| 893 } | 892 } |
| OLD | NEW |