aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkUtils.h
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2016-03-18 10:28:23 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-18 10:28:23 -0700
commita928b288b3001eb34cc3c9caedbaac9a403b05ed (patch)
treeefcad4a3e3f3a8fccf768a3796595cfa73638ab5 /src/core/SkUtils.h
parentf28ad894272018fd2855e3f77ea1236ea0cce1c0 (diff)
4f linear gradient shader blitters
Add F16 specializations to support writing to half-float dests. Add color profile template arg across the board to support writing to sRGB dests. R=reed@google.com,mtklein@google.com,herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1808963005 Review URL: https://codereview.chromium.org/1808963005
Diffstat (limited to 'src/core/SkUtils.h')
-rw-r--r--src/core/SkUtils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/SkUtils.h b/src/core/SkUtils.h
index 332ea8da7e..26f19e6906 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