| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 if (format_guid(guid, buffer, bufferSize, sep) == -1) { | 100 if (format_guid(guid, buffer, bufferSize, sep) == -1) { |
| 101 HRM(E_UNEXPECTED, "Could not format GUID into id."); | 101 HRM(E_UNEXPECTED, "Could not format GUID into id."); |
| 102 } | 102 } |
| 103 | 103 |
| 104 return S_OK; | 104 return S_OK; |
| 105 } | 105 } |
| 106 | 106 |
| 107 static SkBitmap make_fake_bitmap(int width, int height) { | 107 static SkBitmap make_fake_bitmap(int width, int height) { |
| 108 SkBitmap bitmap; | 108 SkBitmap bitmap; |
| 109 bitmap.setConfig(SkBitmap::kNo_Config, width, height); | 109 bitmap.setConfig(SkImageInfo::MakeUnknown(width, height)); |
| 110 return bitmap; | 110 return bitmap; |
| 111 } | 111 } |
| 112 | 112 |
| 113 // TODO: should inherit from SkBaseDevice instead of SkBitmapDevice... |
| 113 SkXPSDevice::SkXPSDevice() | 114 SkXPSDevice::SkXPSDevice() |
| 114 : SkBitmapDevice(make_fake_bitmap(10000, 10000)) | 115 : SkBitmapDevice(make_fake_bitmap(10000, 10000)) |
| 115 , fCurrentPage(0) { | 116 , fCurrentPage(0) { |
| 116 } | 117 } |
| 117 | 118 |
| 118 SkXPSDevice::~SkXPSDevice() { | 119 SkXPSDevice::~SkXPSDevice() { |
| 119 } | 120 } |
| 120 | 121 |
| 121 SkXPSDevice::TypefaceUse::TypefaceUse() | 122 SkXPSDevice::TypefaceUse::TypefaceUse() |
| 122 : typefaceId(0xffffffff) | 123 : typefaceId(0xffffffff) |
| (...skipping 2322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2445 IID_PPV_ARGS(&this->fXpsFactory)), | 2446 IID_PPV_ARGS(&this->fXpsFactory)), |
| 2446 "Could not create factory for layer."); | 2447 "Could not create factory for layer."); |
| 2447 | 2448 |
| 2448 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), | 2449 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), |
| 2449 "Could not create canvas for layer."); | 2450 "Could not create canvas for layer."); |
| 2450 } | 2451 } |
| 2451 | 2452 |
| 2452 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { | 2453 bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { |
| 2453 return false; | 2454 return false; |
| 2454 } | 2455 } |
| OLD | NEW |