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

Unified Diff: src/opts/SkPMFloat_none.h

Issue 1295873004: SkColorCubeFilter: require alpha == 0xFF. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: just perf Created 5 years, 4 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
Index: src/opts/SkPMFloat_none.h
diff --git a/src/opts/SkPMFloat_none.h b/src/opts/SkPMFloat_none.h
index 42446e6ac3195836c7cbae5300023804fc3f037d..c10e479f63c36302eba0d476b4d43a7ce443728e 100644
--- a/src/opts/SkPMFloat_none.h
+++ b/src/opts/SkPMFloat_none.h
@@ -34,7 +34,8 @@ inline Sk4f SkPMFloat::alphas() const {
return Sk4f(this->a());
}
-inline SkPMFloat SkPMFloat::FromBGRx(SkColor c) {
+inline SkPMFloat SkPMFloat::FromOpaqueColor(SkColor c) {
+ SkASSERT(SkColorGetA(c) == 0xFF);
float inv255 = 1.0f / 255;
SkPMFloat pmf = SkPMFloat::FromARGB(1.0f,
SkGetPackedR32(c) * inv255,

Powered by Google App Engine
This is Rietveld 408576698