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

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

Issue 1419403002: Fix up the clip mask manager's creation of paths (w.r.t. volatility) (Closed) Base URL: https://skia.googlesource.com/skia.git@mdb-simplify-cmm
Patch Set: Update to be independant of other CL Created 5 years, 1 month 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/core/SkClipStack.cpp ('k') | no next file » | 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 "GrClipMaskManager.h" 8 #include "GrClipMaskManager.h"
9 #include "GrCaps.h" 9 #include "GrCaps.h"
10 #include "GrDrawContext.h" 10 #include "GrDrawContext.h"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 fDrawTarget->drawAARect(*pipelineBuilder, color, viewMatrix, 441 fDrawTarget->drawAARect(*pipelineBuilder, color, viewMatrix,
442 element->getRect(), devRect); 442 element->getRect(), devRect);
443 } else { 443 } else {
444 fDrawTarget->drawNonAARect(*pipelineBuilder, color, viewMatrix, 444 fDrawTarget->drawNonAARect(*pipelineBuilder, color, viewMatrix,
445 element->getRect()); 445 element->getRect());
446 } 446 }
447 return true; 447 return true;
448 default: { 448 default: {
449 SkPath path; 449 SkPath path;
450 element->asPath(&path); 450 element->asPath(&path);
451 path.setIsVolatile(true);
452 if (path.isInverseFillType()) { 451 if (path.isInverseFillType()) {
453 path.toggleInverseFillType(); 452 path.toggleInverseFillType();
454 } 453 }
455 GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle); 454 GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle);
456 if (nullptr == pr) { 455 if (nullptr == pr) {
457 GrPathRendererChain::DrawType type; 456 GrPathRendererChain::DrawType type;
458 type = element->isAA() ? GrPathRendererChain::kColorAntiAlias_Dr awType : 457 type = element->isAA() ? GrPathRendererChain::kColorAntiAlias_Dr awType :
459 GrPathRendererChain::kColor_DrawType; 458 GrPathRendererChain::kColor_DrawType;
460 pr = this->getContext()->getPathRenderer(*pipelineBuilder, viewM atrix, 459 pr = this->getContext()->getPathRenderer(*pipelineBuilder, viewM atrix,
461 path, stroke, false, ty pe); 460 path, stroke, false, ty pe);
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 1135
1137 //////////////////////////////////////////////////////////////////////////////// 1136 ////////////////////////////////////////////////////////////////////////////////
1138 1137
1139 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment, 1138 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment,
1140 GrStencilSettings* settings) { 1139 GrStencilSettings* settings) {
1141 if (stencilAttachment) { 1140 if (stencilAttachment) {
1142 int stencilBits = stencilAttachment->bits(); 1141 int stencilBits = stencilAttachment->bits();
1143 this->adjustStencilParams(settings, fClipMode, stencilBits); 1142 this->adjustStencilParams(settings, fClipMode, stencilBits);
1144 } 1143 }
1145 } 1144 }
OLDNEW
« no previous file with comments | « src/core/SkClipStack.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698