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

Side by Side Diff: src/codec/SkCodecPriv.h

Issue 1256763003: Remove sk_memcpy32 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | « include/core/SkUtils.h ('k') | src/core/SkBlitRow_D32.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 * Copyright 2015 The Android Open Source Project 2 * Copyright 2015 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 #ifndef SkCodecPriv_DEFINED 8 #ifndef SkCodecPriv_DEFINED
9 #define SkCodecPriv_DEFINED 9 #define SkCodecPriv_DEFINED
10 10
(...skipping 23 matching lines...) Expand all
34 * 34 *
35 * Copy the codec color table back to the client when kIndex8 color type is requ ested 35 * Copy the codec color table back to the client when kIndex8 color type is requ ested
36 * 36 *
37 */ 37 */
38 static inline void copy_color_table(const SkImageInfo& dstInfo, SkColorTable* co lorTable, 38 static inline void copy_color_table(const SkImageInfo& dstInfo, SkColorTable* co lorTable,
39 SkPMColor* inputColorPtr, int* inputColorCount) { 39 SkPMColor* inputColorPtr, int* inputColorCount) {
40 if (kIndex_8_SkColorType == dstInfo.colorType()) { 40 if (kIndex_8_SkColorType == dstInfo.colorType()) {
41 SkASSERT(NULL != inputColorPtr); 41 SkASSERT(NULL != inputColorPtr);
42 SkASSERT(NULL != inputColorCount); 42 SkASSERT(NULL != inputColorCount);
43 SkASSERT(NULL != colorTable); 43 SkASSERT(NULL != colorTable);
44 sk_memcpy32(inputColorPtr, colorTable->readColors(), *inputColorCount); 44 memcpy(inputColorPtr, colorTable->readColors(), *inputColorCount * 4);
45 } 45 }
46 } 46 }
47 47
48 /* 48 /*
49 * 49 *
50 * Compute row bytes for an image using pixels per byte 50 * Compute row bytes for an image using pixels per byte
51 * 51 *
52 */ 52 */
53 static inline size_t compute_row_bytes_ppb(int width, uint32_t pixelsPerByte) { 53 static inline size_t compute_row_bytes_ppb(int width, uint32_t pixelsPerByte) {
54 return (width + pixelsPerByte - 1) / pixelsPerByte; 54 return (width + pixelsPerByte - 1) / pixelsPerByte;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 #endif 122 #endif
123 } 123 }
124 124
125 #ifdef SK_PRINT_CODEC_MESSAGES 125 #ifdef SK_PRINT_CODEC_MESSAGES
126 #define SkCodecPrintf SkDebugf 126 #define SkCodecPrintf SkDebugf
127 #else 127 #else
128 #define SkCodecPrintf(...) 128 #define SkCodecPrintf(...)
129 #endif 129 #endif
130 130
131 #endif // SkCodecPriv_DEFINED 131 #endif // SkCodecPriv_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkUtils.h ('k') | src/core/SkBlitRow_D32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698