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

Side by Side Diff: gm/rrects.cpp

Issue 817853002: Remove localcoordchange functions off paint (Closed) Base URL: https://skia.googlesource.com/skia.git@local-matrix-on-gp
Patch Set: changing ignores Created 6 years 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 | « gm/convexpolyeffect.cpp ('k') | include/gpu/GrPaint.h » ('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 2012 Google Inc. 2 * Copyright 2012 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 "gm.h" 8 #include "gm.h"
9 #if SK_SUPPORT_GPU 9 #if SK_SUPPORT_GPU
10 #include "GrTest.h" 10 #include "GrTest.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 GrDrawState drawState; 115 GrDrawState drawState;
116 116
117 SkRRect rrect = fRRects[curRRect]; 117 SkRRect rrect = fRRects[curRRect];
118 rrect.offset(SkIntToScalar(x), SkIntToScalar(y)); 118 rrect.offset(SkIntToScalar(x), SkIntToScalar(y));
119 GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et; 119 GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et;
120 SkAutoTUnref<GrFragmentProcessor> fp(GrRRectEffect::Crea te(edgeType, 120 SkAutoTUnref<GrFragmentProcessor> fp(GrRRectEffect::Crea te(edgeType,
121 rrect)); 121 rrect));
122 if (fp) { 122 if (fp) {
123 drawState.addCoverageProcessor(fp); 123 drawState.addCoverageProcessor(fp);
124 drawState.setIdentityViewMatrix();
125 drawState.setRenderTarget(rt); 124 drawState.setRenderTarget(rt);
126 125
127 SkRect bounds = rrect.getBounds(); 126 SkRect bounds = rrect.getBounds();
128 bounds.outset(2.f, 2.f); 127 bounds.outset(2.f, 2.f);
129 128
130 tt.target()->drawSimpleRect(&drawState, 0xff000000, bounds); 129 tt.target()->drawSimpleRect(&drawState, 0xff000000, bounds);
131 } else { 130 } else {
132 drew = false; 131 drew = false;
133 } 132 }
134 #endif 133 #endif
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 260
262 DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); ) 261 DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); )
263 DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); ) 262 DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); )
264 DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); ) 263 DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); )
265 DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); ) 264 DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); )
266 #if SK_SUPPORT_GPU 265 #if SK_SUPPORT_GPU
267 DEF_GM( return new RRectGM(RRectGM::kEffect_Type); ) 266 DEF_GM( return new RRectGM(RRectGM::kEffect_Type); )
268 #endif 267 #endif
269 268
270 } 269 }
OLDNEW
« no previous file with comments | « gm/convexpolyeffect.cpp ('k') | include/gpu/GrPaint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698