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

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

Issue 912413002: Pass in ProcOptInfos into willNeedDstCopy on XPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Review 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/effects/SkArithmeticMode_gpu.h ('k') | src/gpu/GrDrawTarget.h » ('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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 GrProcOptInfo& colorPOI, 307 GrArithmeticXPFactory::onCreateXferProcessor(const GrProcOptInfo& colorPOI,
308 const GrProcOptInfo& coveragePOI, 308 const GrProcOptInfo& coveragePOI,
309 const GrDeviceCoordTexture* dstCopy ) const { 309 const GrDeviceCoordTexture* dstCopy ) const {
310 return ArithmeticXP::Create(fK1, fK2, fK3, fK4, fEnforcePMColor, dstCopy, 310 return ArithmeticXP::Create(fK1, fK2, fK3, fK4, fEnforcePMColor, dstCopy,
311 this->willReadDstColor()); 311 this->willReadDstColor(colorPOI, coveragePOI));
312 } 312 }
313 313
314 314
315 void GrArithmeticXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI, 315 void GrArithmeticXPFactory::getInvariantOutput(const GrProcOptInfo& colorPOI,
316 const GrProcOptInfo& coveragePOI, 316 const GrProcOptInfo& coveragePOI,
317 GrXPFactory::InvariantOutput* out put) const { 317 GrXPFactory::InvariantOutput* out put) const {
318 output->fWillBlendWithDst = true; 318 output->fWillBlendWithDst = true;
319 319
320 // 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
321 // 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
332 float k1 = random->nextF(); 332 float k1 = random->nextF();
333 float k2 = random->nextF(); 333 float k2 = random->nextF();
334 float k3 = random->nextF(); 334 float k3 = random->nextF();
335 float k4 = random->nextF(); 335 float k4 = random->nextF();
336 bool enforcePMColor = random->nextBool(); 336 bool enforcePMColor = random->nextBool();
337 337
338 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor); 338 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor);
339 } 339 }
340 340
341 #endif 341 #endif
OLDNEW
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698