| OLD | NEW |
| 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 #include "SkPDFDevice.h" | 8 #include "SkPDFDevice.h" |
| 9 | 9 |
| 10 #include "SkAnnotation.h" | 10 #include "SkAnnotation.h" |
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 } | 994 } |
| 995 SkPDFUtils::EmitPath(*pathPtr, paint.getStyle(), | 995 SkPDFUtils::EmitPath(*pathPtr, paint.getStyle(), |
| 996 &content.entry()->fContent); | 996 &content.entry()->fContent); |
| 997 SkPDFUtils::PaintPath(paint.getStyle(), pathPtr->getFillType(), | 997 SkPDFUtils::PaintPath(paint.getStyle(), pathPtr->getFillType(), |
| 998 &content.entry()->fContent); | 998 &content.entry()->fContent); |
| 999 } | 999 } |
| 1000 | 1000 |
| 1001 void SkPDFDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, | 1001 void SkPDFDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, |
| 1002 const SkRect* src, const SkRect& dst, | 1002 const SkRect* src, const SkRect& dst, |
| 1003 const SkPaint& srcPaint, | 1003 const SkPaint& srcPaint, |
| 1004 SkCanvas::DrawBitmapRectFlags flags) { | 1004 SK_VIRTUAL_CONSTRAINT_TYPE) { |
| 1005 SkPaint paint = srcPaint; | 1005 SkPaint paint = srcPaint; |
| 1006 if (bitmap.isOpaque()) { | 1006 if (bitmap.isOpaque()) { |
| 1007 replace_srcmode_on_opaque_paint(&paint); | 1007 replace_srcmode_on_opaque_paint(&paint); |
| 1008 } | 1008 } |
| 1009 | 1009 |
| 1010 // TODO: this code path must be updated to respect the flags parameter | 1010 // TODO: this code path must be updated to respect the flags parameter |
| 1011 SkMatrix matrix; | 1011 SkMatrix matrix; |
| 1012 SkRect bitmapBounds, tmpSrc, tmpDst; | 1012 SkRect bitmapBounds, tmpSrc, tmpDst; |
| 1013 SkBitmap tmpBitmap; | 1013 SkBitmap tmpBitmap; |
| 1014 | 1014 |
| (...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2195 return; | 2195 return; |
| 2196 } | 2196 } |
| 2197 SkAutoTUnref<SkPDFObject> image(SkPDFBitmap::Create(fCanon, subsetBitmap)); | 2197 SkAutoTUnref<SkPDFObject> image(SkPDFBitmap::Create(fCanon, subsetBitmap)); |
| 2198 if (!image) { | 2198 if (!image) { |
| 2199 return; | 2199 return; |
| 2200 } | 2200 } |
| 2201 | 2201 |
| 2202 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()), | 2202 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()), |
| 2203 &content.entry()->fContent); | 2203 &content.entry()->fContent); |
| 2204 } | 2204 } |
| OLD | NEW |