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

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

Issue 390693002: Add SkBitmap::readPixels() and reimplement copyTo and SkCanvas::readPixels (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkConfig8888.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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 SkPixelInfo_DEFINED 8 #ifndef SkPixelInfo_DEFINED
9 #define SkPixelInfo_DEFINED 9 #define SkPixelInfo_DEFINED
10 10
11 #include "SkImageInfo.h" 11 #include "SkImageInfo.h"
12 12
13 struct SkPixelInfo { 13 struct SkPixelInfo {
14 SkColorType fColorType; 14 SkColorType fColorType;
15 SkAlphaType fAlphaType; 15 SkAlphaType fAlphaType;
16 size_t fRowBytes; 16 size_t fRowBytes;
17
18 static bool CopyPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t d stRowBytes,
19 const SkImageInfo& srcInfo, const void* srcPixels, si ze_t srcRowBytes,
20 SkColorTable* srcCTable = NULL);
17 }; 21 };
18 22
19 struct SkDstPixelInfo : SkPixelInfo { 23 struct SkDstPixelInfo : SkPixelInfo {
20 void* fPixels; 24 void* fPixels;
21 }; 25 };
22 26
23 struct SkSrcPixelInfo : SkPixelInfo { 27 struct SkSrcPixelInfo : SkPixelInfo {
24 const void* fPixels; 28 const void* fPixels;
25 29
26 // Guaranteed to work even if src.fPixels and dst.fPixels are the same 30 // Guaranteed to work even if src.fPixels and dst.fPixels are the same
27 // (but not if they overlap partially) 31 // (but not if they overlap partially)
28 bool convertPixelsTo(SkDstPixelInfo* dst, int width, int height) const; 32 bool convertPixelsTo(SkDstPixelInfo* dst, int width, int height) const;
29 }; 33 };
30 34
31 #endif 35 #endif
OLDNEW
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkConfig8888.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698