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

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

Issue 1505763003: SkDocument::setDCTEncoder() for old versions of webkit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-12-09 (Wednesday) 13:41:21 EST Created 5 years 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/SkPDFCanon.h ('k') | tests/PDFDocumentTest.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 <tuple> 8 #include <tuple>
9 #include "SkPDFDevice.h" 9 #include "SkPDFDevice.h"
10 10
(...skipping 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after
2426 // drawBitmap*()/drawImage*() calls amd ImageFilters (which 2426 // drawBitmap*()/drawImage*() calls amd ImageFilters (which
2427 // rasterize a layer on this backend). Fortuanely, this seems 2427 // rasterize a layer on this backend). Fortuanely, this seems
2428 // to be how Chromium impements most color-filters. 2428 // to be how Chromium impements most color-filters.
2429 autoImageUnref.reset(color_filter(image, colorFilter)); 2429 autoImageUnref.reset(color_filter(image, colorFilter));
2430 image = autoImageUnref; 2430 image = autoImageUnref;
2431 // TODO(halcanary): de-dupe this by caching filtered images. 2431 // TODO(halcanary): de-dupe this by caching filtered images.
2432 // (maybe in the resource cache?) 2432 // (maybe in the resource cache?)
2433 } 2433 }
2434 SkAutoTUnref<SkPDFObject> pdfimage(SkSafeRef(fCanon->findPDFBitmap(image))); 2434 SkAutoTUnref<SkPDFObject> pdfimage(SkSafeRef(fCanon->findPDFBitmap(image)));
2435 if (!pdfimage) { 2435 if (!pdfimage) {
2436 pdfimage.reset(SkPDFCreateBitmapObject(image)); 2436 pdfimage.reset(SkPDFCreateBitmapObject(
2437 image, fCanon->fPixelSerializer));
2437 if (!pdfimage) { 2438 if (!pdfimage) {
2438 return; 2439 return;
2439 } 2440 }
2440 fCanon->addPDFBitmap(image->uniqueID(), pdfimage); 2441 fCanon->addPDFBitmap(image->uniqueID(), pdfimage);
2441 } 2442 }
2442 SkPDFUtils::DrawFormXObject(this->addXObjectResource(pdfimage.get()), 2443 SkPDFUtils::DrawFormXObject(this->addXObjectResource(pdfimage.get()),
2443 &content.entry()->fContent); 2444 &content.entry()->fContent);
2444 } 2445 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFCanon.h ('k') | tests/PDFDocumentTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698