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

Side by Side Diff: include/core/SkShader.h

Issue 1347943003: Replace GrExtractAlphaFragmentProcessor with DstIn compose processor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « gyp/gpu.gypi ('k') | include/gpu/effects/GrExtractAlphaFragmentProcessor.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 #ifndef SkShader_DEFINED 8 #ifndef SkShader_DEFINED
9 #define SkShader_DEFINED 9 #define SkShader_DEFINED
10 10
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 virtual Context* onCreateContext(const ContextRec&, void* storage) const; 425 virtual Context* onCreateContext(const ContextRec&, void* storage) const;
426 426
427 virtual bool onAsLuminanceColor(SkColor*) const { 427 virtual bool onAsLuminanceColor(SkColor*) const {
428 return false; 428 return false;
429 } 429 }
430 430
431 virtual bool onIsABitmap(SkBitmap*, SkMatrix*, TileMode[2]) const { 431 virtual bool onIsABitmap(SkBitmap*, SkMatrix*, TileMode[2]) const {
432 return false; 432 return false;
433 } 433 }
434 434
435 /**
436 * A helper for asFragmentProcessor() implementations. Many implementations want to compute
437 * a color in a FP and then multiply that color by the incoming color's (us ually paint color's)
438 * alpha, ignoring the incoming r,g,b. This wraps a FP in a parent FP that does exactly that.
439 * There will be no input color to the wrapped FP.
440 */
441 static const GrFragmentProcessor* MulFragmentProcesorOuputByInputAlpha(
reed1 2015/09/16 13:34:27 Curious why this is on shader, and not on GrFragme
bsalomon 2015/09/21 15:29:50 Done.
442 const GrFragmentProcessor*);
443
435 private: 444 private:
436 // This is essentially const, but not officially so it can be modified in 445 // This is essentially const, but not officially so it can be modified in
437 // constructors. 446 // constructors.
438 SkMatrix fLocalMatrix; 447 SkMatrix fLocalMatrix;
439 448
440 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. 449 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor.
441 friend class SkLocalMatrixShader; 450 friend class SkLocalMatrixShader;
442 friend class SkBitmapProcShader; // for computeTotalInverse() 451 friend class SkBitmapProcShader; // for computeTotalInverse()
443 452
444 typedef SkFlattenable INHERITED; 453 typedef SkFlattenable INHERITED;
445 }; 454 };
446 455
447 #endif 456 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/effects/GrExtractAlphaFragmentProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698