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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 const SkPoint verts[], const SkPoint textures[
], | 357 const SkPoint verts[], const SkPoint textures[
], |
358 const SkColor colors[], SkXfermode* xmode, | 358 const SkColor colors[], SkXfermode* xmode, |
359 const uint16_t indices[], int indexCount, | 359 const uint16_t indices[], int indexCount, |
360 const SkPaint& paint) { | 360 const SkPaint& paint) { |
361 draw.drawVertices(vmode, vertexCount, verts, textures, colors, xmode, | 361 draw.drawVertices(vmode, vertexCount, verts, textures, colors, xmode, |
362 indices, indexCount, paint); | 362 indices, indexCount, paint); |
363 } | 363 } |
364 | 364 |
365 void SkBitmapDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device, | 365 void SkBitmapDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device, |
366 int x, int y, const SkPaint& paint) { | 366 int x, int y, const SkPaint& paint) { |
| 367 SkASSERT(!paint.getImageFilter()); |
367 draw.drawSprite(static_cast<SkBitmapDevice*>(device)->fBitmap, x, y, paint); | 368 draw.drawSprite(static_cast<SkBitmapDevice*>(device)->fBitmap, x, y, paint); |
368 } | 369 } |
369 | 370 |
370 /////////////////////////////////////////////////////////////////////////////// | 371 /////////////////////////////////////////////////////////////////////////////// |
371 | 372 |
372 void SkBitmapDevice::drawSpecial(const SkDraw& draw, SkSpecialImage* srcImg, int
x, int y, | 373 void SkBitmapDevice::drawSpecial(const SkDraw& draw, SkSpecialImage* srcImg, int
x, int y, |
373 const SkPaint& paint) { | 374 const SkPaint& paint) { |
374 SkASSERT(!srcImg->isTextureBacked()); | 375 SkASSERT(!srcImg->isTextureBacked()); |
375 | 376 |
376 SkBitmap resultBM; | 377 SkBitmap resultBM; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 paint.getRasterizer() || | 432 paint.getRasterizer() || |
432 paint.getPathEffect() || | 433 paint.getPathEffect() || |
433 paint.isFakeBoldText() || | 434 paint.isFakeBoldText() || |
434 paint.getStyle() != SkPaint::kFill_Style || | 435 paint.getStyle() != SkPaint::kFill_Style || |
435 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) | 436 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) |
436 { | 437 { |
437 return true; | 438 return true; |
438 } | 439 } |
439 return false; | 440 return false; |
440 } | 441 } |
OLD | NEW |