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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 AutoPaintFilter apf(this, kBitmap_Type, paint); | 103 AutoPaintFilter apf(this, kBitmap_Type, paint); |
104 this->INHERITED::onDrawImageRect(image, src, dst, apf.paint(), constraint); | 104 this->INHERITED::onDrawImageRect(image, src, dst, apf.paint(), constraint); |
105 } | 105 } |
106 | 106 |
107 void SkPaintFilterCanvas::onDrawBitmapNine(const SkBitmap& bm, const SkIRect& ce
nter, | 107 void SkPaintFilterCanvas::onDrawBitmapNine(const SkBitmap& bm, const SkIRect& ce
nter, |
108 const SkRect& dst, const SkPaint* pai
nt) { | 108 const SkRect& dst, const SkPaint* pai
nt) { |
109 AutoPaintFilter apf(this, kBitmap_Type, paint); | 109 AutoPaintFilter apf(this, kBitmap_Type, paint); |
110 this->INHERITED::onDrawBitmapNine(bm, center, dst, apf.paint()); | 110 this->INHERITED::onDrawBitmapNine(bm, center, dst, apf.paint()); |
111 } | 111 } |
112 | 112 |
| 113 void SkPaintFilterCanvas::onDrawSprite(const SkBitmap& bm, int left, int top, |
| 114 const SkPaint* paint) { |
| 115 AutoPaintFilter apf(this, kBitmap_Type, paint); |
| 116 this->INHERITED::onDrawSprite(bm, left, top, apf.paint()); |
| 117 } |
| 118 |
113 void SkPaintFilterCanvas::onDrawVertices(VertexMode vmode, int vertexCount, | 119 void SkPaintFilterCanvas::onDrawVertices(VertexMode vmode, int vertexCount, |
114 const SkPoint vertices[], const SkPoint
texs[], | 120 const SkPoint vertices[], const SkPoint
texs[], |
115 const SkColor colors[], SkXfermode* xmo
de, | 121 const SkColor colors[], SkXfermode* xmo
de, |
116 const uint16_t indices[], int indexCoun
t, | 122 const uint16_t indices[], int indexCoun
t, |
117 const SkPaint& paint) { | 123 const SkPaint& paint) { |
118 AutoPaintFilter apf(this, kVertices_Type, paint); | 124 AutoPaintFilter apf(this, kVertices_Type, paint); |
119 this->INHERITED::onDrawVertices(vmode, vertexCount, vertices, texs, colors,
xmode, indices, | 125 this->INHERITED::onDrawVertices(vmode, vertexCount, vertices, texs, colors,
xmode, indices, |
120 indexCount, *apf.paint()); | 126 indexCount, *apf.paint()); |
121 } | 127 } |
122 | 128 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 const SkMatrix* matrix, const SkPaint
& paint) { | 161 const SkMatrix* matrix, const SkPaint
& paint) { |
156 AutoPaintFilter apf(this, kText_Type, paint); | 162 AutoPaintFilter apf(this, kText_Type, paint); |
157 this->INHERITED::onDrawTextOnPath(text, byteLength, path, matrix, *apf.paint
()); | 163 this->INHERITED::onDrawTextOnPath(text, byteLength, path, matrix, *apf.paint
()); |
158 } | 164 } |
159 | 165 |
160 void SkPaintFilterCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkS
calar y, | 166 void SkPaintFilterCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkS
calar y, |
161 const SkPaint& paint) { | 167 const SkPaint& paint) { |
162 AutoPaintFilter apf(this, kTextBlob_Type, paint); | 168 AutoPaintFilter apf(this, kTextBlob_Type, paint); |
163 this->INHERITED::onDrawTextBlob(blob, x, y, *apf.paint()); | 169 this->INHERITED::onDrawTextBlob(blob, x, y, *apf.paint()); |
164 } | 170 } |
OLD | NEW |