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

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

Issue 441623005: Remove unused matrix param from GrContext/GrDrawTarget rect drawing functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 6 years, 4 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
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/GrSoftwarePathRenderer.cpp » ('j') | 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 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrOvalRenderer.h" 8 #include "GrOvalRenderer.h"
9 9
10 #include "GrEffect.h" 10 #include "GrEffect.h"
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 } 932 }
933 GrDrawState::AutoViewMatrixRestore avmr; 933 GrDrawState::AutoViewMatrixRestore avmr;
934 if (!avmr.setIdentity(target->drawState())) { 934 if (!avmr.setIdentity(target->drawState())) {
935 return false; 935 return false;
936 } 936 }
937 target->drawState()->addCoverageEffect(effect)->unref(); 937 target->drawState()->addCoverageEffect(effect)->unref();
938 SkRect bounds = outer->getBounds(); 938 SkRect bounds = outer->getBounds();
939 if (applyAA) { 939 if (applyAA) {
940 bounds.outset(SK_ScalarHalf, SK_ScalarHalf); 940 bounds.outset(SK_ScalarHalf, SK_ScalarHalf);
941 } 941 }
942 target->drawRect(bounds, NULL, NULL, NULL); 942 target->drawRect(bounds, NULL, NULL);
943 return true; 943 return true;
944 } 944 }
945 945
946 bool GrOvalRenderer::drawRRect(GrDrawTarget* target, GrContext* context, bool us eAA, 946 bool GrOvalRenderer::drawRRect(GrDrawTarget* target, GrContext* context, bool us eAA,
947 const SkRRect& rrect, const SkStrokeRec& stroke) { 947 const SkRRect& rrect, const SkStrokeRec& stroke) {
948 if (rrect.isOval()) { 948 if (rrect.isOval()) {
949 return this->drawOval(target, context, useAA, rrect.getBounds(), stroke) ; 949 return this->drawOval(target, context, useAA, rrect.getBounds(), stroke) ;
950 } 950 }
951 951
952 bool useCoverageAA = useAA && 952 bool useCoverageAA = useAA &&
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 1218
1219 // drop out the middle quad if we're stroked 1219 // drop out the middle quad if we're stroked
1220 int indexCnt = isStrokeOnly ? SK_ARRAY_COUNT(gRRectIndices) - 6 : 1220 int indexCnt = isStrokeOnly ? SK_ARRAY_COUNT(gRRectIndices) - 6 :
1221 SK_ARRAY_COUNT(gRRectIndices); 1221 SK_ARRAY_COUNT(gRRectIndices);
1222 target->setIndexSourceToBuffer(indexBuffer); 1222 target->setIndexSourceToBuffer(indexBuffer);
1223 target->drawIndexed(kTriangles_GrPrimitiveType, 0, 0, 16, indexCnt, &bou nds); 1223 target->drawIndexed(kTriangles_GrPrimitiveType, 0, 0, 16, indexCnt, &bou nds);
1224 } 1224 }
1225 1225
1226 return true; 1226 return true;
1227 } 1227 }
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/GrSoftwarePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698