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 | 9 |
10 #ifndef UNICODE | 10 #ifndef UNICODE |
(...skipping 2233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2244 "Could not set layer transform."); | 2244 "Could not set layer transform."); |
2245 | 2245 |
2246 //Get the current visual collection and add the layer to it. | 2246 //Get the current visual collection and add the layer to it. |
2247 SkTScopedComPtr<IXpsOMVisualCollection> currentVisuals; | 2247 SkTScopedComPtr<IXpsOMVisualCollection> currentVisuals; |
2248 HRVM(this->fCurrentXpsCanvas->GetVisuals(¤tVisuals), | 2248 HRVM(this->fCurrentXpsCanvas->GetVisuals(¤tVisuals), |
2249 "Could not get current visuals for layer."); | 2249 "Could not get current visuals for layer."); |
2250 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()), | 2250 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()), |
2251 "Could not add layer to current visuals."); | 2251 "Could not add layer to current visuals."); |
2252 } | 2252 } |
2253 | 2253 |
2254 SkBaseDevice* SkXPSDevice::onCreateCompatibleDevice(const CreateInfo& info) { | 2254 SkBaseDevice* SkXPSDevice::onCreateDevice(const CreateInfo& info, const SkPaint*
) { |
2255 //Conditional for bug compatibility with PDF device. | 2255 //Conditional for bug compatibility with PDF device. |
2256 #if 0 | 2256 #if 0 |
2257 if (SkBaseDevice::kGeneral_Usage == info.fUsage) { | 2257 if (SkBaseDevice::kGeneral_Usage == info.fUsage) { |
2258 return NULL; | 2258 return NULL; |
2259 SK_CRASH(); | 2259 SK_CRASH(); |
2260 //To what stream do we write? | 2260 //To what stream do we write? |
2261 //SkXPSDevice* dev = new SkXPSDevice(this); | 2261 //SkXPSDevice* dev = new SkXPSDevice(this); |
2262 //SkSize s = SkSize::Make(width, height); | 2262 //SkSize s = SkSize::Make(width, height); |
2263 //dev->BeginCanvas(s, s, SkMatrix::I()); | 2263 //dev->BeginCanvas(s, s, SkMatrix::I()); |
2264 //return dev; | 2264 //return dev; |
(...skipping 10 matching lines...) Expand all Loading... |
2275 CLSID_XpsOMObjectFactory, | 2275 CLSID_XpsOMObjectFactory, |
2276 NULL, | 2276 NULL, |
2277 CLSCTX_INPROC_SERVER, | 2277 CLSCTX_INPROC_SERVER, |
2278 IID_PPV_ARGS(&this->fXpsFactory)), | 2278 IID_PPV_ARGS(&this->fXpsFactory)), |
2279 "Could not create factory for layer."); | 2279 "Could not create factory for layer."); |
2280 | 2280 |
2281 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), | 2281 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), |
2282 "Could not create canvas for layer."); | 2282 "Could not create canvas for layer."); |
2283 } | 2283 } |
2284 | 2284 |
2285 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { | |
2286 return false; | |
2287 } | |
OLD | NEW |