OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 The Android Open Source Project |
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 "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkCanvasPriv.h" | 10 #include "SkCanvasPriv.h" |
(...skipping 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2221 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds) | 2221 LOOPER_BEGIN(paint, SkDrawFilter::kPath_Type, bounds) |
2222 | 2222 |
2223 while (iter.next()) { | 2223 while (iter.next()) { |
2224 iter.fDevice->drawPath(iter, path, looper.paint()); | 2224 iter.fDevice->drawPath(iter, path, looper.paint()); |
2225 } | 2225 } |
2226 | 2226 |
2227 LOOPER_END | 2227 LOOPER_END |
2228 } | 2228 } |
2229 | 2229 |
2230 bool SkCanvas::canDrawBitmapAsSprite(SkScalar x, SkScalar y, int w, int h, const
SkPaint& paint) { | 2230 bool SkCanvas::canDrawBitmapAsSprite(SkScalar x, SkScalar y, int w, int h, const
SkPaint& paint) { |
2231 #ifdef SK_SUPPORT_LEGACY_LAYER_BITMAP_IMAGEFILTERS | |
2232 return false; | |
2233 #endif | |
2234 | |
2235 if (!paint.getImageFilter()) { | 2231 if (!paint.getImageFilter()) { |
2236 return false; | 2232 return false; |
2237 } | 2233 } |
2238 | 2234 |
2239 const SkMatrix& ctm = this->getTotalMatrix(); | 2235 const SkMatrix& ctm = this->getTotalMatrix(); |
2240 const unsigned kSubpixelBits = 0; // matching SkDraw::drawBitmap() | 2236 const unsigned kSubpixelBits = 0; // matching SkDraw::drawBitmap() |
2241 if (!SkTreatAsSprite(ctm, w, h, kSubpixelBits)) { | 2237 if (!SkTreatAsSprite(ctm, w, h, kSubpixelBits)) { |
2242 return false; | 2238 return false; |
2243 } | 2239 } |
2244 | 2240 |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3039 } | 3035 } |
3040 | 3036 |
3041 if (matrix) { | 3037 if (matrix) { |
3042 canvas->concat(*matrix); | 3038 canvas->concat(*matrix); |
3043 } | 3039 } |
3044 } | 3040 } |
3045 | 3041 |
3046 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 3042 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
3047 fCanvas->restoreToCount(fSaveCount); | 3043 fCanvas->restoreToCount(fSaveCount); |
3048 } | 3044 } |
OLD | NEW |