| 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 "SkDeviceProperties.h" | 9 #include "SkDeviceProperties.h" |
| 10 #include "SkDraw.h" | 10 #include "SkDraw.h" |
| 11 #include "SkDrawFilter.h" | 11 #include "SkDrawFilter.h" |
| 12 #include "SkImage_Base.h" | 12 #include "SkImage_Base.h" |
| 13 #include "SkMetaData.h" | 13 #include "SkMetaData.h" |
| 14 #include "SkPatchUtils.h" | 14 #include "SkPatchUtils.h" |
| 15 #include "SkPathMeasure.h" | 15 #include "SkPathMeasure.h" |
| 16 #include "SkRasterClip.h" | 16 #include "SkRasterClip.h" |
| 17 #include "SkShader.h" | 17 #include "SkShader.h" |
| 18 #include "SkTextBlob.h" | 18 #include "SkTextBlob.h" |
| 19 #include "SkTextToPathIter.h" | 19 #include "SkTextToPathIter.h" |
| 20 | 20 |
| 21 SkBaseDevice::SkBaseDevice() | 21 SkBaseDevice::SkBaseDevice() |
| 22 : fLeakyProperties(SkNEW_ARGS(SkDeviceProperties, (SkDeviceProperties::kLega
cyLCD_InitType))) | 22 : fLeakyProperties(SkNEW(SkDeviceProperties)) |
| 23 #ifdef SK_DEBUG | 23 #ifdef SK_DEBUG |
| 24 , fAttachedToCanvas(false) | 24 , fAttachedToCanvas(false) |
| 25 #endif | 25 #endif |
| 26 { | 26 { |
| 27 fOrigin.setZero(); | 27 fOrigin.setZero(); |
| 28 fMetaData = NULL; | 28 fMetaData = NULL; |
| 29 } | 29 } |
| 30 | 30 |
| 31 SkBaseDevice::SkBaseDevice(const SkDeviceProperties& dp) | 31 SkBaseDevice::SkBaseDevice(const SkDeviceProperties& dp) |
| 32 : fLeakyProperties(SkNEW_ARGS(SkDeviceProperties, (dp))) | 32 : fLeakyProperties(SkNEW_ARGS(SkDeviceProperties, (dp))) |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 if (kUnknown_SkPixelGeometry == fLeakyProperties->pixelGeometry() | 374 if (kUnknown_SkPixelGeometry == fLeakyProperties->pixelGeometry() |
| 375 || this->onShouldDisableLCD(paint)) { | 375 || this->onShouldDisableLCD(paint)) { |
| 376 | 376 |
| 377 flags &= ~SkPaint::kLCDRenderText_Flag; | 377 flags &= ~SkPaint::kLCDRenderText_Flag; |
| 378 flags |= SkPaint::kGenA8FromLCD_Flag; | 378 flags |= SkPaint::kGenA8FromLCD_Flag; |
| 379 } | 379 } |
| 380 | 380 |
| 381 return flags; | 381 return flags; |
| 382 } | 382 } |
| 383 | 383 |
| OLD | NEW |