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

Side by Side Diff: src/opts/SkPMFloat_neon.h

Issue 1154523004: Everyone gets a namespace {}. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « src/opts/SkPMFloat_SSSE3.h ('k') | src/opts/SkPMFloat_none.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
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 namespace { // See SkPMFloat.h
9
8 // For SkPMFloat(SkPMFColor), we widen our 8 bit components (fix8) to 8-bit comp onents in 16 bits 10 // For SkPMFloat(SkPMFColor), we widen our 8 bit components (fix8) to 8-bit comp onents in 16 bits
9 // (fix8_16), then widen those to 8-bit-in-32-bits (fix8_32), and finally conver t those to floats. 11 // (fix8_16), then widen those to 8-bit-in-32-bits (fix8_32), and finally conver t those to floats.
10 12
11 // round() and roundClamp() do the opposite, working from floats to 8-bit-in-32- bit, 13 // round() and roundClamp() do the opposite, working from floats to 8-bit-in-32- bit,
12 // to 8-bit-in-16-bit, back down to 8-bit components. 14 // to 8-bit-in-16-bit, back down to 8-bit components.
13 // roundClamp() uses vqmovn to clamp while narrowing instead of just narrowing w ith vmovn. 15 // roundClamp() uses vqmovn to clamp while narrowing instead of just narrowing w ith vmovn.
14 16
15 inline SkPMFloat::SkPMFloat(SkPMColor c) { 17 inline SkPMFloat::SkPMFloat(SkPMColor c) {
16 SkPMColorAssert(c); 18 SkPMColorAssert(c);
17 uint8x8_t fix8 = (uint8x8_t)vdup_n_u32(c); 19 uint8x8_t fix8 = (uint8x8_t)vdup_n_u32(c);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 65 }
64 66
65 inline void SkPMFloat::RoundClampTo4PMColors( 67 inline void SkPMFloat::RoundClampTo4PMColors(
66 const SkPMFloat& a, const SkPMFloat& b, const SkPMFloat&c, const SkPMFlo at& d, 68 const SkPMFloat& a, const SkPMFloat& b, const SkPMFloat&c, const SkPMFlo at& d,
67 SkPMColor colors[4]) { 69 SkPMColor colors[4]) {
68 colors[0] = a.roundClamp(); 70 colors[0] = a.roundClamp();
69 colors[1] = b.roundClamp(); 71 colors[1] = b.roundClamp();
70 colors[2] = c.roundClamp(); 72 colors[2] = c.roundClamp();
71 colors[3] = d.roundClamp(); 73 colors[3] = d.roundClamp();
72 } 74 }
75
76 } // namespace
OLDNEW
« no previous file with comments | « src/opts/SkPMFloat_SSSE3.h ('k') | src/opts/SkPMFloat_none.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698