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

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
« no previous file with comments | « no previous file | src/gpu/GrOvalRenderer.cpp » ('j') | src/gpu/GrPipelineBuilder.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 GrPipelineOptimizations opt;
542 args.fCoveragePOI = pipelineBuilder->coverageProcInfo(batch); 542 batch->getPipelineOptimizations(opt);
543 opt.fColorPOI.completeCalculations(pipelineBuilder->fColorFragmentProcessors .begin(),
544 pipelineBuilder->numColorFragmentProcesso rs());
545 opt.fCoveragePOI.completeCalculations(pipelineBuilder->fCoverageFragmentProc essors.begin(),
546 pipelineBuilder->numCoverageFragmentPr ocessors());
547 args.fColorPOI = opt.fColorPOI;
egdaniel 2015/11/24 00:08:13 shouldn't the CreateArgs just take a GrPipelineOpt
548 args.fCoveragePOI = opt.fCoveragePOI;
543 if (!this->setupDstReadIfNecessary(*pipelineBuilder, args.fColorPOI, 549 if (!this->setupDstReadIfNecessary(*pipelineBuilder, args.fColorPOI,
544 args.fCoveragePOI, &args.fDstTexture, 550 args.fCoveragePOI, &args.fDstTexture,
545 batch->bounds())) { 551 batch->bounds())) {
546 return false; 552 return false;
547 } 553 }
548 554
549 if (!batch->installPipeline(args)) { 555 if (!batch->installPipeline(args)) {
550 return false; 556 return false;
551 } 557 }
552 558
553 return true; 559 return true;
554 } 560 }
555 561
556 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) { 562 void GrDrawTarget::clearStencilClip(const SkIRect& rect, bool insideClip, GrRend erTarget* rt) {
557 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt); 563 GrBatch* batch = new GrClearStencilClipBatch(rect, insideClip, rt);
558 this->recordBatch(batch); 564 this->recordBatch(batch);
559 batch->unref(); 565 batch->unref();
560 } 566 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrOvalRenderer.cpp » ('j') | src/gpu/GrPipelineBuilder.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698