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" |
(...skipping 30 matching lines...) Expand all Loading... |
41 if (nullptr == fMetaData) { | 41 if (nullptr == fMetaData) { |
42 fMetaData = new SkMetaData; | 42 fMetaData = new SkMetaData; |
43 } | 43 } |
44 return *fMetaData; | 44 return *fMetaData; |
45 } | 45 } |
46 | 46 |
47 SkImageInfo SkBaseDevice::imageInfo() const { | 47 SkImageInfo SkBaseDevice::imageInfo() const { |
48 return SkImageInfo::MakeUnknown(); | 48 return SkImageInfo::MakeUnknown(); |
49 } | 49 } |
50 | 50 |
| 51 #ifdef SK_SUPPORT_LEGACY_ACCESSBITMAP |
51 const SkBitmap& SkBaseDevice::accessBitmap(bool changePixels) { | 52 const SkBitmap& SkBaseDevice::accessBitmap(bool changePixels) { |
52 const SkBitmap& bitmap = this->onAccessBitmap(); | 53 const SkBitmap& bitmap = this->onAccessBitmap(); |
53 if (changePixels) { | 54 if (changePixels) { |
54 bitmap.notifyPixelsChanged(); | 55 bitmap.notifyPixelsChanged(); |
55 } | 56 } |
56 return bitmap; | 57 return bitmap; |
57 } | 58 } |
| 59 #endif |
58 | 60 |
59 SkPixelGeometry SkBaseDevice::CreateInfo::AdjustGeometry(const SkImageInfo& info
, | 61 SkPixelGeometry SkBaseDevice::CreateInfo::AdjustGeometry(const SkImageInfo& info
, |
60 TileUsage tileUsage, | 62 TileUsage tileUsage, |
61 SkPixelGeometry geo, | 63 SkPixelGeometry geo, |
62 bool preserveLCDText) { | 64 bool preserveLCDText) { |
63 switch (tileUsage) { | 65 switch (tileUsage) { |
64 case kPossible_TileUsage: | 66 case kPossible_TileUsage: |
65 // (we think) for compatibility with old clients, we assume this lay
er can support LCD | 67 // (we think) for compatibility with old clients, we assume this lay
er can support LCD |
66 // even though they may not have marked it as opaque... seems like w
e should update | 68 // even though they may not have marked it as opaque... seems like w
e should update |
67 // our callers (reed/robertphilips). | 69 // our callers (reed/robertphilips). |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 | 517 |
516 // Also log filter quality independent scale factor. | 518 // Also log filter quality independent scale factor. |
517 SK_HISTOGRAM_ENUMERATION("DrawScaleFactor.AnyFilterQuality", scaleFactor, | 519 SK_HISTOGRAM_ENUMERATION("DrawScaleFactor.AnyFilterQuality", scaleFactor, |
518 kLast_ScaleFactor + 1); | 520 kLast_ScaleFactor + 1); |
519 | 521 |
520 // Also log an overall histogram of filter quality. | 522 // Also log an overall histogram of filter quality. |
521 SK_HISTOGRAM_ENUMERATION("FilterQuality", filterQuality, kLast_SkFilterQuali
ty + 1); | 523 SK_HISTOGRAM_ENUMERATION("FilterQuality", filterQuality, kLast_SkFilterQuali
ty + 1); |
522 #endif | 524 #endif |
523 } | 525 } |
524 | 526 |
OLD | NEW |