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

Side by Side Diff: src/pdf/SkPDFUtils.h

Issue 1720863003: SkPDF: fix scalar serialization (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-02-24 (Wednesday) 16:44:08 EST Created 4 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 | « gm/skbug_4868.cpp ('k') | src/pdf/SkPDFUtils.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkPDFUtils_DEFINED 10 #ifndef SkPDFUtils_DEFINED
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 SkWStream* content) { 51 SkWStream* content) {
52 SkPDFUtils::EmitPath(path, paintStyle, true, content); 52 SkPDFUtils::EmitPath(path, paintStyle, true, content);
53 } 53 }
54 static void ClosePath(SkWStream* content); 54 static void ClosePath(SkWStream* content);
55 static void PaintPath(SkPaint::Style style, SkPath::FillType fill, 55 static void PaintPath(SkPaint::Style style, SkPath::FillType fill,
56 SkWStream* content); 56 SkWStream* content);
57 static void StrokePath(SkWStream* content); 57 static void StrokePath(SkWStream* content);
58 static void DrawFormXObject(int objectIndex, SkWStream* content); 58 static void DrawFormXObject(int objectIndex, SkWStream* content);
59 static void ApplyGraphicState(int objectIndex, SkWStream* content); 59 static void ApplyGraphicState(int objectIndex, SkWStream* content);
60 static void ApplyPattern(int objectIndex, SkWStream* content); 60 static void ApplyPattern(int objectIndex, SkWStream* content);
61
62 // 3 = '-', '.', and '\0' characters.
63 // 9 = number of significant digits
64 // abs(FLT_MIN_10_EXP) = number of zeros in FLT_MIN
65 static const size_t kMaximumFloatDecimalLength = 3 + 9 - FLT_MIN_10_EXP;
66 // FloatToDecimal is exposed for unit tests.
67 static size_t FloatToDecimal(float value,
68 char output[kMaximumFloatDecimalLength]);
61 static void AppendScalar(SkScalar value, SkWStream* stream); 69 static void AppendScalar(SkScalar value, SkWStream* stream);
62 static SkString FormatString(const char* input, size_t len); 70 static SkString FormatString(const char* input, size_t len);
63 }; 71 };
64 72
65 #endif 73 #endif
OLDNEW
« no previous file with comments | « gm/skbug_4868.cpp ('k') | src/pdf/SkPDFUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698