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

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

Issue 643743003: Create helper functions to use in computeInvariantOutput calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update blurMaskFilter Created 6 years, 2 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/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkBlurMaskFilter.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 2013 Google Inc. 2 * Copyright 2013 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.h" 8 #include "SkArithmeticMode.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 fEnforcePMColor == s.fEnforcePMColor && 339 fEnforcePMColor == s.fEnforcePMColor &&
340 backgroundTexture() == s.backgroundTexture(); 340 backgroundTexture() == s.backgroundTexture();
341 } 341 }
342 342
343 const GrBackendFragmentProcessorFactory& GrArithmeticEffect::getFactory() const { 343 const GrBackendFragmentProcessorFactory& GrArithmeticEffect::getFactory() const {
344 return GrTBackendFragmentProcessorFactory<GrArithmeticEffect>::getInstance() ; 344 return GrTBackendFragmentProcessorFactory<GrArithmeticEffect>::getInstance() ;
345 } 345 }
346 346
347 void GrArithmeticEffect::onComputeInvariantOutput(InvariantOutput* inout) const { 347 void GrArithmeticEffect::onComputeInvariantOutput(InvariantOutput* inout) const {
348 // TODO: optimize this 348 // TODO: optimize this
349 inout->fValidFlags = 0; 349 inout->setToUnknown();
350 inout->fIsSingleComponent = false;
351 } 350 }
352 351
353 /////////////////////////////////////////////////////////////////////////////// 352 ///////////////////////////////////////////////////////////////////////////////
354 353
355 GrGLArithmeticEffect::GrGLArithmeticEffect(const GrBackendProcessorFactory& fact ory, 354 GrGLArithmeticEffect::GrGLArithmeticEffect(const GrBackendProcessorFactory& fact ory,
356 const GrProcessor&) 355 const GrProcessor&)
357 : INHERITED(factory), 356 : INHERITED(factory),
358 fEnforcePMColor(true) { 357 fEnforcePMColor(true) {
359 } 358 }
360 359
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 background); 452 background);
454 } 453 }
455 return true; 454 return true;
456 } 455 }
457 456
458 #endif 457 #endif
459 458
460 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) 459 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode)
461 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) 460 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar)
462 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 461 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698