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

Side by Side Diff: experimental/c_salt/image-inl.h

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 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 | « experimental/c_salt/image.h ('k') | experimental/c_salt/instance.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2010 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4
5 #ifndef C_SALT_IMAGE_INL_H_
6 #define C_SALT_IMAGE_INL_H_
7
8 #include <stdint.h>
9
10 namespace c_salt {
11 #define INLINE_NO_INSTRUMENT \
12 __attribute__((no_instrument_function, always_inline))
13
14 // build a packed color
15 INLINE_NO_INSTRUMENT
16 uint32_t MakeARGB(uint8_t r, uint8_t g, uint8_t b, uint8_t a);
17 inline uint32_t MakeARGB(uint8_t r, uint8_t g, uint8_t b, uint8_t a) {
18 return (((a) << 24) | ((r) << 16) | ((g) << 8) | (b));
19 }
20
21 // extract R, G, B, A from packed color
22 INLINE_NO_INSTRUMENT int ExtractR(uint32_t c);
23 inline int ExtractR(uint32_t c) {
24 return (c >> 16) & 0xFF;
25 }
26
27 INLINE_NO_INSTRUMENT int ExtractG(uint32_t c);
28 inline int ExtractG(uint32_t c) {
29 return (c >> 8) & 0xFF;
30 }
31
32 INLINE_NO_INSTRUMENT int ExtractB(uint32_t c);
33 inline int ExtractB(uint32_t c) {
34 return c & 0xFF;
35 }
36
37 INLINE_NO_INSTRUMENT int ExtractA(uint32_t c);
38 inline int ExtractA(uint32_t c) {
39 return (c >> 24) & 0xFF;
40 }
41 #undef INLINE_NO_INSTRUMENT
42 } // namespace c_salt
43
44 #endif // C_SALT_IMAGE_INL_H_
OLDNEW
« no previous file with comments | « experimental/c_salt/image.h ('k') | experimental/c_salt/instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698