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 #ifndef UNICODE | 8 #ifndef UNICODE |
9 #define UNICODE | 9 #define UNICODE |
10 #endif | 10 #endif |
(...skipping 2390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2401 "Could not set layer transform."); | 2401 "Could not set layer transform."); |
2402 | 2402 |
2403 //Get the current visual collection and add the layer to it. | 2403 //Get the current visual collection and add the layer to it. |
2404 SkTScopedComPtr<IXpsOMVisualCollection> currentVisuals; | 2404 SkTScopedComPtr<IXpsOMVisualCollection> currentVisuals; |
2405 HRVM(this->fCurrentXpsCanvas->GetVisuals(¤tVisuals), | 2405 HRVM(this->fCurrentXpsCanvas->GetVisuals(¤tVisuals), |
2406 "Could not get current visuals for layer."); | 2406 "Could not get current visuals for layer."); |
2407 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()), | 2407 HRVM(currentVisuals->Append(that->fCurrentXpsCanvas.get()), |
2408 "Could not add layer to current visuals."); | 2408 "Could not add layer to current visuals."); |
2409 } | 2409 } |
2410 | 2410 |
2411 #ifdef SK_SUPPORT_LEGACY_READPIXELSCONFIG | |
2412 bool SkXPSDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, | |
2413 SkCanvas::Config8888) { | |
2414 return false; | |
2415 } | |
2416 #endif | |
2417 | |
2418 SkBaseDevice* SkXPSDevice::onCreateDevice(const SkImageInfo&, Usage) { | 2411 SkBaseDevice* SkXPSDevice::onCreateDevice(const SkImageInfo&, Usage) { |
2419 //Conditional for bug compatibility with PDF device. | 2412 //Conditional for bug compatibility with PDF device. |
2420 #if 0 | 2413 #if 0 |
2421 if (SkBaseDevice::kGeneral_Usage == usage) { | 2414 if (SkBaseDevice::kGeneral_Usage == usage) { |
2422 return NULL; | 2415 return NULL; |
2423 SK_CRASH(); | 2416 SK_CRASH(); |
2424 //To what stream do we write? | 2417 //To what stream do we write? |
2425 //SkXPSDevice* dev = new SkXPSDevice(this); | 2418 //SkXPSDevice* dev = new SkXPSDevice(this); |
2426 //SkSize s = SkSize::Make(width, height); | 2419 //SkSize s = SkSize::Make(width, height); |
2427 //dev->BeginCanvas(s, s, SkMatrix::I()); | 2420 //dev->BeginCanvas(s, s, SkMatrix::I()); |
(...skipping 14 matching lines...) Expand all Loading... |
2442 IID_PPV_ARGS(&this->fXpsFactory)), | 2435 IID_PPV_ARGS(&this->fXpsFactory)), |
2443 "Could not create factory for layer."); | 2436 "Could not create factory for layer."); |
2444 | 2437 |
2445 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), | 2438 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), |
2446 "Could not create canvas for layer."); | 2439 "Could not create canvas for layer."); |
2447 } | 2440 } |
2448 | 2441 |
2449 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { | 2442 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { |
2450 return false; | 2443 return false; |
2451 } | 2444 } |
OLD | NEW |