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