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 | 9 |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 | 774 |
775 void GrContext::drawRect(const GrPaint& paint, | 775 void GrContext::drawRect(const GrPaint& paint, |
776 const GrRect& rect, | 776 const GrRect& rect, |
777 SkScalar width, | 777 SkScalar width, |
778 const SkMatrix* matrix) { | 778 const SkMatrix* matrix) { |
779 SK_TRACE_EVENT0("GrContext::drawRect"); | 779 SK_TRACE_EVENT0("GrContext::drawRect"); |
780 | 780 |
781 GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW); | 781 GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW); |
782 GrDrawState::AutoStageDisable atr(fDrawState); | 782 GrDrawState::AutoStageDisable atr(fDrawState); |
783 | 783 |
784 GrRect devRect = rect; | 784 GrRect devRect; |
785 SkMatrix combinedMatrix; | 785 SkMatrix combinedMatrix; |
786 bool useVertexCoverage; | 786 bool useVertexCoverage; |
787 bool needAA = paint.isAntiAlias() && | 787 bool needAA = paint.isAntiAlias() && |
788 !this->getRenderTarget()->isMultisampled(); | 788 !this->getRenderTarget()->isMultisampled(); |
789 bool doAA = needAA && apply_aa_to_rect(target, rect, width, matrix, | 789 bool doAA = needAA && apply_aa_to_rect(target, rect, width, matrix, |
790 &combinedMatrix, &devRect, | 790 &combinedMatrix, &devRect, |
791 &useVertexCoverage); | 791 &useVertexCoverage); |
792 if (doAA) { | 792 if (doAA) { |
793 GrDrawState::AutoDeviceCoordDraw adcd(target->drawState()); | 793 GrDrawState::AutoDeviceCoordDraw adcd(target->drawState()); |
794 if (!adcd.succeeded()) { | 794 if (!adcd.succeeded()) { |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 return srcTexture; | 1804 return srcTexture; |
1805 } | 1805 } |
1806 } | 1806 } |
1807 | 1807 |
1808 /////////////////////////////////////////////////////////////////////////////// | 1808 /////////////////////////////////////////////////////////////////////////////// |
1809 #if GR_CACHE_STATS | 1809 #if GR_CACHE_STATS |
1810 void GrContext::printCacheStats() const { | 1810 void GrContext::printCacheStats() const { |
1811 fTextureCache->printStats(); | 1811 fTextureCache->printStats(); |
1812 } | 1812 } |
1813 #endif | 1813 #endif |
OLD | NEW |