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

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

Issue 1480353002: APIs which took colorPOI / coveragePOI pairs updated to take a GrPipelineOptimizations struct (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 | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrXferProcessor.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 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrPipelineBuilder.h" 8 #include "GrPipelineBuilder.h"
9 9
10 #include "GrBlend.h" 10 #include "GrBlend.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 fClip = clip; 43 fClip = clip;
44 44
45 this->setState(GrPipelineBuilder::kHWAntialias_Flag, 45 this->setState(GrPipelineBuilder::kHWAntialias_Flag,
46 rt->isUnifiedMultisampled() && paint.isAntiAlias()); 46 rt->isUnifiedMultisampled() && paint.isAntiAlias());
47 } 47 }
48 48
49 //////////////////////////////////////////////////////////////////////////////s 49 //////////////////////////////////////////////////////////////////////////////s
50 50
51 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps, 51 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps,
52 const GrProcOptInfo& colorPOI, 52 const GrPipelineOptimizations& opti mizations) const {
53 const GrProcOptInfo& coveragePOI) c onst {
54 if (this->getXPFactory()) { 53 if (this->getXPFactory()) {
55 return this->getXPFactory()->willNeedDstTexture(caps, colorPOI, coverage POI, 54 return this->getXPFactory()->willNeedDstTexture(caps, optimizations,
56 this->hasMixedSamples()) ; 55 this->hasMixedSamples()) ;
57 } 56 }
58 return GrPorterDuffXPFactory::SrcOverWillNeedDstTexture(caps, colorPOI, cove ragePOI, 57 return GrPorterDuffXPFactory::SrcOverWillNeedDstTexture(caps, optimizations,
59 this->hasMixedSample s()); 58 this->hasMixedSample s());
60 } 59 }
61 60
62 void GrPipelineBuilder::AutoRestoreFragmentProcessorState::set( 61 void GrPipelineBuilder::AutoRestoreFragmentProcessorState::set(
63 const GrPipelineBuilder * pipelineBuilder) { 62 const GrPipelineBuilder * pipelineBuilder) {
64 if (fPipelineBuilder) { 63 if (fPipelineBuilder) {
65 int m = fPipelineBuilder->numColorFragmentProcessors() - fColorEffectCnt ; 64 int m = fPipelineBuilder->numColorFragmentProcessors() - fColorEffectCnt ;
66 SkASSERT(m >= 0); 65 SkASSERT(m >= 0);
67 for (int i = 0; i < m; ++i) { 66 for (int i = 0; i < m; ++i) {
68 fPipelineBuilder->fColorFragmentProcessors.fromBack(i)->unref(); 67 fPipelineBuilder->fColorFragmentProcessors.fromBack(i)->unref();
(...skipping 20 matching lines...) Expand all
89 88
90 GrPipelineBuilder::~GrPipelineBuilder() { 89 GrPipelineBuilder::~GrPipelineBuilder() {
91 SkASSERT(0 == fBlockEffectRemovalCnt); 90 SkASSERT(0 == fBlockEffectRemovalCnt);
92 for (int i = 0; i < fColorFragmentProcessors.count(); ++i) { 91 for (int i = 0; i < fColorFragmentProcessors.count(); ++i) {
93 fColorFragmentProcessors[i]->unref(); 92 fColorFragmentProcessors[i]->unref();
94 } 93 }
95 for (int i = 0; i < fCoverageFragmentProcessors.count(); ++i) { 94 for (int i = 0; i < fCoverageFragmentProcessors.count(); ++i) {
96 fCoverageFragmentProcessors[i]->unref(); 95 fCoverageFragmentProcessors[i]->unref();
97 } 96 }
98 } 97 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698