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

Side by Side Diff: src/core/SkConfig8888.h

Issue 180113010: Add SkCanvas::writePixels that takes info+pixels directly (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkDevice.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
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
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
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698