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

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

Issue 1029263004: SkPDF: clean up extra references (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-03-23 (Monday) 20:01:49 EDT Created 5 years, 9 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 | « no previous file | src/pdf/SkPDFDocument.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 15 matching lines...) Expand all
26 #include "SkPDFStream.h" 26 #include "SkPDFStream.h"
27 #include "SkPDFTypes.h" 27 #include "SkPDFTypes.h"
28 #include "SkPDFUtils.h" 28 #include "SkPDFUtils.h"
29 #include "SkRect.h" 29 #include "SkRect.h"
30 #include "SkRRect.h" 30 #include "SkRRect.h"
31 #include "SkString.h" 31 #include "SkString.h"
32 #include "SkSurface.h" 32 #include "SkSurface.h"
33 #include "SkTextFormatParams.h" 33 #include "SkTextFormatParams.h"
34 #include "SkTemplates.h" 34 #include "SkTemplates.h"
35 #include "SkTypefacePriv.h" 35 #include "SkTypefacePriv.h"
36 #include "SkTSet.h"
37 36
38 #define DPI_FOR_RASTER_SCALE_ONE 72 37 #define DPI_FOR_RASTER_SCALE_ONE 72
39 38
40 // Utility functions 39 // Utility functions
41 40
42 static void emit_pdf_color(SkColor color, SkWStream* result) { 41 static void emit_pdf_color(SkColor color, SkWStream* result) {
43 SkASSERT(SkColorGetA(color) == 0xFF); // We handle alpha elsewhere. 42 SkASSERT(SkColorGetA(color) == 0xFF); // We handle alpha elsewhere.
44 SkScalar colorMax = SkIntToScalar(0xFF); 43 SkScalar colorMax = SkIntToScalar(0xFF);
45 SkPDFScalar::Append( 44 SkPDFScalar::Append(
46 SkScalarDiv(SkIntToScalar(SkColorGetR(color)), colorMax), result); 45 SkScalarDiv(SkIntToScalar(SkColorGetR(color)), colorMax), result);
(...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after
2140 return; 2139 return;
2141 } 2140 }
2142 SkAutoTUnref<SkPDFObject> image(SkPDFBitmap::Create(fCanon, subsetBitmap)); 2141 SkAutoTUnref<SkPDFObject> image(SkPDFBitmap::Create(fCanon, subsetBitmap));
2143 if (!image) { 2142 if (!image) {
2144 return; 2143 return;
2145 } 2144 }
2146 2145
2147 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()), 2146 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()),
2148 &content.entry()->fContent); 2147 &content.entry()->fContent);
2149 } 2148 }
OLDNEW
« no previous file with comments | « no previous file | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698