Lines Matching full:srcrect
32 void extractImageData(const SkBitmap& bitmap, const SkIRect& srcRect,
42 const int rowBytes = srcRect.width();
43 image = new SkMemoryStream(rowBytes * srcRect.height());
45 for (int y = srcRect.fTop; y < srcRect.fBottom; y++) {
46 memcpy(dst, bitmap.getAddr8(srcRect.fLeft, y), rowBytes);
52 const int rowBytes = srcRect.width();
53 image = new SkMemoryStream(rowBytes * srcRect.height());
57 for (int y = srcRect.fTop; y < srcRect.fBottom; y++) {
58 SkPackBits::Unpack8(dst, srcRect.fLeft, rowBytes,
66 const int rowBytes = (srcRect.width() * 3 + 1) / 2;
67 const int alphaRowBytes = (srcRect.width() + 1) / 2;
68 image = new SkMemoryStream(rowBytes * srcRect.height());
69 alpha = new SkMemoryStream(alphaRowBytes * srcRect.height());
72 for (int y = srcRect.fTop; y < srcRect.fBottom; y++) {
75 for (x = srcRect.fLeft; x + 1 < srcRect.fRight; x += 2) {
91 if (srcRect.width() & 1) {
107 const int rowBytes = srcRect.width() * 3;
108 image = new SkMemoryStream(rowBytes * srcRect.height());
110 for (int y = srcRect.fTop; y < srcRect.fBottom; y++) {
112 for (int x = srcRect.fLeft; x < srcRect.fRight; x++) {
123 const int rowBytes = srcRect.width() * 3;
124 image = new SkMemoryStream(rowBytes * srcRect.height());
125 alpha = new SkMemoryStream(srcRect.width() * srcRect.height());
128 for (int y = srcRect.fTop; y < srcRect.fBottom; y++) {
130 for (int x = srcRect.fLeft; x < srcRect.fRight; x++) {
150 const int alphaRowBytes = (srcRect.width() + 7) / 8;
151 alpha = new SkMemoryStream(alphaRowBytes * srcRect.height());
153 int offset1 = srcRect.fLeft % 8;
155 for (int y = srcRect.fTop; y < srcRect.fBottom; y++) {
159 for (int x = srcRect.fLeft; x < srcRect.fRight; x += 8) {
166 if (x + 7 < srcRect.fRight && alphaDst[0] != 0xFF)
168 if (x + 7 < srcRect.fRight && alphaDst[0])
175 uint8_t mask = ~((1 << (8 - (srcRect.width() % 8))) - 1);
176 if (srcRect.width() % 8 && (alphaDst[-1] & mask) != mask)
178 if (srcRect.width() % 8 && (alphaDst[-1] & mask))
188 const int alphaRowBytes = srcRect.width();
189 alpha = new SkMemoryStream(alphaRowBytes * srcRect.height());
191 for (int y = srcRect.fTop; y < srcRect.fBottom; y++) {
193 for (int x = srcRect.fLeft; x < srcRect.fRight; x++) {
248 const SkIRect& srcRect,
255 extractImageData(bitmap, srcRect, &imageData, &alphaData);
264 new SkPDFImage(imageData, bitmap, srcRect, false, paint);
267 image->addSMask(new SkPDFImage(alphaData, bitmap, srcRect, true,
311 const SkIRect& srcRect, bool doingAlpha,
331 insert("Width", new SkPDFInt(srcRect.width()))->unref();
332 insert("Height", new SkPDFInt(srcRect.height()))->unref();