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

Side by Side Diff: src/effects/SkArithmeticMode_gpu.cpp

Issue 1049143002: Add onGetBlendInfo to GrXferProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_nvbea_tokens
Patch Set: rebase Created 5 years, 8 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 | « include/gpu/GrXferProcessor.h ('k') | src/gpu/GrPipeline.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 "SkArithmeticMode_gpu.h" 8 #include "SkArithmeticMode_gpu.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 GrGLXferProcessor* createGLInstance() const override; 174 GrGLXferProcessor* createGLInstance() const override;
175 175
176 bool hasSecondaryOutput() const override { return false; } 176 bool hasSecondaryOutput() const override { return false; }
177 177
178 GrXferProcessor::OptFlags getOptimizations(const GrProcOptInfo& colorPOI, 178 GrXferProcessor::OptFlags getOptimizations(const GrProcOptInfo& colorPOI,
179 const GrProcOptInfo& coveragePOI, 179 const GrProcOptInfo& coveragePOI,
180 bool doesStencilWrite, 180 bool doesStencilWrite,
181 GrColor* overrideColor, 181 GrColor* overrideColor,
182 const GrDrawTargetCaps& caps) ove rride; 182 const GrDrawTargetCaps& caps) ove rride;
183 183
184 void getBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override {
185 blendInfo->fSrcBlend = kOne_GrBlendCoeff;
186 blendInfo->fDstBlend = kZero_GrBlendCoeff;
187 blendInfo->fBlendConstant = 0;
188 }
189
190 float k1() const { return fK1; } 184 float k1() const { return fK1; }
191 float k2() const { return fK2; } 185 float k2() const { return fK2; }
192 float k3() const { return fK3; } 186 float k3() const { return fK3; }
193 float k4() const { return fK4; } 187 float k4() const { return fK4; }
194 bool enforcePMColor() const { return fEnforcePMColor; } 188 bool enforcePMColor() const { return fEnforcePMColor; }
195 189
196 private: 190 private:
197 ArithmeticXP(float k1, float k2, float k3, float k4, bool enforcePMColor, 191 ArithmeticXP(float k1, float k2, float k3, float k4, bool enforcePMColor,
198 const GrDeviceCoordTexture* dstCopy, bool willReadDstColor); 192 const GrDeviceCoordTexture* dstCopy, bool willReadDstColor);
199 193
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 float k1 = random->nextF(); 327 float k1 = random->nextF();
334 float k2 = random->nextF(); 328 float k2 = random->nextF();
335 float k3 = random->nextF(); 329 float k3 = random->nextF();
336 float k4 = random->nextF(); 330 float k4 = random->nextF();
337 bool enforcePMColor = random->nextBool(); 331 bool enforcePMColor = random->nextBool();
338 332
339 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor); 333 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor);
340 } 334 }
341 335
342 #endif 336 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrXferProcessor.h ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698