| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |