OLD | NEW |
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 "SkTypes.h" | 8 #include "SkTypes.h" |
9 #if defined(SK_BUILD_FOR_WIN32) | 9 #if defined(SK_BUILD_FOR_WIN32) |
10 | 10 |
(...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2261 "Could not set layer transform."); | 2261 "Could not set layer transform."); |
2262 | 2262 |
2263 //Get the current visual collection and add the layer to it. | 2263 //Get the current visual collection and add the layer to it. |
2264 SkTScopedComPtr<IXpsOMVisualCollection> currentVisuals; | 2264 SkTScopedComPtr<IXpsOMVisualCollection> currentVisuals; |
2265 HRVM(this->fCurrentXpsCanvas->GetVisuals(¤tVisuals), | 2265 HRVM(this->fCurrentXpsCanvas->GetVisuals(¤tVisuals), |
2266 "Could not get current visuals for layer."); | 2266 "Could not get current visuals for layer."); |
2267 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()), | 2267 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()), |
2268 "Could not add layer to current visuals."); | 2268 "Could not add layer to current visuals."); |
2269 } | 2269 } |
2270 | 2270 |
2271 SkBaseDevice* SkXPSDevice::onCreateDevice(const CreateInfo& info, const SkPaint*
) { | 2271 SkBaseDevice* SkXPSDevice::onCreateDevice(const CreateInfo& info, const SkPaint*
, |
| 2272 SkRasterCanvasLayerAllocator*) { |
2272 //Conditional for bug compatibility with PDF device. | 2273 //Conditional for bug compatibility with PDF device. |
2273 #if 0 | 2274 #if 0 |
2274 if (SkBaseDevice::kGeneral_Usage == info.fUsage) { | 2275 if (SkBaseDevice::kGeneral_Usage == info.fUsage) { |
2275 return nullptr; | 2276 return nullptr; |
2276 //To what stream do we write? | 2277 //To what stream do we write? |
2277 //SkXPSDevice* dev = new SkXPSDevice(this); | 2278 //SkXPSDevice* dev = new SkXPSDevice(this); |
2278 //SkSize s = SkSize::Make(width, height); | 2279 //SkSize s = SkSize::Make(width, height); |
2279 //dev->BeginCanvas(s, s, SkMatrix::I()); | 2280 //dev->BeginCanvas(s, s, SkMatrix::I()); |
2280 //return dev; | 2281 //return dev; |
2281 } | 2282 } |
2282 #endif | 2283 #endif |
2283 return new SkXPSDevice(this->fXpsFactory.get()); | 2284 return new SkXPSDevice(this->fXpsFactory.get()); |
2284 } | 2285 } |
2285 | 2286 |
2286 #endif//defined(SK_BUILD_FOR_WIN32) | 2287 #endif//defined(SK_BUILD_FOR_WIN32) |
OLD | NEW |