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

Side by Side Diff: src/gpu/effects/GrXfermodeFragmentProcessor.cpp

Issue 1314923002: GLProgramsTest can now randomly create a tree of GrFragmentProcessors instead of a linear pipeline (Closed) Base URL: https://skia.googlesource.com/skia@cs3_testcreate
Patch Set: removed warnings Created 5 years, 3 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 | « no previous file | tests/GLProgramsTest.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 "effects/GrXfermodeFragmentProcessor.h" 8 #include "effects/GrXfermodeFragmentProcessor.h"
9 9
10 #include "GrFragmentProcessor.h" 10 #include "GrFragmentProcessor.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 140 }
141 141
142 142
143 const GrFragmentProcessor* GrXfermodeFragmentProcessor::CreateFromTwoProcessors( 143 const GrFragmentProcessor* GrXfermodeFragmentProcessor::CreateFromTwoProcessors(
144 const GrFragmentProcessor* src, const GrFragmentProcessor* dst, SkXferm ode::Mode mode) { 144 const GrFragmentProcessor* src, const GrFragmentProcessor* dst, SkXferm ode::Mode mode) {
145 if (SkXfermode::kLastCoeffMode < mode) { 145 if (SkXfermode::kLastCoeffMode < mode) {
146 return nullptr; 146 return nullptr;
147 } 147 }
148 switch (mode) { 148 switch (mode) {
149 case SkXfermode::kClear_Mode: 149 case SkXfermode::kClear_Mode:
150 SkDebugf("CreateFromTwoProcessors() should not be used with kClear_M ode. "
151 "Use GrConstColorProcessor.\n");
152 return GrConstColorProcessor::Create(GrColor_TRANS_BLACK, 150 return GrConstColorProcessor::Create(GrColor_TRANS_BLACK,
153 GrConstColorProcessor::kIgnore_ InputMode); 151 GrConstColorProcessor::kIgnore_ InputMode);
154 break; 152 break;
155 case SkXfermode::kSrc_Mode: 153 case SkXfermode::kSrc_Mode:
156 SkDebugf("CreateFromTwoProcessors() should not be used with kSrc_Mod e. "
157 "Use the src processor directly.\n");
158 return SkRef(src); 154 return SkRef(src);
159 break; 155 break;
160 case SkXfermode::kDst_Mode: 156 case SkXfermode::kDst_Mode:
161 SkDebugf("CreateFromTwoProcessors() should not be used with kDst_Mod e. "
162 "Use the dst processor directly.\n");
163 return SkRef(dst); 157 return SkRef(dst);
164 break; 158 break;
165 default: 159 default:
166 return new GrComposeTwoFragmentProcessor(src, dst, mode); 160 return new GrComposeTwoFragmentProcessor(src, dst, mode);
167 } 161 }
168 } 162 }
OLDNEW
« no previous file with comments | « no previous file | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698