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" |
11 #include "SkRasterClip.h" | 11 #include "SkRasterClip.h" |
12 #include "SkShader.h" | 12 #include "SkShader.h" |
13 | 13 |
14 SK_DEFINE_INST_COUNT(SkBitmapDevice) | |
15 | |
16 #define CHECK_FOR_ANNOTATION(paint) \ | 14 #define CHECK_FOR_ANNOTATION(paint) \ |
17 do { if (paint.getAnnotation()) { return; } } while (0) | 15 do { if (paint.getAnnotation()) { return; } } while (0) |
18 | 16 |
19 SkBitmapDevice::SkBitmapDevice(const SkBitmap& bitmap) | 17 SkBitmapDevice::SkBitmapDevice(const SkBitmap& bitmap) |
20 : fBitmap(bitmap) { | 18 : fBitmap(bitmap) { |
21 SkASSERT(SkBitmap::kARGB_4444_Config != bitmap.config()); | 19 SkASSERT(SkBitmap::kARGB_4444_Config != bitmap.config()); |
22 } | 20 } |
23 | 21 |
24 SkBitmapDevice::SkBitmapDevice(const SkBitmap& bitmap, const SkDeviceProperties&
deviceProperties) | 22 SkBitmapDevice::SkBitmapDevice(const SkBitmap& bitmap, const SkDeviceProperties&
deviceProperties) |
25 : SkBaseDevice(deviceProperties) | 23 : SkBaseDevice(deviceProperties) |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 paint.getStyle() != SkPaint::kFill_Style || | 387 paint.getStyle() != SkPaint::kFill_Style || |
390 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { | 388 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { |
391 // turn off lcd | 389 // turn off lcd |
392 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; | 390 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; |
393 flags->fHinting = paint.getHinting(); | 391 flags->fHinting = paint.getHinting(); |
394 return true; | 392 return true; |
395 } | 393 } |
396 // we're cool with the paint as is | 394 // we're cool with the paint as is |
397 return false; | 395 return false; |
398 } | 396 } |
OLD | NEW |