| 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 "SkDevice.h" | 8 #include "SkDevice.h" |
| 9 #include "SkMetaData.h" | 9 #include "SkMetaData.h" |
| 10 | 10 |
| 11 #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) |
| 12 const SkCanvas::Config8888 SkBaseDevice::kPMColorAlias = SkCanvas::kBGRA_Pre
mul_Config8888; |
| 13 #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) |
| 14 const SkCanvas::Config8888 SkBaseDevice::kPMColorAlias = SkCanvas::kRGBA_Pre
mul_Config8888; |
| 15 #else |
| 16 const SkCanvas::Config8888 SkBaseDevice::kPMColorAlias = (SkCanvas::Config88
88) -1; |
| 17 #endif |
| 18 |
| 19 /////////////////////////////////////////////////////////////////////////////// |
| 20 |
| 11 SkBaseDevice::SkBaseDevice() | 21 SkBaseDevice::SkBaseDevice() |
| 12 : fLeakyProperties(SkDeviceProperties::MakeDefault()) | 22 : fLeakyProperties(SkDeviceProperties::MakeDefault()) |
| 13 #ifdef SK_DEBUG | 23 #ifdef SK_DEBUG |
| 14 , fAttachedToCanvas(false) | 24 , fAttachedToCanvas(false) |
| 15 #endif | 25 #endif |
| 16 { | 26 { |
| 17 fOrigin.setZero(); | 27 fOrigin.setZero(); |
| 18 fMetaData = NULL; | 28 fMetaData = NULL; |
| 19 } | 29 } |
| 20 | 30 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 } | 230 } |
| 221 | 231 |
| 222 void SkBaseDevice::EXPERIMENTAL_optimize(SkPicture* picture) { | 232 void SkBaseDevice::EXPERIMENTAL_optimize(SkPicture* picture) { |
| 223 // The base class doesn't perform any analysis but derived classes may | 233 // The base class doesn't perform any analysis but derived classes may |
| 224 } | 234 } |
| 225 | 235 |
| 226 bool SkBaseDevice::EXPERIMENTAL_drawPicture(const SkPicture& picture) { | 236 bool SkBaseDevice::EXPERIMENTAL_drawPicture(const SkPicture& picture) { |
| 227 // The base class doesn't perform any accelerated picture rendering | 237 // The base class doesn't perform any accelerated picture rendering |
| 228 return false; | 238 return false; |
| 229 } | 239 } |
| OLD | NEW |