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

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: Disabled shader-based rect drawing 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
« src/gpu/GrAARectRenderer.cpp ('K') | « src/gpu/GrAARectRenderer.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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 810 #ifdef SHADER_AA_FILL_RECT
811 fAARectRenderer->shaderFillAARect(this->getGpu(), target, 811 if (combinedMatrix.rectStaysRect()) {
bsalomon 2013/04/29 19:44:50 Seems cleaner to me make axis-aligned vs not an im
robertphillips 2013/05/02 13:56:39 Done. Note that this change will make more sense i
812 rect, combinedMatrix, devRect, 812 fAARectRenderer->shaderFillAAAARect(this->getGpu(), target,
813 useVertexCoverage); 813 combinedMatrix, devRect);
814 } else {
815 fAARectRenderer->shaderFillAARect(this->getGpu(), target,
816 rect, combinedMatrix, devRect) ;
817 }
814 #else 818 #else
815 fAARectRenderer->fillAARect(this->getGpu(), target, 819 fAARectRenderer->fillAARect(this->getGpu(), target,
816 devRect, useVertexCoverage); 820 devRect, useVertexCoverage);
817 #endif 821 #endif
818 } 822 }
819 return; 823 return;
820 } 824 }
821 825
822 if (width >= 0) { 826 if (width >= 0) {
823 // TODO: consider making static vertex buffers for these cases. 827 // TODO: consider making static vertex buffers for these cases.
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 return srcTexture; 1808 return srcTexture;
1805 } 1809 }
1806 } 1810 }
1807 1811
1808 /////////////////////////////////////////////////////////////////////////////// 1812 ///////////////////////////////////////////////////////////////////////////////
1809 #if GR_CACHE_STATS 1813 #if GR_CACHE_STATS
1810 void GrContext::printCacheStats() const { 1814 void GrContext::printCacheStats() const {
1811 fTextureCache->printStats(); 1815 fTextureCache->printStats();
1812 } 1816 }
1813 #endif 1817 #endif
OLDNEW
« src/gpu/GrAARectRenderer.cpp ('K') | « src/gpu/GrAARectRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698