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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 212 |
213 SkRect srcR, dstR; | 213 SkRect srcR, dstR; |
214 while (iter.next(&srcR, &dstR)) { | 214 while (iter.next(&srcR, &dstR)) { |
215 this->drawBitmapRect(draw, bitmap, &srcR, dstR, paint, SkCanvas::kStrict
_SrcRectConstraint); | 215 this->drawBitmapRect(draw, bitmap, &srcR, dstR, paint, SkCanvas::kStrict
_SrcRectConstraint); |
216 } | 216 } |
217 } | 217 } |
218 | 218 |
219 void SkBaseDevice::drawImageLattice(const SkDraw& draw, const SkImage* image, | 219 void SkBaseDevice::drawImageLattice(const SkDraw& draw, const SkImage* image, |
220 const SkCanvas::Lattice& lattice, const SkRe
ct& dst, | 220 const SkCanvas::Lattice& lattice, const SkRe
ct& dst, |
221 const SkPaint& paint) { | 221 const SkPaint& paint) { |
222 SkLatticeIter iter(image->width(), image->height(), lattice, dst); | 222 SkLatticeIter iter(lattice, dst); |
223 | 223 |
224 SkRect srcR, dstR; | 224 SkRect srcR, dstR; |
225 while (iter.next(&srcR, &dstR)) { | 225 while (iter.next(&srcR, &dstR)) { |
226 this->drawImageRect(draw, image, &srcR, dstR, paint, SkCanvas::kStrict_S
rcRectConstraint); | 226 this->drawImageRect(draw, image, &srcR, dstR, paint, SkCanvas::kStrict_S
rcRectConstraint); |
227 } | 227 } |
228 } | 228 } |
229 | 229 |
230 void SkBaseDevice::drawBitmapLattice(const SkDraw& draw, const SkBitmap& bitmap, | 230 void SkBaseDevice::drawBitmapLattice(const SkDraw& draw, const SkBitmap& bitmap, |
231 const SkCanvas::Lattice& lattice, const SkR
ect& dst, | 231 const SkCanvas::Lattice& lattice, const SkR
ect& dst, |
232 const SkPaint& paint) { | 232 const SkPaint& paint) { |
233 SkLatticeIter iter(bitmap.width(), bitmap.height(), lattice, dst); | 233 SkLatticeIter iter(lattice, dst); |
234 | 234 |
235 SkRect srcR, dstR; | 235 SkRect srcR, dstR; |
236 while (iter.next(&srcR, &dstR)) { | 236 while (iter.next(&srcR, &dstR)) { |
237 this->drawBitmapRect(draw, bitmap, &srcR, dstR, paint, SkCanvas::kStrict
_SrcRectConstraint); | 237 this->drawBitmapRect(draw, bitmap, &srcR, dstR, paint, SkCanvas::kStrict
_SrcRectConstraint); |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 void SkBaseDevice::drawAtlas(const SkDraw& draw, const SkImage* atlas, const SkR
SXform xform[], | 241 void SkBaseDevice::drawAtlas(const SkDraw& draw, const SkImage* atlas, const SkR
SXform xform[], |
242 const SkRect tex[], const SkColor colors[], int cou
nt, | 242 const SkRect tex[], const SkColor colors[], int cou
nt, |
243 SkXfermode::Mode mode, const SkPaint& paint) { | 243 SkXfermode::Mode mode, const SkPaint& paint) { |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 | 568 |
569 // Also log filter quality independent scale factor. | 569 // Also log filter quality independent scale factor. |
570 SK_HISTOGRAM_ENUMERATION("DrawScaleFactor.AnyFilterQuality", scaleFactor, | 570 SK_HISTOGRAM_ENUMERATION("DrawScaleFactor.AnyFilterQuality", scaleFactor, |
571 kLast_ScaleFactor + 1); | 571 kLast_ScaleFactor + 1); |
572 | 572 |
573 // Also log an overall histogram of filter quality. | 573 // Also log an overall histogram of filter quality. |
574 SK_HISTOGRAM_ENUMERATION("FilterQuality", filterQuality, kLast_SkFilterQuali
ty + 1); | 574 SK_HISTOGRAM_ENUMERATION("FilterQuality", filterQuality, kLast_SkFilterQuali
ty + 1); |
575 #endif | 575 #endif |
576 } | 576 } |
577 | 577 |
OLD | NEW |