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

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

Issue 1407883004: Remove GrPipelineBuilder from getPathRenderer call (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 "GrContext.h" 9 #include "GrContext.h"
10 #include "GrContextOptions.h" 10 #include "GrContextOptions.h"
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 this->flush(); 534 this->flush();
535 } 535 }
536 } 536 }
537 537
538 /* 538 /*
539 * This method finds a path renderer that can draw the specified path on 539 * This method finds a path renderer that can draw the specified path on
540 * the provided target. 540 * the provided target.
541 * Due to its expense, the software path renderer has split out so it can 541 * Due to its expense, the software path renderer has split out so it can
542 * can be individually allowed/disallowed via the "allowSW" boolean. 542 * can be individually allowed/disallowed via the "allowSW" boolean.
543 */ 543 */
544 GrPathRenderer* GrContext::getPathRenderer(const GrPipelineBuilder& pipelineBuil der, 544 GrPathRenderer* GrContext::getPathRenderer(const SkMatrix& viewMatrix,
545 const SkMatrix& viewMatrix,
546 const SkPath& path, 545 const SkPath& path,
547 const GrStrokeInfo& stroke, 546 const GrStrokeInfo& stroke,
548 bool allowSW, 547 bool allowSW,
549 GrPathRendererChain::DrawType drawTyp e, 548 GrPathRendererChain::DrawType drawTyp e,
549 bool stencilIsDisabled,
550 bool stencilBufferIsMSAA,
550 GrPathRendererChain::StencilSupport* stencilSupport) { 551 GrPathRendererChain::StencilSupport* stencilSupport) {
551 552
552 if (!fPathRendererChain) { 553 if (!fPathRendererChain) {
553 fPathRendererChain = new GrPathRendererChain(this); 554 fPathRendererChain = new GrPathRendererChain(this);
554 } 555 }
555 556
556 GrPathRenderer* pr = fPathRendererChain->getPathRenderer(this->caps()->shade rCaps(), 557 GrPathRenderer* pr = fPathRendererChain->getPathRenderer(this->caps()->shade rCaps(),
557 pipelineBuilder,
558 viewMatrix, 558 viewMatrix,
559 path, 559 path,
560 stroke, 560 stroke,
561 drawType, 561 drawType,
562 stencilIsDisabled,
563 stencilBufferIsMSAA ,
562 stencilSupport); 564 stencilSupport);
563 565
564 if (!pr && allowSW) { 566 if (!pr && allowSW) {
565 if (!fSoftwarePathRenderer) { 567 if (!fSoftwarePathRenderer) {
566 fSoftwarePathRenderer = new GrSoftwarePathRenderer(this); 568 fSoftwarePathRenderer = new GrSoftwarePathRenderer(this);
567 } 569 }
568 pr = fSoftwarePathRenderer; 570 pr = fSoftwarePathRenderer;
569 } 571 }
570 572
571 return pr; 573 return pr;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 668
667 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) { 669 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) {
668 fResourceCache->setLimits(maxTextures, maxTextureBytes); 670 fResourceCache->setLimits(maxTextures, maxTextureBytes);
669 } 671 }
670 672
671 ////////////////////////////////////////////////////////////////////////////// 673 //////////////////////////////////////////////////////////////////////////////
672 674
673 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { 675 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const {
674 fResourceCache->dumpMemoryStatistics(traceMemoryDump); 676 fResourceCache->dumpMemoryStatistics(traceMemoryDump);
675 } 677 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698