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

Unified Diff: include/core/SkXfermode.h

Issue 13314002: Add support for reading the dst pixel value in an effect. Use in a new effect for the kDarken xfer … (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Revert whitespace/comment changes accidentally made in GrGLProgramDesc.cpp Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/gpu/GrEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkXfermode.h
===================================================================
--- include/core/SkXfermode.h (revision 8448)
+++ include/core/SkXfermode.h (working copy)
@@ -188,16 +188,24 @@
src, and dst must all be NULL or all non-NULL. If effect is non-NULL then the xfermode may
optionally allocate an effect to return and the caller as *effect. The caller will install
it and own a ref to it. Since the xfermode may or may not assign *effect, the caller should
- set *effect to NULL beforehand. If the function returns true then the src and dst coeffs
- will be applied to the draw regardless of whether an effect was returned.
+ set *effect to NULL beforehand. If the function returns true and *effect is NULL then the
+ src and dst coeffs will be applied to the draw. When *effect is non-NULL the coeffs are
+ ignored.
*/
- virtual bool asNewEffect(GrContext*, GrEffectRef** effect, Coeff* src, Coeff* dst) const;
+ virtual bool asNewEffectOrCoeff(GrContext*,
+ GrEffectRef** effect,
+ Coeff* src,
+ Coeff* dst) const;
/**
* The same as calling xfermode->asNewEffect(...), except that this also checks if the xfermode
* is NULL, and if so, treats it as kSrcOver_Mode.
*/
- static bool AsNewEffect(SkXfermode*, GrContext*, GrEffectRef** effect, Coeff* src, Coeff* dst);
+ static bool AsNewEffectOrCoeff(SkXfermode*,
+ GrContext*,
+ GrEffectRef** effect,
+ Coeff* src,
+ Coeff* dst);
SkDEVCODE(virtual void toString(SkString* str) const = 0;)
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
« no previous file with comments | « no previous file | include/gpu/GrEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698