Home | History | Annotate | Download | only in images

Lines Matching refs:src

53 SkPixelRef* SkCreateRLEPixelRef(const SkBitmap& src);
54 SkPixelRef* SkCreateRLEPixelRef(const SkBitmap& src) {
56 if (SkBitmap::kIndex8_Config != src.config() &&
57 SkBitmap::kA8_Config != src.config()) {
61 size_t maxPacked = SkPackBits::ComputeMaxSize8(src.width());
64 size_t size = src.getSize() >> 3;
70 (src.width(), src.height(), size));
76 for (int y = 0; y < src.height(); y++) {
77 const uint8_t* srcRow = src.getAddr8(0, y);
83 size_t packedSize = SkPackBits::Pack8(srcRow, src.width(), dstRow);
96 uint8_t* buffer = new uint8_t[src.width()];
97 for (int y = 0; y < src.height(); y++) {
98 const uint8_t* srcRow = src.getAddr8(0, y);
99 SkPackBits::Unpack8(buffer, 0, src.width(), rlePixels->packedAtY(y));
100 int n = memcmp(buffer, srcRow, src.width());
108 size_t totalAlloc = src.height() * sizeof(uint8_t*) + totalPacked;
111 src.width(), src.height(), src.getSize(),
112 src.height() * sizeof(uint8_t*), totalPacked,
113 (float)totalAlloc / src.getSize());
118 return SkNEW_ARGS(RLEPixelRef, (rlePixels, src.getColorTable()));