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

Side by Side Diff: src/pdf/SkPDFDevice.cpp

Issue 1228083004: add src-rect-constraint to drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 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/pdf/SkPDFDevice.h ('k') | src/pipe/SkGPipePriv.h » ('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 #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
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
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 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.h ('k') | src/pipe/SkGPipePriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698