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

Unified Diff: src/animator/SkDrawColor.cpp

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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/animator/SkDrawColor.cpp
diff --git a/src/animator/SkDrawColor.cpp b/src/animator/SkDrawColor.cpp
index b6bc261d718167b56a3ee590f891bc715084612d..00c429b5a1842132fdc48f604155a99b96d40c23 100644
--- a/src/animator/SkDrawColor.cpp
+++ b/src/animator/SkDrawColor.cpp
@@ -226,11 +226,7 @@ bool SkDrawColor::setProperty(int index, SkScriptValue& value) {
switch (index) {
case SK_PROPERTY(alpha):
uint8_t alpha;
- #ifdef SK_SCALAR_IS_FLOAT
alpha = scalar == SK_Scalar1 ? 255 : SkToU8((U8CPU) (scalar * 256));
- #else
- alpha = SkToU8((scalar - (scalar >= SK_ScalarHalf)) >> 8);
- #endif
color = SkColorSetARGB(alpha, SkColorGetR(color),
SkColorGetG(color), SkColorGetB(color));
break;

Powered by Google App Engine
This is Rietveld 408576698