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

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

Issue 677463002: Set temporary paths volatile so we don't cache them. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Init fIsVolatile Created 6 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/gpu/GrAADistanceFieldPathRenderer.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 "GrClipMaskManager.h" 9 #include "GrClipMaskManager.h"
10 #include "GrAAConvexPathRenderer.h" 10 #include "GrAAConvexPathRenderer.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 element->getRect() , 405 element->getRect() ,
406 SkMatrix::I(), 406 SkMatrix::I(),
407 element->getRect() ); 407 element->getRect() );
408 } else { 408 } else {
409 fGpu->drawSimpleRect(element->getRect()); 409 fGpu->drawSimpleRect(element->getRect());
410 } 410 }
411 return true; 411 return true;
412 default: { 412 default: {
413 SkPath path; 413 SkPath path;
414 element->asPath(&path); 414 element->asPath(&path);
415 path.setIsVolatile(true);
415 if (path.isInverseFillType()) { 416 if (path.isInverseFillType()) {
416 path.toggleInverseFillType(); 417 path.toggleInverseFillType();
417 } 418 }
418 SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); 419 SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle);
419 if (NULL == pr) { 420 if (NULL == pr) {
420 GrPathRendererChain::DrawType type; 421 GrPathRendererChain::DrawType type;
421 type = element->isAA() ? GrPathRendererChain::kColorAntiAlias_Dr awType : 422 type = element->isAA() ? GrPathRendererChain::kColorAntiAlias_Dr awType :
422 GrPathRendererChain::kColor_DrawType; 423 GrPathRendererChain::kColor_DrawType;
423 pr = this->getContext()->getPathRenderer(path, stroke, fGpu, fal se, type); 424 pr = this->getContext()->getPathRenderer(path, stroke, fGpu, fal se, type);
424 } 425 }
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 1136
1136 // TODO: dynamically attach a stencil buffer 1137 // TODO: dynamically attach a stencil buffer
1137 int stencilBits = 0; 1138 int stencilBits = 0;
1138 GrStencilBuffer* stencilBuffer = 1139 GrStencilBuffer* stencilBuffer =
1139 drawState.getRenderTarget()->getStencilBuffer(); 1140 drawState.getRenderTarget()->getStencilBuffer();
1140 if (stencilBuffer) { 1141 if (stencilBuffer) {
1141 stencilBits = stencilBuffer->bits(); 1142 stencilBits = stencilBuffer->bits();
1142 this->adjustStencilParams(settings, clipMode, stencilBits); 1143 this->adjustStencilParams(settings, clipMode, stencilBits);
1143 } 1144 }
1144 } 1145 }
OLDNEW
« no previous file with comments | « src/gpu/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698