| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkData.h" | 10 #include "SkData.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, | 125 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, |
| 126 int x, int y, const SkPaint& paint) SK_OVERRIDE { | 126 int x, int y, const SkPaint& paint) SK_OVERRIDE { |
| 127 this->addBitmap(bitmap); | 127 this->addBitmap(bitmap); |
| 128 } | 128 } |
| 129 virtual void drawText(const SkDraw&, const void* text, size_t len, | 129 virtual void drawText(const SkDraw&, const void* text, size_t len, |
| 130 SkScalar x, SkScalar y, | 130 SkScalar x, SkScalar y, |
| 131 const SkPaint& paint) SK_OVERRIDE { | 131 const SkPaint& paint) SK_OVERRIDE { |
| 132 this->addBitmapFromPaint(paint); | 132 this->addBitmapFromPaint(paint); |
| 133 } | 133 } |
| 134 virtual void drawPosText(const SkDraw&, const void* text, size_t len, | 134 virtual void drawPosText(const SkDraw&, const void* text, size_t len, |
| 135 const SkScalar pos[], SkScalar constY, | 135 const SkScalar pos[], int, |
| 136 int, const SkPaint& paint) SK_OVERRIDE { | 136 const SkPoint&, const SkPaint& paint) SK_OVERRIDE { |
| 137 this->addBitmapFromPaint(paint); | 137 this->addBitmapFromPaint(paint); |
| 138 } | 138 } |
| 139 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, | 139 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, |
| 140 const SkPath& path, const SkMatrix* matrix, | 140 const SkPath& path, const SkMatrix* matrix, |
| 141 const SkPaint& paint) SK_OVERRIDE { | 141 const SkPaint& paint) SK_OVERRIDE { |
| 142 this->addBitmapFromPaint(paint); | 142 this->addBitmapFromPaint(paint); |
| 143 } | 143 } |
| 144 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, | 144 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, |
| 145 const SkPoint verts[], const SkPoint texs[], | 145 const SkPoint verts[], const SkPoint texs[], |
| 146 const SkColor colors[], SkXfermode* xmode, | 146 const SkColor colors[], SkXfermode* xmode, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 canvas.clipRect(area, SkRegion::kIntersect_Op, false); | 211 canvas.clipRect(area, SkRegion::kIntersect_Op, false); |
| 212 canvas.drawPicture(pict); | 212 canvas.drawPicture(pict); |
| 213 | 213 |
| 214 SkData* data = NULL; | 214 SkData* data = NULL; |
| 215 int count = array.count(); | 215 int count = array.count(); |
| 216 if (count > 0) { | 216 if (count > 0) { |
| 217 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*)
); | 217 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*)
); |
| 218 } | 218 } |
| 219 return data; | 219 return data; |
| 220 } | 220 } |
| OLD | NEW |