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

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

Issue 1197713003: Move rect_memcopy from helper to global static. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | 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
(...skipping 16 matching lines...) Expand all
27 }; 27 };
28 28
29 struct SkSrcPixelInfo : SkPixelInfo { 29 struct SkSrcPixelInfo : SkPixelInfo {
30 const void* fPixels; 30 const void* fPixels;
31 31
32 // Guaranteed to work even if src.fPixels and dst.fPixels are the same 32 // Guaranteed to work even if src.fPixels and dst.fPixels are the same
33 // (but not if they overlap partially) 33 // (but not if they overlap partially)
34 bool convertPixelsTo(SkDstPixelInfo* dst, int width, int height) const; 34 bool convertPixelsTo(SkDstPixelInfo* dst, int width, int height) const;
35 }; 35 };
36 36
37 static inline void SkRectMemcpy(void* dst, size_t dstRB, const void* src, size_t srcRB,
38 size_t bytesPerRow, int rowCount) {
39 SkASSERT(bytesPerRow <= srcRB);
40 SkASSERT(bytesPerRow <= dstRB);
41 for (int i = 0; i < rowCount; ++i) {
42 memcpy(dst, src, bytesPerRow);
43 dst = (char*)dst + dstRB;
44 src = (const char*)src + srcRB;
45 }
46 }
47
37 #endif 48 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkConfig8888.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698