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

Side by Side Diff: include/core/SkUnPreMultiply.h

Issue 130303005: Factor out UnPreMultiplyPreservingByteOrder (Closed) Base URL: https://skia.googlesource.com/skia.git@dm-r
Patch Set: Created 6 years, 11 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 | « dm/DMWriteTask.cpp ('k') | src/core/SkUnPreMultiply.cpp » ('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 /* 2 /*
3 * Copyright 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // now red is unpremultiplied 42 // now red is unpremultiplied
43 } 43 }
44 */ 44 */
45 static U8CPU ApplyScale(Scale scale, U8CPU component) { 45 static U8CPU ApplyScale(Scale scale, U8CPU component) {
46 SkASSERT(component <= 255); 46 SkASSERT(component <= 255);
47 return (scale * component + (1 << 23)) >> 24; 47 return (scale * component + (1 << 23)) >> 24;
48 } 48 }
49 49
50 static SkColor PMColorToColor(SkPMColor c); 50 static SkColor PMColorToColor(SkPMColor c);
51 51
52 static uint32_t UnPreMultiplyPreservingByteOrder(SkPMColor c);
53
52 private: 54 private:
53 static const uint32_t gTable[256]; 55 static const uint32_t gTable[256];
54 }; 56 };
55 57
56 #endif 58 #endif
OLDNEW
« no previous file with comments | « dm/DMWriteTask.cpp ('k') | src/core/SkUnPreMultiply.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698