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

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

Issue 13468004: Make drawRect preserve vertex attrib state and push/pop the geom sources. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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
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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 } else { 969 } else {
970 target->setVertexSourceToArray(positions, vertexCount); 970 target->setVertexSourceToArray(positions, vertexCount);
971 } 971 }
972 972
973 // we don't currently apply offscreen AA to this path. Need improved 973 // we don't currently apply offscreen AA to this path. Need improved
974 // management of GrDrawTarget's geometry to avoid copying points per-tile. 974 // management of GrDrawTarget's geometry to avoid copying points per-tile.
975 975
976 if (NULL != indices) { 976 if (NULL != indices) {
977 target->setIndexSourceToArray(indices, indexCount); 977 target->setIndexSourceToArray(indices, indexCount);
978 target->drawIndexed(primitiveType, 0, 0, vertexCount, indexCount); 978 target->drawIndexed(primitiveType, 0, 0, vertexCount, indexCount);
979 target->resetIndexSource();
979 } else { 980 } else {
980 target->drawNonIndexed(primitiveType, 0, vertexCount); 981 target->drawNonIndexed(primitiveType, 0, vertexCount);
981 } 982 }
982 } 983 }
983 984
984 /////////////////////////////////////////////////////////////////////////////// 985 ///////////////////////////////////////////////////////////////////////////////
985 986
986 void GrContext::drawOval(const GrPaint& paint, 987 void GrContext::drawOval(const GrPaint& paint,
987 const GrRect& oval, 988 const GrRect& oval,
988 const SkStrokeRec& stroke) { 989 const SkStrokeRec& stroke) {
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 return srcTexture; 1799 return srcTexture;
1799 } 1800 }
1800 } 1801 }
1801 1802
1802 /////////////////////////////////////////////////////////////////////////////// 1803 ///////////////////////////////////////////////////////////////////////////////
1803 #if GR_CACHE_STATS 1804 #if GR_CACHE_STATS
1804 void GrContext::printCacheStats() const { 1805 void GrContext::printCacheStats() const {
1805 fTextureCache->printStats(); 1806 fTextureCache->printStats();
1806 } 1807 }
1807 #endif 1808 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/GrDrawState.h » ('j') | src/gpu/GrDrawTarget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698