| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkPaintFilterCanvas.h" | 8 #include "SkPaintFilterCanvas.h" |
| 9 | 9 |
| 10 #include "SkPaint.h" | 10 #include "SkPaint.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 this->INHERITED::onDrawPath(path, *apf.paint()); | 67 this->INHERITED::onDrawPath(path, *apf.paint()); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void SkPaintFilterCanvas::onDrawBitmap(const SkBitmap& bm, SkScalar left, SkScal
ar top, | 70 void SkPaintFilterCanvas::onDrawBitmap(const SkBitmap& bm, SkScalar left, SkScal
ar top, |
| 71 const SkPaint* paint) { | 71 const SkPaint* paint) { |
| 72 AutoPaintFilter apf(this, kBitmap_Type, paint); | 72 AutoPaintFilter apf(this, kBitmap_Type, paint); |
| 73 this->INHERITED::onDrawBitmap(bm, left, top, apf.paint()); | 73 this->INHERITED::onDrawBitmap(bm, left, top, apf.paint()); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void SkPaintFilterCanvas::onDrawBitmapRect(const SkBitmap& bm, const SkRect* src
, const SkRect& dst, | 76 void SkPaintFilterCanvas::onDrawBitmapRect(const SkBitmap& bm, const SkRect* src
, const SkRect& dst, |
| 77 const SkPaint* paint, DrawBitmapRectF
lags flags) { | 77 const SkPaint* paint, |
| 78 SK_VIRTUAL_CONSTRAINT_TYPE constraint
) { |
| 78 AutoPaintFilter apf(this, kBitmap_Type, paint); | 79 AutoPaintFilter apf(this, kBitmap_Type, paint); |
| 79 this->INHERITED::onDrawBitmapRect(bm, src, dst, apf.paint(), flags); | 80 this->INHERITED::onDrawBitmapRect(bm, src, dst, apf.paint(), constraint); |
| 80 } | 81 } |
| 81 | 82 |
| 82 void SkPaintFilterCanvas::onDrawImage(const SkImage* image, SkScalar left, SkSca
lar top, | 83 void SkPaintFilterCanvas::onDrawImage(const SkImage* image, SkScalar left, SkSca
lar top, |
| 83 const SkPaint* paint) { | 84 const SkPaint* paint) { |
| 84 AutoPaintFilter apf(this, kBitmap_Type, paint); | 85 AutoPaintFilter apf(this, kBitmap_Type, paint); |
| 85 this->INHERITED::onDrawImage(image, left, top, apf.paint()); | 86 this->INHERITED::onDrawImage(image, left, top, apf.paint()); |
| 86 } | 87 } |
| 87 | 88 |
| 88 void SkPaintFilterCanvas::onDrawImageRect(const SkImage* image, const SkRect* sr
c, | 89 void SkPaintFilterCanvas::onDrawImageRect(const SkImage* image, const SkRect* sr
c, |
| 89 const SkRect& dst, const SkPaint* pain
t) { | 90 const SkRect& dst, const SkPaint* pain
t |
| 91 SRC_RECT_CONSTRAINT_PARAM(constraint))
{ |
| 90 AutoPaintFilter apf(this, kBitmap_Type, paint); | 92 AutoPaintFilter apf(this, kBitmap_Type, paint); |
| 91 this->INHERITED::onDrawImageRect(image, src, dst, apf.paint()); | 93 this->INHERITED::onDrawImageRect(image, src, dst, apf.paint() |
| 94 SRC_RECT_CONSTRAINT_ARG(constraint)); |
| 92 } | 95 } |
| 93 | 96 |
| 94 void SkPaintFilterCanvas::onDrawBitmapNine(const SkBitmap& bm, const SkIRect& ce
nter, | 97 void SkPaintFilterCanvas::onDrawBitmapNine(const SkBitmap& bm, const SkIRect& ce
nter, |
| 95 const SkRect& dst, const SkPaint* pai
nt) { | 98 const SkRect& dst, const SkPaint* pai
nt) { |
| 96 AutoPaintFilter apf(this, kBitmap_Type, paint); | 99 AutoPaintFilter apf(this, kBitmap_Type, paint); |
| 97 this->INHERITED::onDrawBitmapNine(bm, center, dst, apf.paint()); | 100 this->INHERITED::onDrawBitmapNine(bm, center, dst, apf.paint()); |
| 98 } | 101 } |
| 99 | 102 |
| 100 void SkPaintFilterCanvas::onDrawSprite(const SkBitmap& bm, int left, int top, | 103 void SkPaintFilterCanvas::onDrawSprite(const SkBitmap& bm, int left, int top, |
| 101 const SkPaint* paint) { | 104 const SkPaint* paint) { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 const SkMatrix* matrix, const SkPaint
& paint) { | 151 const SkMatrix* matrix, const SkPaint
& paint) { |
| 149 AutoPaintFilter apf(this, kText_Type, paint); | 152 AutoPaintFilter apf(this, kText_Type, paint); |
| 150 this->INHERITED::onDrawTextOnPath(text, byteLength, path, matrix, *apf.paint
()); | 153 this->INHERITED::onDrawTextOnPath(text, byteLength, path, matrix, *apf.paint
()); |
| 151 } | 154 } |
| 152 | 155 |
| 153 void SkPaintFilterCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkS
calar y, | 156 void SkPaintFilterCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkS
calar y, |
| 154 const SkPaint& paint) { | 157 const SkPaint& paint) { |
| 155 AutoPaintFilter apf(this, kTextBlob_Type, paint); | 158 AutoPaintFilter apf(this, kTextBlob_Type, paint); |
| 156 this->INHERITED::onDrawTextBlob(blob, x, y, *apf.paint()); | 159 this->INHERITED::onDrawTextBlob(blob, x, y, *apf.paint()); |
| 157 } | 160 } |
| OLD | NEW |