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/effects/SkLumaXfermode.h

Issue 24078006: In order to use CSS luminance masking, we need to be able to create an instance of SkLumaXfermode w… (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/lumamode.cpp ('k') | src/effects/SkLumaXfermode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkLumaXfermode.h
===================================================================
--- include/effects/SkLumaXfermode.h (revision 11192)
+++ include/effects/SkLumaXfermode.h (working copy)
@@ -47,12 +47,22 @@
SkLumaMaskXfermode(SkFlattenableReadBuffer&);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
-private:
SkLumaMaskXfermode(SkXfermode::Mode);
+private:
const SkXfermode::Mode fMode;
typedef SkXfermode INHERITED;
+
+ virtual SkPMColor lumaProc(const SkPMColor a, const SkPMColor b) const;
};
+class SkLumaMaskXfermodeSrcOver : public SkLumaMaskXfermode {
reed1 2013/09/13 12:44:49 Lets not make any of the subclasses public. Can al
+ SkLumaMaskXfermodeSrcOver();
+
+ friend class SkLumaMaskXfermode;
+
+ virtual SkPMColor lumaProc(const SkPMColor a, const SkPMColor b) const;
+};
+
#endif
« no previous file with comments | « gm/lumamode.cpp ('k') | src/effects/SkLumaXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698