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

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

Issue 2153173002: remove unused CreateInfo flag (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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/core/SkCanvas.cpp ('k') | no next file » | 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 "SkAnnotationKeys.h" 10 #include "SkAnnotationKeys.h"
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 // Note that this rendering is done at "screen" resolution (100dpi), not 536 // Note that this rendering is done at "screen" resolution (100dpi), not
537 // printer resolution. 537 // printer resolution.
538 // TODO: It may be possible to express some filters natively using PDF 538 // TODO: It may be possible to express some filters natively using PDF
539 // to improve quality and file size (https://bug.skia.org/3043) 539 // to improve quality and file size (https://bug.skia.org/3043)
540 540
541 // TODO: should we return true if there is a colorfilter? 541 // TODO: should we return true if there is a colorfilter?
542 return layerPaint.getImageFilter() != nullptr; 542 return layerPaint.getImageFilter() != nullptr;
543 } 543 }
544 544
545 SkBaseDevice* SkPDFDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint * layerPaint) { 545 SkBaseDevice* SkPDFDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint * layerPaint) {
546 if (cinfo.fForImageFilter || 546 if (layerPaint && not_supported_for_layers(*layerPaint)) {
547 (layerPaint && not_supported_for_layers(*layerPaint))) {
548 return nullptr; 547 return nullptr;
549 } 548 }
550 SkISize size = SkISize::Make(cinfo.fInfo.width(), cinfo.fInfo.height()); 549 SkISize size = SkISize::Make(cinfo.fInfo.width(), cinfo.fInfo.height());
551 return SkPDFDevice::Create(size, fRasterDpi, fDocument); 550 return SkPDFDevice::Create(size, fRasterDpi, fDocument);
552 } 551 }
553 552
554 SkPDFCanon* SkPDFDevice::getCanon() const { return fDocument->canon(); } 553 SkPDFCanon* SkPDFDevice::getCanon() const { return fDocument->canon(); }
555 554
556 555
557 556
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 if (!pdfimage) { 2121 if (!pdfimage) {
2123 return; 2122 return;
2124 } 2123 }
2125 fDocument->serialize(pdfimage); // serialize images early. 2124 fDocument->serialize(pdfimage); // serialize images early.
2126 fDocument->canon()->addPDFBitmap(key, pdfimage); 2125 fDocument->canon()->addPDFBitmap(key, pdfimage);
2127 } 2126 }
2128 // TODO(halcanary): addXObjectResource() should take a sk_sp<SkPDFObject> 2127 // TODO(halcanary): addXObjectResource() should take a sk_sp<SkPDFObject>
2129 SkPDFUtils::DrawFormXObject(this->addXObjectResource(pdfimage.get()), 2128 SkPDFUtils::DrawFormXObject(this->addXObjectResource(pdfimage.get()),
2130 &content.entry()->fContent); 2129 &content.entry()->fContent);
2131 } 2130 }
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698