OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
4 * | 3 * |
5 * 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 |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
8 | 7 |
| 8 #ifndef SkConfig8888_DEFINED |
| 9 #define SkConfig8888_DEFINED |
9 | 10 |
10 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
11 #include "SkColorPriv.h" | 12 #include "SkColorPriv.h" |
12 | 13 |
13 /** | 14 /** |
14 * Converts pixels from one Config8888 to another Config8888 | 15 * Converts pixels from one Config8888 to another Config8888 |
15 */ | 16 */ |
16 void SkConvertConfig8888Pixels(uint32_t* dstPixels, | 17 void SkConvertConfig8888Pixels(uint32_t* dstPixels, |
17 size_t dstRowBytes, | 18 size_t dstRowBytes, |
18 SkCanvas::Config8888 dstConfig, | 19 SkCanvas::Config8888 dstConfig, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 SkAutoLockPixels alp(dstBmp); | 68 SkAutoLockPixels alp(dstBmp); |
68 int w = dstBmp.width(); | 69 int w = dstBmp.width(); |
69 int h = dstBmp.height(); | 70 int h = dstBmp.height(); |
70 size_t dstRowBytes = dstBmp.rowBytes(); | 71 size_t dstRowBytes = dstBmp.rowBytes(); |
71 uint32_t* dstPixels = reinterpret_cast<uint32_t*>(dstBmp.getPixels()); | 72 uint32_t* dstPixels = reinterpret_cast<uint32_t*>(dstBmp.getPixels()); |
72 | 73 |
73 SkConvertConfig8888Pixels(dstPixels, dstRowBytes, SkCanvas::kNative_Premul_C
onfig8888, srcPixels, srcRowBytes, srcConfig8888, w, h); | 74 SkConvertConfig8888Pixels(dstPixels, dstRowBytes, SkCanvas::kNative_Premul_C
onfig8888, srcPixels, srcRowBytes, srcConfig8888, w, h); |
74 } | 75 } |
75 | 76 |
76 } | 77 } |
| 78 |
| 79 #endif |
OLD | NEW |