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

Unified Diff: src/opts/SkPMFloat_none.h

Issue 977773002: Update SkPMFloat API a bit. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 32 Created 5 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 | « src/opts/SkPMFloat_neon.h ('k') | tests/PMFloatTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkPMFloat_none.h
diff --git a/src/opts/SkPMFloat_none.h b/src/opts/SkPMFloat_none.h
index b67c8d74204af282a07b5c6519503365acad8958..011ce07014851101dde45dbb34a1907e8c1796b9 100644
--- a/src/opts/SkPMFloat_none.h
+++ b/src/opts/SkPMFloat_none.h
@@ -1,10 +1,10 @@
#include "SkColorPriv.h"
-inline void SkPMFloat::set(SkPMColor c) {
- this->setA(SkGetPackedA32(c));
- this->setR(SkGetPackedR32(c));
- this->setG(SkGetPackedG32(c));
- this->setB(SkGetPackedB32(c));
+inline SkPMFloat::SkPMFloat(SkPMColor c) {
+ *this = SkPMFloat::FromARGB(SkGetPackedA32(c),
+ SkGetPackedR32(c),
+ SkGetPackedG32(c),
+ SkGetPackedB32(c));
SkASSERT(this->isValid());
}
« no previous file with comments | « src/opts/SkPMFloat_neon.h ('k') | tests/PMFloatTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698