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

Side by Side Diff: src/core/SkColor.cpp

Issue 1642703003: starter procs for blending with pm4f (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: int to float Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkColor.h" 8 #include "SkColor.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkFixed.h" 10 #include "SkFixed.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 Sk4f dst = SkNx_shuffle<3,2,1,0>(src); 134 Sk4f dst = SkNx_shuffle<3,2,1,0>(src);
135 #else 135 #else
136 // ARGB -> RGBA 136 // ARGB -> RGBA
137 Sk4f dst = SkNx_shuffle<1,2,3,0>(src); 137 Sk4f dst = SkNx_shuffle<1,2,3,0>(src);
138 #endif 138 #endif
139 139
140 SkPM4f pm4; 140 SkPM4f pm4;
141 dst.store(pm4.fVec); 141 dst.store(pm4.fVec);
142 return pm4; 142 return pm4;
143 } 143 }
144
145 bool SkPM4f::isUnit() const {
mtklein 2016/01/29 15:23:00 If this is only used inside asserts, we may want t
reed1 2016/01/29 22:35:27 Gotcha. No idea if we'll need it for real, so for
146 auto c4 = Sk4f::Load(fVec);
147 return (c4 >= Sk4f(0)).allTrue() && (c4 <= Sk4f(1)).allTrue();
148 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698