| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 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 "GrDrawTarget.h" | 9 #include "GrDrawTarget.h" |
| 10 | 10 |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 531 |
| 532 /////////////////////////////////////////////////////////////////////////////// | 532 /////////////////////////////////////////////////////////////////////////////// |
| 533 | 533 |
| 534 bool GrDrawTarget::installPipelineInDrawBatch(const GrPipelineBuilder* pipelineB
uilder, | 534 bool GrDrawTarget::installPipelineInDrawBatch(const GrPipelineBuilder* pipelineB
uilder, |
| 535 const GrScissorState* scissor, | 535 const GrScissorState* scissor, |
| 536 GrDrawBatch* batch) { | 536 GrDrawBatch* batch) { |
| 537 GrPipeline::CreateArgs args; | 537 GrPipeline::CreateArgs args; |
| 538 args.fPipelineBuilder = pipelineBuilder; | 538 args.fPipelineBuilder = pipelineBuilder; |
| 539 args.fCaps = this->caps(); | 539 args.fCaps = this->caps(); |
| 540 args.fScissor = scissor; | 540 args.fScissor = scissor; |
| 541 args.fColorPOI = pipelineBuilder->colorProcInfo(batch); | 541 batch->getPipelineOptimizations(&args.fOpts); |
| 542 args.fCoveragePOI = pipelineBuilder->coverageProcInfo(batch); | 542 args.fOpts.fColorPOI.completeCalculations(pipelineBuilder->fColorFragmentPro
cessors.begin(), |
| 543 if (!this->setupDstReadIfNecessary(*pipelineBuilder, args.fColorPOI, | 543 pipelineBuilder->numColorFragmentP
rocessors()); |
| 544 args.fCoveragePOI, &args.fDstTexture, | 544 args.fOpts.fCoveragePOI.completeCalculations( |
| 545 pipelineBuilder->fCoverageFragmen
tProcessors.begin(), |
| 546 pipelineBuilder->numCoverageFragm
entProcessors()); |
| 547 if (!this->setupDstReadIfNecessary(*pipelineBuilder, args.fOpts.fColorPOI, |
| 548 args.fOpts.fCoveragePOI, &args.fDstTextur
e, |
| 545 batch->bounds())) { | 549 batch->bounds())) { |
| 546 return false; | 550 return false; |
| 547 } | 551 } |
| 548 | 552 |
| 549 if (!batch->installPipeline(args)) { | 553 if (!batch->installPipeline(args)) { |
| 550 return false; | 554 return false; |
| 551 } | 555 } |
| 552 | 556 |
| 553 return true; | 557 return true; |
| 554 } | 558 } |
| 555 | 559 |
| 556 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { | 560 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend
erTarget* rt) { |
| 557 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); | 561 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); |
| 558 this->recordBatch(batch); | 562 this->recordBatch(batch); |
| 559 batch->unref(); | 563 batch->unref(); |
| 560 } | 564 } |
| OLD | NEW |