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

Unified Diff: src/core/SkUtils.h

Issue 1808963005: 4f linear gradient shader blitters (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: rename trunc_from_255 to quiet confused msvc Created 4 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 | « src/core/SkPixmap.cpp ('k') | src/core/SkXfermodeU64.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkUtils.h
diff --git a/src/core/SkUtils.h b/src/core/SkUtils.h
index 332ea8da7e48ab6b4bcc25d72475c6f0b0c6c807..26f19e6906310cb7456dedb779ae8b2adcf7ff51 100644
--- a/src/core/SkUtils.h
+++ b/src/core/SkUtils.h
@@ -32,6 +32,16 @@ static inline void sk_memset32(uint32_t buffer[], uint32_t value, int count) {
}
}
+/** Similar to memset(), but it assigns a 64bit value into the buffer.
+ @param buffer The memory to have value copied into it
+ @param value The 64bit value to be copied into buffer
+ @param count The number of times value should be copied into the buffer.
+*/
+static inline void sk_memset64(uint64_t buffer[], uint64_t value, int count) {
+ for (int i = 0; i < count; i++) {
+ buffer[i] = value;
+ }
+}
///////////////////////////////////////////////////////////////////////////////
#define kMaxBytesInUTF8Sequence 4
« no previous file with comments | « src/core/SkPixmap.cpp ('k') | src/core/SkXfermodeU64.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698