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

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

Issue 920423003: Stop lieing about GrBatch color for Rects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 5 years, 10 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/GrBatch.h ('k') | src/gpu/GrOvalRenderer.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 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 // TODO some kind of checkdraw, but not at this level 538 // TODO some kind of checkdraw, but not at this level
539 539
540 // Setup clip 540 // Setup clip
541 GrScissorState scissorState; 541 GrScissorState scissorState;
542 GrPipelineBuilder::AutoRestoreEffects are; 542 GrPipelineBuilder::AutoRestoreEffects are;
543 GrPipelineBuilder::AutoRestoreStencil ars; 543 GrPipelineBuilder::AutoRestoreStencil ars;
544 if (!this->setupClip(pipelineBuilder, &are, &ars, &scissorState, devBounds)) { 544 if (!this->setupClip(pipelineBuilder, &are, &ars, &scissorState, devBounds)) {
545 return; 545 return;
546 } 546 }
547 547
548 // init batch and my other crap
549 GrBatchOpt batchOpt;
550 batchOpt.fCanTweakAlphaForCoverage = pipelineBuilder->canTweakAlphaForCovera ge();
551 batch->initBatchOpt(batchOpt);
552
553 GrDrawTarget::PipelineInfo pipelineInfo(pipelineBuilder, &scissorState, batc h, devBounds, this); 548 GrDrawTarget::PipelineInfo pipelineInfo(pipelineBuilder, &scissorState, batc h, devBounds, this);
554 if (pipelineInfo.mustSkipDraw()) { 549 if (pipelineInfo.mustSkipDraw()) {
555 return; 550 return;
556 } 551 }
557 552
558 this->onDrawBatch(batch, pipelineInfo); 553 this->onDrawBatch(batch, pipelineInfo);
559 } 554 }
560 555
561 static const GrStencilSettings& winding_path_stencil_settings() { 556 static const GrStencilSettings& winding_path_stencil_settings() {
562 GR_STATIC_CONST_SAME_STENCIL_STRUCT(gSettings, 557 GR_STATIC_CONST_SAME_STENCIL_STRUCT(gSettings,
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 GrPipelineBuilder::AutoRestoreStencil* ars, 1288 GrPipelineBuilder::AutoRestoreStencil* ars,
1294 GrScissorState* scissorState, 1289 GrScissorState* scissorState,
1295 const SkRect* devBounds) { 1290 const SkRect* devBounds) {
1296 return fClipMaskManager.setupClipping(pipelineBuilder, 1291 return fClipMaskManager.setupClipping(pipelineBuilder,
1297 are, 1292 are,
1298 ars, 1293 ars,
1299 scissorState, 1294 scissorState,
1300 this->getClip(), 1295 this->getClip(),
1301 devBounds); 1296 devBounds);
1302 } 1297 }
OLDNEW
« no previous file with comments | « src/gpu/GrBatch.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698