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

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

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/SkJpegInfo.cpp ('k') | src/pdf/SkPDFFont.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 "SkAnnotationKeys.h" 10 #include "SkAnnotationKeys.h"
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1981 } 1981 }
1982 return resourceIndex; 1982 return resourceIndex;
1983 } 1983 }
1984 1984
1985 static SkSize rect_to_size(const SkRect& r) { 1985 static SkSize rect_to_size(const SkRect& r) {
1986 return SkSize::Make(r.width(), r.height()); 1986 return SkSize::Make(r.width(), r.height());
1987 } 1987 }
1988 1988
1989 static sk_sp<SkImage> color_filter(const SkImageBitmap& imageBitmap, 1989 static sk_sp<SkImage> color_filter(const SkImageBitmap& imageBitmap,
1990 SkColorFilter* colorFilter) { 1990 SkColorFilter* colorFilter) {
1991 auto surface = 1991 auto surface =
1992 SkSurface::MakeRaster(SkImageInfo::MakeN32Premul(imageBitmap.dimensions( ))); 1992 SkSurface::MakeRaster(SkImageInfo::MakeN32Premul(imageBitmap.dimensions( )));
1993 SkASSERT(surface); 1993 SkASSERT(surface);
1994 SkCanvas* canvas = surface->getCanvas(); 1994 SkCanvas* canvas = surface->getCanvas();
1995 canvas->clear(SK_ColorTRANSPARENT); 1995 canvas->clear(SK_ColorTRANSPARENT);
1996 SkPaint paint; 1996 SkPaint paint;
1997 paint.setColorFilter(sk_ref_sp(colorFilter)); 1997 paint.setColorFilter(sk_ref_sp(colorFilter));
1998 imageBitmap.draw(canvas, &paint); 1998 imageBitmap.draw(canvas, &paint);
1999 canvas->flush(); 1999 canvas->flush();
2000 return surface->makeImageSnapshot(); 2000 return surface->makeImageSnapshot();
2001 } 2001 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2139 if (!pdfimage) { 2139 if (!pdfimage) {
2140 return; 2140 return;
2141 } 2141 }
2142 fDocument->serialize(pdfimage); // serialize images early. 2142 fDocument->serialize(pdfimage); // serialize images early.
2143 fDocument->canon()->addPDFBitmap(key, pdfimage); 2143 fDocument->canon()->addPDFBitmap(key, pdfimage);
2144 } 2144 }
2145 // TODO(halcanary): addXObjectResource() should take a sk_sp<SkPDFObject> 2145 // TODO(halcanary): addXObjectResource() should take a sk_sp<SkPDFObject>
2146 SkPDFUtils::DrawFormXObject(this->addXObjectResource(pdfimage.get()), 2146 SkPDFUtils::DrawFormXObject(this->addXObjectResource(pdfimage.get()),
2147 &content.entry()->fContent); 2147 &content.entry()->fContent);
2148 } 2148 }
OLDNEW
« no previous file with comments | « src/pdf/SkJpegInfo.cpp ('k') | src/pdf/SkPDFFont.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698