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 27 matching lines...) Expand all Loading... |
38 } | 38 } |
39 | 39 |
40 SkAlphaType canonicalAlphaType = info.alphaType(); | 40 SkAlphaType canonicalAlphaType = info.alphaType(); |
41 | 41 |
42 switch (info.colorType()) { | 42 switch (info.colorType()) { |
43 case kAlpha_8_SkColorType: | 43 case kAlpha_8_SkColorType: |
44 break; | 44 break; |
45 case kRGB_565_SkColorType: | 45 case kRGB_565_SkColorType: |
46 canonicalAlphaType = kOpaque_SkAlphaType; | 46 canonicalAlphaType = kOpaque_SkAlphaType; |
47 break; | 47 break; |
48 case kN32_SkColorType: | 48 case kPMColor_SkColorType: |
49 break; | 49 break; |
50 default: | 50 default: |
51 return false; | 51 return false; |
52 } | 52 } |
53 | 53 |
54 if (newAlphaType) { | 54 if (newAlphaType) { |
55 *newAlphaType = canonicalAlphaType; | 55 *newAlphaType = canonicalAlphaType; |
56 } | 56 } |
57 return true; | 57 return true; |
58 } | 58 } |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 paint.getStyle() != SkPaint::kFill_Style || | 464 paint.getStyle() != SkPaint::kFill_Style || |
465 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { | 465 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { |
466 // turn off lcd | 466 // turn off lcd |
467 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; | 467 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; |
468 flags->fHinting = paint.getHinting(); | 468 flags->fHinting = paint.getHinting(); |
469 return true; | 469 return true; |
470 } | 470 } |
471 // we're cool with the paint as is | 471 // we're cool with the paint as is |
472 return false; | 472 return false; |
473 } | 473 } |
OLD | NEW |