| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkConfig8888.h" | 9 #include "SkConfig8888.h" |
| 10 #include "SkDraw.h" | 10 #include "SkDraw.h" |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 int x, int y, const SkPaint& paint) { | 322 int x, int y, const SkPaint& paint) { |
| 323 draw.drawSprite(bitmap, x, y, paint); | 323 draw.drawSprite(bitmap, x, y, paint); |
| 324 } | 324 } |
| 325 | 325 |
| 326 void SkBitmapDevice::drawText(const SkDraw& draw, const void* text, size_t len, | 326 void SkBitmapDevice::drawText(const SkDraw& draw, const void* text, size_t len, |
| 327 SkScalar x, SkScalar y, const SkPaint& paint) { | 327 SkScalar x, SkScalar y, const SkPaint& paint) { |
| 328 draw.drawText((const char*)text, len, x, y, paint); | 328 draw.drawText((const char*)text, len, x, y, paint); |
| 329 } | 329 } |
| 330 | 330 |
| 331 void SkBitmapDevice::drawPosText(const SkDraw& draw, const void* text, size_t le
n, | 331 void SkBitmapDevice::drawPosText(const SkDraw& draw, const void* text, size_t le
n, |
| 332 const SkScalar xpos[], SkScalar y, | 332 const SkScalar xpos[], int scalarsPerPos, |
| 333 int scalarsPerPos, const SkPaint& paint) { | 333 const SkPoint& offset, const SkPaint& paint) { |
| 334 draw.drawPosText((const char*)text, len, xpos, y, scalarsPerPos, paint); | 334 draw.drawPosText((const char*)text, len, xpos, scalarsPerPos, offset, paint)
; |
| 335 } | 335 } |
| 336 | 336 |
| 337 void SkBitmapDevice::drawTextOnPath(const SkDraw& draw, const void* text, | 337 void SkBitmapDevice::drawTextOnPath(const SkDraw& draw, const void* text, |
| 338 size_t len, const SkPath& path, | 338 size_t len, const SkPath& path, |
| 339 const SkMatrix* matrix, | 339 const SkMatrix* matrix, |
| 340 const SkPaint& paint) { | 340 const SkPaint& paint) { |
| 341 draw.drawTextOnPath((const char*)text, len, path, matrix, paint); | 341 draw.drawTextOnPath((const char*)text, len, path, matrix, paint); |
| 342 } | 342 } |
| 343 | 343 |
| 344 void SkBitmapDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode
, | 344 void SkBitmapDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode
, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 paint.getStyle() != SkPaint::kFill_Style || | 396 paint.getStyle() != SkPaint::kFill_Style || |
| 397 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { | 397 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { |
| 398 // turn off lcd, but turn on kGenA8 | 398 // turn off lcd, but turn on kGenA8 |
| 399 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; | 399 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; |
| 400 flags->fFlags |= SkPaint::kGenA8FromLCD_Flag; | 400 flags->fFlags |= SkPaint::kGenA8FromLCD_Flag; |
| 401 return true; | 401 return true; |
| 402 } | 402 } |
| 403 // we're cool with the paint as is | 403 // we're cool with the paint as is |
| 404 return false; | 404 return false; |
| 405 } | 405 } |
| OLD | NEW |