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

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

Issue 19449002: Replace all instances of GrRect with SkRect. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.cpp ('k') | src/gpu/GrTextContext.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 "GrStencilAndCoverPathRenderer.h" 10 #include "GrStencilAndCoverPathRenderer.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 SkAutoTUnref<GrPath> p(fGpu->createPath(path)); 71 SkAutoTUnref<GrPath> p(fGpu->createPath(path));
72 72
73 SkPath::FillType nonInvertedFill = SkPath::ConvertToNonInverseFillType(path. getFillType()); 73 SkPath::FillType nonInvertedFill = SkPath::ConvertToNonInverseFillType(path. getFillType());
74 target->stencilPath(p, stroke, nonInvertedFill); 74 target->stencilPath(p, stroke, nonInvertedFill);
75 75
76 // TODO: Use built in cover operation rather than a rect draw. This will req uire making our 76 // TODO: Use built in cover operation rather than a rect draw. This will req uire making our
77 // fragment shaders be able to eat varyings generated by a matrix. 77 // fragment shaders be able to eat varyings generated by a matrix.
78 78
79 // fill the path, zero out the stencil 79 // fill the path, zero out the stencil
80 GrRect bounds = p->getBounds(); 80 SkRect bounds = p->getBounds();
81 SkScalar bloat = drawState->getViewMatrix().getMaxStretch() * SK_ScalarHalf; 81 SkScalar bloat = drawState->getViewMatrix().getMaxStretch() * SK_ScalarHalf;
82 GrDrawState::AutoViewMatrixRestore avmr; 82 GrDrawState::AutoViewMatrixRestore avmr;
83 83
84 if (nonInvertedFill == path.getFillType()) { 84 if (nonInvertedFill == path.getFillType()) {
85 GR_STATIC_CONST_SAME_STENCIL(kStencilPass, 85 GR_STATIC_CONST_SAME_STENCIL(kStencilPass,
86 kZero_StencilOp, 86 kZero_StencilOp,
87 kZero_StencilOp, 87 kZero_StencilOp,
88 kNotEqual_StencilFunc, 88 kNotEqual_StencilFunc,
89 0xffff, 89 0xffff,
90 0x0000, 90 0x0000,
(...skipping 23 matching lines...) Expand all
114 avmr.setIdentity(drawState); 114 avmr.setIdentity(drawState);
115 bloat = 0; 115 bloat = 0;
116 } 116 }
117 *drawState->stencil() = kInvertedStencilPass; 117 *drawState->stencil() = kInvertedStencilPass;
118 } 118 }
119 bounds.outset(bloat, bloat); 119 bounds.outset(bloat, bloat);
120 target->drawSimpleRect(bounds, NULL); 120 target->drawSimpleRect(bounds, NULL);
121 target->drawState()->stencil()->setDisabled(); 121 target->drawState()->stencil()->setDisabled();
122 return true; 122 return true;
123 } 123 }
OLDNEW
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698