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

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

Issue 1420043002: Narrow the distribution of GrDrawTarget a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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 | « src/gpu/GrClipMaskManager.cpp ('k') | 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 /* 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 this->flush(); 532 this->flush();
533 } 533 }
534 } 534 }
535 535
536 /* 536 /*
537 * This method finds a path renderer that can draw the specified path on 537 * This method finds a path renderer that can draw the specified path on
538 * the provided target. 538 * the provided target.
539 * Due to its expense, the software path renderer has split out so it can 539 * Due to its expense, the software path renderer has split out so it can
540 * can be individually allowed/disallowed via the "allowSW" boolean. 540 * can be individually allowed/disallowed via the "allowSW" boolean.
541 */ 541 */
542 GrPathRenderer* GrContext::getPathRenderer(const GrDrawTarget* target, 542 GrPathRenderer* GrContext::getPathRenderer(const GrPipelineBuilder* pipelineBuil der,
543 const GrPipelineBuilder* pipelineBuil der,
544 const SkMatrix& viewMatrix, 543 const SkMatrix& viewMatrix,
545 const SkPath& path, 544 const SkPath& path,
546 const GrStrokeInfo& stroke, 545 const GrStrokeInfo& stroke,
547 bool allowSW, 546 bool allowSW,
548 GrPathRendererChain::DrawType drawTyp e, 547 GrPathRendererChain::DrawType drawTyp e,
549 GrPathRendererChain::StencilSupport* stencilSupport) { 548 GrPathRendererChain::StencilSupport* stencilSupport) {
550 549
551 if (!fPathRendererChain) { 550 if (!fPathRendererChain) {
552 fPathRendererChain = new GrPathRendererChain(this); 551 fPathRendererChain = new GrPathRendererChain(this);
553 } 552 }
554 553
555 GrPathRenderer* pr = fPathRendererChain->getPathRenderer(target, 554 GrPathRenderer* pr = fPathRendererChain->getPathRenderer(this->caps()->shade rCaps(),
556 pipelineBuilder, 555 pipelineBuilder,
557 viewMatrix, 556 viewMatrix,
558 path, 557 path,
559 stroke, 558 stroke,
560 drawType, 559 drawType,
561 stencilSupport); 560 stencilSupport);
562 561
563 if (!pr && allowSW) { 562 if (!pr && allowSW) {
564 if (!fSoftwarePathRenderer) { 563 if (!fSoftwarePathRenderer) {
565 fSoftwarePathRenderer = new GrSoftwarePathRenderer(this); 564 fSoftwarePathRenderer = new GrSoftwarePathRenderer(this);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 664
666 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) { 665 void GrContext::setResourceCacheLimits(int maxTextures, size_t maxTextureBytes) {
667 fResourceCache->setLimits(maxTextures, maxTextureBytes); 666 fResourceCache->setLimits(maxTextures, maxTextureBytes);
668 } 667 }
669 668
670 ////////////////////////////////////////////////////////////////////////////// 669 //////////////////////////////////////////////////////////////////////////////
671 670
672 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { 671 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const {
673 fResourceCache->dumpMemoryStatistics(traceMemoryDump); 672 fResourceCache->dumpMemoryStatistics(traceMemoryDump);
674 } 673 }
OLDNEW
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698