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

Side by Side Diff: src/gpu/GrSoftwarePathRenderer.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/GrOvalRenderer.cpp ('k') | src/gpu/SkGpuDevice.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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const SkIRect& devClipBounds, 77 const SkIRect& devClipBounds,
78 const SkIRect& devPathBounds) { 78 const SkIRect& devPathBounds) {
79 GrDrawState::AutoViewMatrixRestore avmr; 79 GrDrawState::AutoViewMatrixRestore avmr;
80 if (!avmr.setIdentity(target->drawState())) { 80 if (!avmr.setIdentity(target->drawState())) {
81 return; 81 return;
82 } 82 }
83 SkRect rect; 83 SkRect rect;
84 if (devClipBounds.fTop < devPathBounds.fTop) { 84 if (devClipBounds.fTop < devPathBounds.fTop) {
85 rect.iset(devClipBounds.fLeft, devClipBounds.fTop, 85 rect.iset(devClipBounds.fLeft, devClipBounds.fTop,
86 devClipBounds.fRight, devPathBounds.fTop); 86 devClipBounds.fRight, devPathBounds.fTop);
87 target->drawSimpleRect(rect, NULL); 87 target->drawSimpleRect(rect);
88 } 88 }
89 if (devClipBounds.fLeft < devPathBounds.fLeft) { 89 if (devClipBounds.fLeft < devPathBounds.fLeft) {
90 rect.iset(devClipBounds.fLeft, devPathBounds.fTop, 90 rect.iset(devClipBounds.fLeft, devPathBounds.fTop,
91 devPathBounds.fLeft, devPathBounds.fBottom); 91 devPathBounds.fLeft, devPathBounds.fBottom);
92 target->drawSimpleRect(rect, NULL); 92 target->drawSimpleRect(rect);
93 } 93 }
94 if (devClipBounds.fRight > devPathBounds.fRight) { 94 if (devClipBounds.fRight > devPathBounds.fRight) {
95 rect.iset(devPathBounds.fRight, devPathBounds.fTop, 95 rect.iset(devPathBounds.fRight, devPathBounds.fTop,
96 devClipBounds.fRight, devPathBounds.fBottom); 96 devClipBounds.fRight, devPathBounds.fBottom);
97 target->drawSimpleRect(rect, NULL); 97 target->drawSimpleRect(rect);
98 } 98 }
99 if (devClipBounds.fBottom > devPathBounds.fBottom) { 99 if (devClipBounds.fBottom > devPathBounds.fBottom) {
100 rect.iset(devClipBounds.fLeft, devPathBounds.fBottom, 100 rect.iset(devClipBounds.fLeft, devPathBounds.fBottom,
101 devClipBounds.fRight, devClipBounds.fBottom); 101 devClipBounds.fRight, devClipBounds.fBottom);
102 target->drawSimpleRect(rect, NULL); 102 target->drawSimpleRect(rect);
103 } 103 }
104 } 104 }
105 105
106 } 106 }
107 107
108 //////////////////////////////////////////////////////////////////////////////// 108 ////////////////////////////////////////////////////////////////////////////////
109 // return true on success; false on failure 109 // return true on success; false on failure
110 bool GrSoftwarePathRenderer::onDrawPath(const SkPath& path, 110 bool GrSoftwarePathRenderer::onDrawPath(const SkPath& path,
111 const SkStrokeRec& stroke, 111 const SkStrokeRec& stroke,
112 GrDrawTarget* target, 112 GrDrawTarget* target,
(...skipping 25 matching lines...) Expand all
138 } 138 }
139 139
140 GrSWMaskHelper::DrawToTargetWithPathMask(texture, target, devPathBounds); 140 GrSWMaskHelper::DrawToTargetWithPathMask(texture, target, devPathBounds);
141 141
142 if (path.isInverseFillType()) { 142 if (path.isInverseFillType()) {
143 draw_around_inv_path(target, devClipBounds, devPathBounds); 143 draw_around_inv_path(target, devClipBounds, devPathBounds);
144 } 144 }
145 145
146 return true; 146 return true;
147 } 147 }
OLDNEW
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698