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 "SkAndroidSDKCanvas.h" | 8 #include "SkAndroidSDKCanvas.h" |
9 | 9 |
10 #include "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 FILTER_PTR(paint); | 149 FILTER_PTR(paint); |
150 fProxyTarget->legacy_drawBitmapRect(bitmap, src, dst, filteredPaint, constra
int); | 150 fProxyTarget->legacy_drawBitmapRect(bitmap, src, dst, filteredPaint, constra
int); |
151 } | 151 } |
152 void SkAndroidSDKCanvas::onDrawBitmapNine(const SkBitmap& bitmap, | 152 void SkAndroidSDKCanvas::onDrawBitmapNine(const SkBitmap& bitmap, |
153 const SkIRect& center, | 153 const SkIRect& center, |
154 const SkRect& dst, | 154 const SkRect& dst, |
155 const SkPaint* paint) { | 155 const SkPaint* paint) { |
156 FILTER_PTR(paint); | 156 FILTER_PTR(paint); |
157 fProxyTarget->drawBitmapNine(bitmap, center, dst, filteredPaint); | 157 fProxyTarget->drawBitmapNine(bitmap, center, dst, filteredPaint); |
158 } | 158 } |
| 159 void SkAndroidSDKCanvas::onDrawSprite(const SkBitmap& bitmap, |
| 160 int left, |
| 161 int top, |
| 162 const SkPaint* paint) { |
| 163 FILTER_PTR(paint); |
| 164 fProxyTarget->drawSprite(bitmap, left, top, filteredPaint); |
| 165 } |
159 void SkAndroidSDKCanvas::onDrawVertices(VertexMode vMode, | 166 void SkAndroidSDKCanvas::onDrawVertices(VertexMode vMode, |
160 int vertexCount, | 167 int vertexCount, |
161 const SkPoint vertices[], | 168 const SkPoint vertices[], |
162 const SkPoint texs[], const SkColor colors[], SkXfermode* xM
ode, | 169 const SkPoint texs[], const SkColor colors[], SkXfermode* xM
ode, |
163 const uint16_t indices[], int indexCount, | 170 const uint16_t indices[], int indexCount, |
164 const SkPaint& paint) { | 171 const SkPaint& paint) { |
165 FILTER(paint); | 172 FILTER(paint); |
166 fProxyTarget->drawVertices(vMode, vertexCount, vertices, texs, colors, | 173 fProxyTarget->drawVertices(vMode, vertexCount, vertices, texs, colors, |
167 xMode, indices, indexCount, filteredPaint); | 174 xMode, indices, indexCount, filteredPaint); |
168 } | 175 } |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 fProxyTarget->clipPath(path, op, style); | 365 fProxyTarget->clipPath(path, op, style); |
359 } | 366 } |
360 | 367 |
361 void SkAndroidSDKCanvas::onClipRegion(const SkRegion& region, SkRegion::Op op) { | 368 void SkAndroidSDKCanvas::onClipRegion(const SkRegion& region, SkRegion::Op op) { |
362 fProxyTarget->clipRegion(region, op); | 369 fProxyTarget->clipRegion(region, op); |
363 } | 370 } |
364 | 371 |
365 void SkAndroidSDKCanvas::onDiscard() { fProxyTarget->discard(); } | 372 void SkAndroidSDKCanvas::onDiscard() { fProxyTarget->discard(); } |
366 | 373 |
367 | 374 |
OLD | NEW |