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

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

Issue 1310533004: Standardize BW to NonAA (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/GrSWMaskHelper.cpp ('k') | src/gpu/GrStencilAndCoverPathRenderer.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 #include "GrSoftwarePathRenderer.h" 9 #include "GrSoftwarePathRenderer.h"
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 const SkIRect& devPathBounds) { 74 const SkIRect& devPathBounds) {
75 SkMatrix invert; 75 SkMatrix invert;
76 if (!viewMatrix.invert(&invert)) { 76 if (!viewMatrix.invert(&invert)) {
77 return; 77 return;
78 } 78 }
79 79
80 SkRect rect; 80 SkRect rect;
81 if (devClipBounds.fTop < devPathBounds.fTop) { 81 if (devClipBounds.fTop < devPathBounds.fTop) {
82 rect.iset(devClipBounds.fLeft, devClipBounds.fTop, 82 rect.iset(devClipBounds.fLeft, devClipBounds.fTop,
83 devClipBounds.fRight, devPathBounds.fTop); 83 devClipBounds.fRight, devPathBounds.fTop);
84 target->drawBWRect(*pipelineBuilder, color, SkMatrix::I(), rect, invert) ; 84 target->drawNonAARect(*pipelineBuilder, color, SkMatrix::I(), rect, inve rt);
85 } 85 }
86 if (devClipBounds.fLeft < devPathBounds.fLeft) { 86 if (devClipBounds.fLeft < devPathBounds.fLeft) {
87 rect.iset(devClipBounds.fLeft, devPathBounds.fTop, 87 rect.iset(devClipBounds.fLeft, devPathBounds.fTop,
88 devPathBounds.fLeft, devPathBounds.fBottom); 88 devPathBounds.fLeft, devPathBounds.fBottom);
89 target->drawBWRect(*pipelineBuilder, color, SkMatrix::I(), rect, invert) ; 89 target->drawNonAARect(*pipelineBuilder, color, SkMatrix::I(), rect, inve rt);
90 } 90 }
91 if (devClipBounds.fRight > devPathBounds.fRight) { 91 if (devClipBounds.fRight > devPathBounds.fRight) {
92 rect.iset(devPathBounds.fRight, devPathBounds.fTop, 92 rect.iset(devPathBounds.fRight, devPathBounds.fTop,
93 devClipBounds.fRight, devPathBounds.fBottom); 93 devClipBounds.fRight, devPathBounds.fBottom);
94 target->drawBWRect(*pipelineBuilder, color, SkMatrix::I(), rect, invert) ; 94 target->drawNonAARect(*pipelineBuilder, color, SkMatrix::I(), rect, inve rt);
95 } 95 }
96 if (devClipBounds.fBottom > devPathBounds.fBottom) { 96 if (devClipBounds.fBottom > devPathBounds.fBottom) {
97 rect.iset(devClipBounds.fLeft, devPathBounds.fBottom, 97 rect.iset(devClipBounds.fLeft, devPathBounds.fBottom,
98 devClipBounds.fRight, devClipBounds.fBottom); 98 devClipBounds.fRight, devClipBounds.fBottom);
99 target->drawBWRect(*pipelineBuilder, color, SkMatrix::I(), rect, invert) ; 99 target->drawNonAARect(*pipelineBuilder, color, SkMatrix::I(), rect, inve rt);
100 } 100 }
101 } 101 }
102 102
103 } 103 }
104 104
105 //////////////////////////////////////////////////////////////////////////////// 105 ////////////////////////////////////////////////////////////////////////////////
106 // return true on success; false on failure 106 // return true on success; false on failure
107 bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) { 107 bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) {
108 if (NULL == fContext) { 108 if (NULL == fContext) {
109 return false; 109 return false;
(...skipping 20 matching lines...) Expand all
130 GrSWMaskHelper::DrawToTargetWithPathMask(texture, args.fTarget, args.fPipeli neBuilder, 130 GrSWMaskHelper::DrawToTargetWithPathMask(texture, args.fTarget, args.fPipeli neBuilder,
131 args.fColor, *args.fViewMatrix, dev PathBounds); 131 args.fColor, *args.fViewMatrix, dev PathBounds);
132 132
133 if (args.fPath->isInverseFillType()) { 133 if (args.fPath->isInverseFillType()) {
134 draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColor, * args.fViewMatrix, 134 draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColor, * args.fViewMatrix,
135 devClipBounds, devPathBounds); 135 devClipBounds, devPathBounds);
136 } 136 }
137 137
138 return true; 138 return true;
139 } 139 }
OLDNEW
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/gpu/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698