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

Unified Diff: include/core/SkXfermode.h

Issue 1707883002: lcd blits for sRGB (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more clarity on names/docs for new flags Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkBlitter_PM4f.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkXfermode.h
diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h
index 21d77f874768bcf03ef28607285377b55ab2b045..3b0f49d22e12a70a2210b82cfd0e736ae55f6cb5 100644
--- a/include/core/SkXfermode.h
+++ b/include/core/SkXfermode.h
@@ -248,6 +248,16 @@ public:
static U64Proc1 GetU64Proc1(Mode, uint32_t flags);
static U64ProcN GetU64ProcN(Mode, uint32_t flags);
+ enum LCDFlags {
+ kSrcIsOpaque_LCDFlag = 1 << 0, // else src(s) may have alpha < 1
+ kSrcIsSingle_LCDFlag = 1 << 1, // else src[count]
+ kDstIsLinearInt_LCDFlag = 1 << 2, // else srgb/half-float
mtklein 2016/02/18 16:10:20 Ah, IsLinearInt -> u32 == 8888, u64 = 16161616
+ };
+ typedef void (*LCD32Proc)(uint32_t* dst, const SkPM4f* src, int count, const uint16_t lcd[]);
+ typedef void (*LCD64Proc)(uint64_t* dst, const SkPM4f* src, int count, const uint16_t lcd[]);
+ static LCD32Proc GetLCD32Proc(uint32_t flags);
+ static LCD64Proc GetLCD64Proc(uint32_t) { return nullptr; }
+
protected:
SkXfermode() {}
/** The default implementation of xfer32/xfer16/xferA8 in turn call this
« no previous file with comments | « no previous file | src/core/SkBlitter_PM4f.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698