| 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 "SkColorFilter.h" | 8 #include "SkColorFilter.h" |
| 9 #include "SkDevice.h" | 9 #include "SkDevice.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 "SkImageFilter.h" | 13 #include "SkImageFilter.h" |
| 14 #include "SkImageFilterCache.h" | 14 #include "SkImageFilterCache.h" |
| 15 #include "SkMetaData.h" | 15 #include "SkMetaData.h" |
| 16 #include "SkNinePatchIter.h" | 16 #include "SkNinePatchIter.h" |
| 17 #include "SkPatchUtils.h" | 17 #include "SkPatchUtils.h" |
| 18 #include "SkPathMeasure.h" | 18 #include "SkPathMeasure.h" |
| 19 #include "SkRasterClip.h" | 19 #include "SkRasterClip.h" |
| 20 #include "SkRSXform.h" | 20 #include "SkRSXform.h" |
| 21 #include "SkShader.h" | 21 #include "SkShader.h" |
| 22 #include "SkSpecialImage.h" | 22 #include "SkSpecialImage.h" |
| 23 #include "SkTextBlobRunIterator.h" | 23 #include "SkTextBlobRunIterator.h" |
| 24 #include "SkTextToPathIter.h" | 24 #include "SkTextToPathIter.h" |
| 25 | 25 |
| 26 SkBaseDevice::SkBaseDevice(const SkSurfaceProps& surfaceProps) | 26 SkBaseDevice::SkBaseDevice(const SkSurfaceProps& surfaceProps) : fSurfaceProps(s
urfaceProps) { |
| 27 : fSurfaceProps(surfaceProps) | |
| 28 #ifdef SK_DEBUG | |
| 29 , fAttachedToCanvas(false) | |
| 30 #endif | |
| 31 { | |
| 32 fOrigin.setZero(); | 27 fOrigin.setZero(); |
| 33 fMetaData = nullptr; | 28 fMetaData = nullptr; |
| 34 } | 29 } |
| 35 | 30 |
| 36 SkBaseDevice::~SkBaseDevice() { delete fMetaData; } | 31 SkBaseDevice::~SkBaseDevice() { delete fMetaData; } |
| 37 | 32 |
| 38 SkMetaData& SkBaseDevice::getMetaData() { | 33 SkMetaData& SkBaseDevice::getMetaData() { |
| 39 // metadata users are rare, so we lazily allocate it. If that changes we | 34 // metadata users are rare, so we lazily allocate it. If that changes we |
| 40 // can decide to just make it a field in the device (rather than a ptr) | 35 // can decide to just make it a field in the device (rather than a ptr) |
| 41 if (nullptr == fMetaData) { | 36 if (nullptr == fMetaData) { |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 | 512 |
| 518 // Also log filter quality independent scale factor. | 513 // Also log filter quality independent scale factor. |
| 519 SK_HISTOGRAM_ENUMERATION("DrawScaleFactor.AnyFilterQuality", scaleFactor, | 514 SK_HISTOGRAM_ENUMERATION("DrawScaleFactor.AnyFilterQuality", scaleFactor, |
| 520 kLast_ScaleFactor + 1); | 515 kLast_ScaleFactor + 1); |
| 521 | 516 |
| 522 // Also log an overall histogram of filter quality. | 517 // Also log an overall histogram of filter quality. |
| 523 SK_HISTOGRAM_ENUMERATION("FilterQuality", filterQuality, kLast_SkFilterQuali
ty + 1); | 518 SK_HISTOGRAM_ENUMERATION("FilterQuality", filterQuality, kLast_SkFilterQuali
ty + 1); |
| 524 #endif | 519 #endif |
| 525 } | 520 } |
| 526 | 521 |
| OLD | NEW |