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

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

Issue 15780002: Replace GrDrawState::AutoDeviceCoordDraw with GrDrawState::AutoViewMatrixRestore::setIdentity(). s (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: update based on comments Created 7 years, 6 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/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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 *devPathBounds = GrIRect::EmptyIRect(); 75 *devPathBounds = GrIRect::EmptyIRect();
76 return false; 76 return false;
77 } 77 }
78 return true; 78 return true;
79 } 79 }
80 80
81 //////////////////////////////////////////////////////////////////////////////// 81 ////////////////////////////////////////////////////////////////////////////////
82 void draw_around_inv_path(GrDrawTarget* target, 82 void draw_around_inv_path(GrDrawTarget* target,
83 const GrIRect& devClipBounds, 83 const GrIRect& devClipBounds,
84 const GrIRect& devPathBounds) { 84 const GrIRect& devPathBounds) {
85 GrDrawState::AutoDeviceCoordDraw adcd(target->drawState()); 85 GrDrawState::AutoViewMatrixRestore avmr;
86 if (!adcd.succeeded()) { 86 if (!avmr.setIdentity(target->drawState())) {
87 return; 87 return;
88 } 88 }
89 GrRect rect; 89 GrRect rect;
90 if (devClipBounds.fTop < devPathBounds.fTop) { 90 if (devClipBounds.fTop < devPathBounds.fTop) {
91 rect.iset(devClipBounds.fLeft, devClipBounds.fTop, 91 rect.iset(devClipBounds.fLeft, devClipBounds.fTop,
92 devClipBounds.fRight, devPathBounds.fTop); 92 devClipBounds.fRight, devPathBounds.fTop);
93 target->drawSimpleRect(rect, NULL); 93 target->drawSimpleRect(rect, NULL);
94 } 94 }
95 if (devClipBounds.fLeft < devPathBounds.fLeft) { 95 if (devClipBounds.fLeft < devPathBounds.fLeft) {
96 rect.iset(devClipBounds.fLeft, devPathBounds.fTop, 96 rect.iset(devClipBounds.fLeft, devPathBounds.fTop,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 GrSWMaskHelper::DrawToTargetWithPathMask(texture, target, devPathBounds); 146 GrSWMaskHelper::DrawToTargetWithPathMask(texture, target, devPathBounds);
147 147
148 if (path.isInverseFillType()) { 148 if (path.isInverseFillType()) {
149 draw_around_inv_path(target, devClipBounds, devPathBounds); 149 draw_around_inv_path(target, devClipBounds, devPathBounds);
150 } 150 }
151 151
152 return true; 152 return true;
153 } 153 }
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