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

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

Issue 923153003: Revert of Use dst copies in porter duffer XP to correctly render certain blends. (Closed) Base URL: https://skia.googlesource.com/skia.git@prePDDstCopy
Patch Set: 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/effects/SkArithmeticMode_gpu.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 "SkArithmeticMode_gpu.h" 8 #include "SkArithmeticMode_gpu.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 /////////////////////////////////////////////////////////////////////////////// 298 ///////////////////////////////////////////////////////////////////////////////
299 299
300 GrArithmeticXPFactory::GrArithmeticXPFactory(float k1, float k2, float k3, float k4, 300 GrArithmeticXPFactory::GrArithmeticXPFactory(float k1, float k2, float k3, float k4,
301 bool enforcePMColor) 301 bool enforcePMColor)
302 : fK1(k1), fK2(k2), fK3(k3), fK4(k4), fEnforcePMColor(enforcePMColor) { 302 : fK1(k1), fK2(k2), fK3(k3), fK4(k4), fEnforcePMColor(enforcePMColor) {
303 this->initClassID<GrArithmeticXPFactory>(); 303 this->initClassID<GrArithmeticXPFactory>();
304 } 304 }
305 305
306 GrXferProcessor* 306 GrXferProcessor*
307 GrArithmeticXPFactory::onCreateXferProcessor(const GrDrawTargetCaps& caps, 307 GrArithmeticXPFactory::onCreateXferProcessor(const GrProcOptInfo& colorPOI,
308 const GrProcOptInfo& colorPOI,
309 const GrProcOptInfo& coveragePOI, 308 const GrProcOptInfo& coveragePOI,
310 const GrDeviceCoordTexture* dstCopy ) const { 309 const GrDeviceCoordTexture* dstCopy ) const {
311 return ArithmeticXP::Create(fK1, fK2, fK3, fK4, fEnforcePMColor, dstCopy, 310 return ArithmeticXP::Create(fK1, fK2, fK3, fK4, fEnforcePMColor, dstCopy,
312 this->willReadDstColor(caps, colorPOI, coverageP OI)); 311 this->willReadDstColor(colorPOI, coveragePOI));
313 } 312 }
314 313
315 314
316 void GrArithmeticXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI, 315 void GrArithmeticXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI,
317 const GrProcOptInfo& coveragePOI, 316 const GrProcOptInfo& coveragePOI,
318 GrXPFactory::InvariantOutput* out put) const { 317 GrXPFactory::InvariantOutput* out put) const {
319 output->fWillBlendWithDst = true; 318 output->fWillBlendWithDst = true;
320 319
321 // TODO: We could try to optimize this more. For example if we have solid co verage and fK1 and 320 // TODO: We could try to optimize this more. For example if we have solid co verage and fK1 and
322 // fK3 are zero, then we won't be blending the color with dst at all so we c an know what the 321 // fK3 are zero, then we won't be blending the color with dst at all so we c an know what the
(...skipping 10 matching lines...) Expand all
333 float k1 = random->nextF(); 332 float k1 = random->nextF();
334 float k2 = random->nextF(); 333 float k2 = random->nextF();
335 float k3 = random->nextF(); 334 float k3 = random->nextF();
336 float k4 = random->nextF(); 335 float k4 = random->nextF();
337 bool enforcePMColor = random->nextBool(); 336 bool enforcePMColor = random->nextBool();
338 337
339 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor); 338 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor);
340 } 339 }
341 340
342 #endif 341 #endif
OLDNEW
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.h ('k') | src/gpu/GrXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698