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

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

Issue 1239193002: remove all guards for changes to drawBitmapRect / drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 4 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/SkGPipeWrite.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 #include "SkPDFDevice.h" 8 #include "SkPDFDevice.h"
9 9
10 #include "SkAnnotation.h" 10 #include "SkAnnotation.h"
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 return; 1085 return;
1086 } 1086 }
1087 SkPDFUtils::EmitPath(*pathPtr, paint.getStyle(), 1087 SkPDFUtils::EmitPath(*pathPtr, paint.getStyle(),
1088 &content.entry()->fContent); 1088 &content.entry()->fContent);
1089 SkPDFUtils::PaintPath(paint.getStyle(), pathPtr->getFillType(), 1089 SkPDFUtils::PaintPath(paint.getStyle(), pathPtr->getFillType(),
1090 &content.entry()->fContent); 1090 &content.entry()->fContent);
1091 } 1091 }
1092 1092
1093 void SkPDFDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap, 1093 void SkPDFDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
1094 const SkRect* src, const SkRect& dst, 1094 const SkRect* src, const SkRect& dst,
1095 const SkPaint& srcPaint, 1095 const SkPaint& srcPaint, SkCanvas::SrcRectConst raint constraint) {
1096 SK_VIRTUAL_CONSTRAINT_TYPE) {
1097 SkPaint paint = srcPaint; 1096 SkPaint paint = srcPaint;
1098 if (bitmap.isOpaque()) { 1097 if (bitmap.isOpaque()) {
1099 replace_srcmode_on_opaque_paint(&paint); 1098 replace_srcmode_on_opaque_paint(&paint);
1100 } 1099 }
1101 1100
1102 // TODO: this code path must be updated to respect the flags parameter 1101 // TODO: this code path must be updated to respect the flags parameter
1103 SkMatrix matrix; 1102 SkMatrix matrix;
1104 SkRect bitmapBounds, tmpSrc, tmpDst; 1103 SkRect bitmapBounds, tmpSrc, tmpDst;
1105 SkBitmap tmpBitmap; 1104 SkBitmap tmpBitmap;
1106 1105
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 return; 2202 return;
2204 } 2203 }
2205 SkAutoTUnref<SkPDFObject> image(SkPDFBitmap::Create(fCanon, subsetBitmap)); 2204 SkAutoTUnref<SkPDFObject> image(SkPDFBitmap::Create(fCanon, subsetBitmap));
2206 if (!image) { 2205 if (!image) {
2207 return; 2206 return;
2208 } 2207 }
2209 2208
2210 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()), 2209 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()),
2211 &content.entry()->fContent); 2210 &content.entry()->fContent);
2212 } 2211 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.h ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698