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

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

Issue 1467553002: New API for computing optimization invariants. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 527
528 /////////////////////////////////////////////////////////////////////////////// 528 ///////////////////////////////////////////////////////////////////////////////
529 529
530 bool GrDrawTarget::installPipelineInDrawBatch(const GrPipelineBuilder* pipelineB uilder, 530 bool GrDrawTarget::installPipelineInDrawBatch(const GrPipelineBuilder* pipelineB uilder,
531 const GrScissorState* scissor, 531 const GrScissorState* scissor,
532 GrDrawBatch* batch) { 532 GrDrawBatch* batch) {
533 GrPipeline::CreateArgs args; 533 GrPipeline::CreateArgs args;
534 args.fPipelineBuilder = pipelineBuilder; 534 args.fPipelineBuilder = pipelineBuilder;
535 args.fCaps = this->caps(); 535 args.fCaps = this->caps();
536 args.fScissor = scissor; 536 args.fScissor = scissor;
537 args.fColorPOI = pipelineBuilder->colorProcInfo(batch); 537 GrBatchToXPOverrides override;
joshualitt 2015/11/23 19:09:28 GrPipelineOptimizations
538 args.fCoveragePOI = pipelineBuilder->coverageProcInfo(batch); 538 batch->getBatchToXPOverrides(override);
joshualitt 2015/11/23 19:09:28 getPipelineOptimizations
539 override.fColorPOI.completeCalculations(pipelineBuilder->fColorFragmentProce ssors.begin(),
540 pipelineBuilder->numColorFragmentPro cessors());
541 override.fCoveragePOI.completeCalculations(pipelineBuilder->fCoverageFragmen tProcessors.begin(),
542 pipelineBuilder->numCoverageFragm entProcessors());
543 args.fColorPOI = override.fColorPOI;
544 args.fCoveragePOI = override.fCoveragePOI;
539 if (!this->setupDstReadIfNecessary(*pipelineBuilder, args.fColorPOI, 545 if (!this->setupDstReadIfNecessary(*pipelineBuilder, args.fColorPOI,
540 args.fCoveragePOI, &args.fDstTexture, 546 args.fCoveragePOI, &args.fDstTexture,
541 batch->bounds())) { 547 batch->bounds())) {
542 return false; 548 return false;
543 } 549 }
544 550
545 if (!batch->installPipeline(args)) { 551 if (!batch->installPipeline(args)) {
546 return false; 552 return false;
547 } 553 }
548 554
549 return true; 555 return true;
550 } 556 }
551 557
552 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) { 558 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) {
553 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); 559 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt);
554 this->recordBatch(batch); 560 this->recordBatch(batch);
555 batch->unref(); 561 batch->unref();
556 } 562 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698