| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 path.rewind(); | 215 path.rewind(); |
| 216 path.addPoly(quad, 4, true); | 216 path.addPoly(quad, 4, true); |
| 217 path.setConvexity(SkPath::kConvex_Convexity); | 217 path.setConvexity(SkPath::kConvex_Convexity); |
| 218 this->drawPath(draw, path, pnt, nullptr, true); | 218 this->drawPath(draw, path, pnt, nullptr, true); |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 | 221 |
| 222 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 222 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 223 | 223 |
| 224 void SkBaseDevice::drawSpecial(const SkDraw&, SkSpecialImage*, int x, int y, con
st SkPaint&) {} |
| 225 sk_sp<SkSpecialImage> SkBaseDevice::makeSpecial(const SkBitmap&) { return nullpt
r; } |
| 226 sk_sp<SkSpecialImage> SkBaseDevice::makeSpecial(const SkImage*) { return nullptr
; } |
| 227 sk_sp<SkSpecialImage> SkBaseDevice::asSpecial() { return nullptr; } |
| 228 |
| 229 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 230 |
| 224 bool SkBaseDevice::readPixels(const SkImageInfo& info, void* dstP, size_t rowByt
es, int x, int y) { | 231 bool SkBaseDevice::readPixels(const SkImageInfo& info, void* dstP, size_t rowByt
es, int x, int y) { |
| 225 #ifdef SK_DEBUG | 232 #ifdef SK_DEBUG |
| 226 SkASSERT(info.width() > 0 && info.height() > 0); | 233 SkASSERT(info.width() > 0 && info.height() > 0); |
| 227 SkASSERT(dstP); | 234 SkASSERT(dstP); |
| 228 SkASSERT(rowBytes >= info.minRowBytes()); | 235 SkASSERT(rowBytes >= info.minRowBytes()); |
| 229 SkASSERT(x >= 0 && y >= 0); | 236 SkASSERT(x >= 0 && y >= 0); |
| 230 | 237 |
| 231 const SkImageInfo& srcInfo = this->imageInfo(); | 238 const SkImageInfo& srcInfo = this->imageInfo(); |
| 232 SkASSERT(x + info.width() <= srcInfo.width()); | 239 SkASSERT(x + info.width() <= srcInfo.width()); |
| 233 SkASSERT(y + info.height() <= srcInfo.height()); | 240 SkASSERT(y + info.height() <= srcInfo.height()); |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 | 545 |
| 539 // Also log filter quality independent scale factor. | 546 // Also log filter quality independent scale factor. |
| 540 SK_HISTOGRAM_ENUMERATION("DrawScaleFactor.AnyFilterQuality", scaleFactor, | 547 SK_HISTOGRAM_ENUMERATION("DrawScaleFactor.AnyFilterQuality", scaleFactor, |
| 541 kLast_ScaleFactor + 1); | 548 kLast_ScaleFactor + 1); |
| 542 | 549 |
| 543 // Also log an overall histogram of filter quality. | 550 // Also log an overall histogram of filter quality. |
| 544 SK_HISTOGRAM_ENUMERATION("FilterQuality", filterQuality, kLast_SkFilterQuali
ty + 1); | 551 SK_HISTOGRAM_ENUMERATION("FilterQuality", filterQuality, kLast_SkFilterQuali
ty + 1); |
| 545 #endif | 552 #endif |
| 546 } | 553 } |
| 547 | 554 |
| OLD | NEW |