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

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

Issue 2126083002: Remove fColor from PathRenderer DrawPathArgs struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove unnecessary GrPaint::setColor calls Created 4 years, 5 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 | « no previous file | src/gpu/GrDrawContext.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 * 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 "GrDrawingManager.h" 10 #include "GrDrawingManager.h"
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 GrPaint paint; 663 GrPaint paint;
664 paint.setXPFactory(GrDisableColorXPFactory::Make()); 664 paint.setXPFactory(GrDisableColorXPFactory::Make());
665 paint.setAntiAlias(element->isAA()); 665 paint.setAntiAlias(element->isAA());
666 666
667 GrPathRenderer::DrawPathArgs args; 667 GrPathRenderer::DrawPathArgs args;
668 args.fResourceProvider = context->resourceProvider() ; 668 args.fResourceProvider = context->resourceProvider() ;
669 args.fPaint = &paint; 669 args.fPaint = &paint;
670 args.fUserStencilSettings = &kDrawToStencil; 670 args.fUserStencilSettings = &kDrawToStencil;
671 args.fDrawContext = drawContext; 671 args.fDrawContext = drawContext;
672 args.fClip = &clip; 672 args.fClip = &clip;
673 args.fColor = GrColor_WHITE;
674 args.fViewMatrix = &viewMatrix; 673 args.fViewMatrix = &viewMatrix;
675 args.fShape = &shape; 674 args.fShape = &shape;
676 args.fAntiAlias = false; 675 args.fAntiAlias = false;
677 args.fGammaCorrect = false; 676 args.fGammaCorrect = false;
678 pr->drawPath(args); 677 pr->drawPath(args);
679 } else { 678 } else {
680 GrPathRenderer::StencilPathArgs args; 679 GrPathRenderer::StencilPathArgs args;
681 args.fResourceProvider = context->resourceProvider() ; 680 args.fResourceProvider = context->resourceProvider() ;
682 args.fDrawContext = drawContext; 681 args.fDrawContext = drawContext;
683 args.fClip = &clip; 682 args.fClip = &clip;
(...skipping 19 matching lines...) Expand all
703 GrShape shape(clipPath, GrStyle::SimpleFill()); 702 GrShape shape(clipPath, GrStyle::SimpleFill());
704 GrPaint paint; 703 GrPaint paint;
705 paint.setXPFactory(GrDisableColorXPFactory::Make()); 704 paint.setXPFactory(GrDisableColorXPFactory::Make());
706 paint.setAntiAlias(element->isAA()); 705 paint.setAntiAlias(element->isAA());
707 GrPathRenderer::DrawPathArgs args; 706 GrPathRenderer::DrawPathArgs args;
708 args.fResourceProvider = context->resourceProvider(); 707 args.fResourceProvider = context->resourceProvider();
709 args.fPaint = &paint; 708 args.fPaint = &paint;
710 args.fUserStencilSettings = *pass; 709 args.fUserStencilSettings = *pass;
711 args.fDrawContext = drawContext; 710 args.fDrawContext = drawContext;
712 args.fClip = &clip; 711 args.fClip = &clip;
713 args.fColor = GrColor_WHITE;
714 args.fViewMatrix = &viewMatrix; 712 args.fViewMatrix = &viewMatrix;
715 args.fShape = &shape; 713 args.fShape = &shape;
716 args.fAntiAlias = false; 714 args.fAntiAlias = false;
717 args.fGammaCorrect = false; 715 args.fGammaCorrect = false;
718 pr->drawPath(args); 716 pr->drawPath(args);
719 } 717 }
720 } else { 718 } else {
721 // The view matrix is setup to do clip space -> stencil spac e translation, so 719 // The view matrix is setup to do clip space -> stencil spac e translation, so
722 // draw rect in clip space. 720 // draw rect in clip space.
723 drawContext->drawContextPriv().stencilRect(clip, *pass, fals e, viewMatrix, 721 drawContext->drawContextPriv().stencilRect(clip, *pass, fals e, viewMatrix,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 sk_sp<GrTexture> result(texProvider->createApproxTexture(desc)); 798 sk_sp<GrTexture> result(texProvider->createApproxTexture(desc));
801 if (!result) { 799 if (!result) {
802 return nullptr; 800 return nullptr;
803 } 801 }
804 result->resourcePriv().setUniqueKey(key); 802 result->resourcePriv().setUniqueKey(key);
805 803
806 helper.toTexture(result.get()); 804 helper.toTexture(result.get());
807 805
808 return result; 806 return result;
809 } 807 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698