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

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

Issue 14314004: Axis aligned shader-based rect drawing (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Addressed code review issues (renaming & API change) Created 7 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | 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 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 strokeSize.set(width, width); 800 strokeSize.set(width, width);
801 combinedMatrix.mapVectors(&strokeSize, 1); 801 combinedMatrix.mapVectors(&strokeSize, 1);
802 strokeSize.setAbs(strokeSize); 802 strokeSize.setAbs(strokeSize);
803 } else { 803 } else {
804 strokeSize.set(SK_Scalar1, SK_Scalar1); 804 strokeSize.set(SK_Scalar1, SK_Scalar1);
805 } 805 }
806 fAARectRenderer->strokeAARect(this->getGpu(), target, devRect, 806 fAARectRenderer->strokeAARect(this->getGpu(), target, devRect,
807 strokeSize, useVertexCoverage); 807 strokeSize, useVertexCoverage);
808 } else { 808 } else {
809 // filled AA rect 809 // filled AA rect
810 #ifdef SHADER_AA_FILL_RECT
811 fAARectRenderer->shaderFillAARect(this->getGpu(), target,
812 rect, combinedMatrix, devRect,
813 useVertexCoverage);
814 #else
815 fAARectRenderer->fillAARect(this->getGpu(), target, 810 fAARectRenderer->fillAARect(this->getGpu(), target,
816 devRect, useVertexCoverage); 811 rect, combinedMatrix, devRect,
817 #endif 812 useVertexCoverage);
818 } 813 }
819 return; 814 return;
820 } 815 }
821 816
822 if (width >= 0) { 817 if (width >= 0) {
823 // TODO: consider making static vertex buffers for these cases. 818 // TODO: consider making static vertex buffers for these cases.
824 // Hairline could be done by just adding closing vertex to 819 // Hairline could be done by just adding closing vertex to
825 // unitSquareVertexBuffer() 820 // unitSquareVertexBuffer()
826 821
827 static const int worstCaseVertCount = 10; 822 static const int worstCaseVertCount = 10;
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 return srcTexture; 1802 return srcTexture;
1808 } 1803 }
1809 } 1804 }
1810 1805
1811 /////////////////////////////////////////////////////////////////////////////// 1806 ///////////////////////////////////////////////////////////////////////////////
1812 #if GR_CACHE_STATS 1807 #if GR_CACHE_STATS
1813 void GrContext::printCacheStats() const { 1808 void GrContext::printCacheStats() const {
1814 fTextureCache->printStats(); 1809 fTextureCache->printStats();
1815 } 1810 }
1816 #endif 1811 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698