OLD | NEW |
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 #include "SkPDFShader.h" | 10 #include "SkPDFShader.h" |
11 | 11 |
12 #include "SkData.h" | 12 #include "SkData.h" |
13 #include "SkPDFCanon.h" | 13 #include "SkPDFCanon.h" |
14 #include "SkPDFCatalog.h" | |
15 #include "SkPDFDevice.h" | 14 #include "SkPDFDevice.h" |
16 #include "SkPDFFormXObject.h" | 15 #include "SkPDFFormXObject.h" |
17 #include "SkPDFGraphicState.h" | 16 #include "SkPDFGraphicState.h" |
18 #include "SkPDFResourceDict.h" | 17 #include "SkPDFResourceDict.h" |
19 #include "SkPDFUtils.h" | 18 #include "SkPDFUtils.h" |
20 #include "SkScalar.h" | 19 #include "SkScalar.h" |
21 #include "SkStream.h" | 20 #include "SkStream.h" |
22 #include "SkTemplates.h" | 21 #include "SkTemplates.h" |
23 #include "SkTypes.h" | 22 #include "SkTypes.h" |
24 | 23 |
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 return false; | 1303 return false; |
1305 } | 1304 } |
1306 | 1305 |
1307 void SkPDFShader::State::AllocateGradientInfoStorage() { | 1306 void SkPDFShader::State::AllocateGradientInfoStorage() { |
1308 fColorData.set(sk_malloc_throw( | 1307 fColorData.set(sk_malloc_throw( |
1309 fInfo.fColorCount * (sizeof(SkColor) + sizeof(SkScalar)))); | 1308 fInfo.fColorCount * (sizeof(SkColor) + sizeof(SkScalar)))); |
1310 fInfo.fColors = reinterpret_cast<SkColor*>(fColorData.get()); | 1309 fInfo.fColors = reinterpret_cast<SkColor*>(fColorData.get()); |
1311 fInfo.fColorOffsets = | 1310 fInfo.fColorOffsets = |
1312 reinterpret_cast<SkScalar*>(fInfo.fColors + fInfo.fColorCount); | 1311 reinterpret_cast<SkScalar*>(fInfo.fColors + fInfo.fColorCount); |
1313 } | 1312 } |
OLD | NEW |