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

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

Issue 13852049: Add GPU support for roundrects (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Remove some unnecessary checks 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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 target->setIndexSourceToArray(indices, indexCount); 963 target->setIndexSourceToArray(indices, indexCount);
964 target->drawIndexed(primitiveType, 0, 0, vertexCount, indexCount); 964 target->drawIndexed(primitiveType, 0, 0, vertexCount, indexCount);
965 target->resetIndexSource(); 965 target->resetIndexSource();
966 } else { 966 } else {
967 target->drawNonIndexed(primitiveType, 0, vertexCount); 967 target->drawNonIndexed(primitiveType, 0, vertexCount);
968 } 968 }
969 } 969 }
970 970
971 /////////////////////////////////////////////////////////////////////////////// 971 ///////////////////////////////////////////////////////////////////////////////
972 972
973 void GrContext::drawRRect(const GrPaint& paint,
robertphillips 2013/04/24 15:13:30 spaces
jvanverth1 2013/04/24 19:02:27 Done.
974 const GrRRect& rect,
975 const SkStrokeRec& stroke) {
976
977 GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW);
978 GrDrawState::AutoStageDisable atr(fDrawState);
bsalomon 2013/04/24 14:36:38 I don't think we need this. Other draws will call
979
980 if (!fOvalRenderer->drawSimpleRRect(target, this, paint, rect, stroke)) {
981 SkPath path;
982 path.addRRect(rect);
983 this->internalDrawPath(target, paint, path, stroke);
984 }
985 }
986
987 ///////////////////////////////////////////////////////////////////////////////
988
973 void GrContext::drawOval(const GrPaint& paint, 989 void GrContext::drawOval(const GrPaint& paint,
974 const GrRect& oval, 990 const GrRect& oval,
975 const SkStrokeRec& stroke) { 991 const SkStrokeRec& stroke) {
976 992
977 GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW); 993 GrDrawTarget* target = this->prepareToDraw(&paint, BUFFERED_DRAW);
978 GrDrawState::AutoStageDisable atr(fDrawState); 994 GrDrawState::AutoStageDisable atr(fDrawState);
979 995
980 if (!fOvalRenderer->drawOval(target, this, paint, oval, stroke)) { 996 if (!fOvalRenderer->drawOval(target, this, paint, oval, stroke)) {
981 SkPath path; 997 SkPath path;
982 path.addOval(oval); 998 path.addOval(oval);
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1785 return srcTexture; 1801 return srcTexture;
1786 } 1802 }
1787 } 1803 }
1788 1804
1789 /////////////////////////////////////////////////////////////////////////////// 1805 ///////////////////////////////////////////////////////////////////////////////
1790 #if GR_CACHE_STATS 1806 #if GR_CACHE_STATS
1791 void GrContext::printCacheStats() const { 1807 void GrContext::printCacheStats() const {
1792 fTextureCache->printStats(); 1808 fTextureCache->printStats();
1793 } 1809 }
1794 #endif 1810 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698