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" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // | 83 // |
84 fLeakyProperties->setPixelGeometry(CreateInfo::AdjustGeometry(this->imageInf
o(), | 84 fLeakyProperties->setPixelGeometry(CreateInfo::AdjustGeometry(this->imageInf
o(), |
85 kGeneral_Usage
, | 85 kGeneral_Usage
, |
86 geo)); | 86 geo)); |
87 } | 87 } |
88 | 88 |
89 SkSurface* SkBaseDevice::newSurface(const SkImageInfo&, const SkSurfaceProps&) {
return NULL; } | 89 SkSurface* SkBaseDevice::newSurface(const SkImageInfo&, const SkSurfaceProps&) {
return NULL; } |
90 | 90 |
91 const void* SkBaseDevice::peekPixels(SkImageInfo*, size_t*) { return NULL; } | 91 const void* SkBaseDevice::peekPixels(SkImageInfo*, size_t*) { return NULL; } |
92 | 92 |
| 93 #ifdef SK_SUPPORT_LEGACY_DEVICE_CLEAR |
93 // DEPRECATED : remove when chrome subclass have been updated to not override cl
ear() | 94 // DEPRECATED : remove when chrome subclass have been updated to not override cl
ear() |
94 void SkBaseDevice::clear(SkColor color) { | 95 void SkBaseDevice::clear(SkColor color) { |
95 SkFAIL("SkDevice::clear() should not be called"); | 96 SkFAIL("SkDevice::clear() should not be called"); |
96 } | 97 } |
| 98 #endif |
97 | 99 |
98 void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer, | 100 void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer, |
99 const SkRRect& inner, const SkPaint& paint) { | 101 const SkRRect& inner, const SkPaint& paint) { |
100 SkPath path; | 102 SkPath path; |
101 path.addRRect(outer); | 103 path.addRRect(outer); |
102 path.addRRect(inner); | 104 path.addRRect(inner); |
103 path.setFillType(SkPath::kEvenOdd_FillType); | 105 path.setFillType(SkPath::kEvenOdd_FillType); |
104 | 106 |
105 const SkMatrix* preMatrix = NULL; | 107 const SkMatrix* preMatrix = NULL; |
106 const bool pathIsMutable = true; | 108 const bool pathIsMutable = true; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 if (kUnknown_SkPixelGeometry == fLeakyProperties->pixelGeometry() | 229 if (kUnknown_SkPixelGeometry == fLeakyProperties->pixelGeometry() |
228 || this->onShouldDisableLCD(paint)) { | 230 || this->onShouldDisableLCD(paint)) { |
229 | 231 |
230 flags &= ~SkPaint::kLCDRenderText_Flag; | 232 flags &= ~SkPaint::kLCDRenderText_Flag; |
231 flags |= SkPaint::kGenA8FromLCD_Flag; | 233 flags |= SkPaint::kGenA8FromLCD_Flag; |
232 } | 234 } |
233 | 235 |
234 return flags; | 236 return flags; |
235 } | 237 } |
236 | 238 |
OLD | NEW |