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 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 bool result = this->onReadPixels(bmpSubset, | 148 bool result = this->onReadPixels(bmpSubset, |
149 srcRect.fLeft, | 149 srcRect.fLeft, |
150 srcRect.fTop, | 150 srcRect.fTop, |
151 config8888); | 151 config8888); |
152 if (result && bmp == &tmp) { | 152 if (result && bmp == &tmp) { |
153 tmp.swap(*bitmap); | 153 tmp.swap(*bitmap); |
154 } | 154 } |
155 return result; | 155 return result; |
156 } | 156 } |
157 | 157 |
| 158 void SkBaseDevice::internalPrivate_PreLoad(const SkBitmap& bitmap, const SkIRect
& rect) { |
| 159 // derived classes can make use of this information |
| 160 } |
| 161 |
158 SkSurface* SkBaseDevice::newSurface(const SkImageInfo&) { return NULL; } | 162 SkSurface* SkBaseDevice::newSurface(const SkImageInfo&) { return NULL; } |
159 | 163 |
160 const void* SkBaseDevice::peekPixels(SkImageInfo*, size_t*) { return NULL; } | 164 const void* SkBaseDevice::peekPixels(SkImageInfo*, size_t*) { return NULL; } |
161 | 165 |
162 void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer, | 166 void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer, |
163 const SkRRect& inner, const SkPaint& paint) { | 167 const SkRRect& inner, const SkPaint& paint) { |
164 SkPath path; | 168 SkPath path; |
165 path.addRRect(outer); | 169 path.addRRect(outer); |
166 path.addRRect(inner); | 170 path.addRRect(inner); |
167 path.setFillType(SkPath::kEvenOdd_FillType); | 171 path.setFillType(SkPath::kEvenOdd_FillType); |
(...skipping 18 matching lines...) Expand all Loading... |
186 return this->onWritePixels(info, pixels, rowBytes, x, y); | 190 return this->onWritePixels(info, pixels, rowBytes, x, y); |
187 } | 191 } |
188 | 192 |
189 bool SkBaseDevice::onWritePixels(const SkImageInfo&, const void*, size_t, int, i
nt) { | 193 bool SkBaseDevice::onWritePixels(const SkImageInfo&, const void*, size_t, int, i
nt) { |
190 return false; | 194 return false; |
191 } | 195 } |
192 | 196 |
193 #ifdef SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG | 197 #ifdef SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG |
194 void SkBaseDevice::writePixels(const SkBitmap&, int x, int y, SkCanvas::Config88
88) {} | 198 void SkBaseDevice::writePixels(const SkBitmap&, int x, int y, SkCanvas::Config88
88) {} |
195 #endif | 199 #endif |
OLD | NEW |