Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: src/core/SkBlitter_Sprite.cpp

Issue 173893002: use colortype instead of config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkSpriteBlitter.h" 10 #include "SkSpriteBlitter.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 since by definition there is no scale in the matrix. Ignoring antialiasi ng is 59 since by definition there is no scale in the matrix. Ignoring antialiasi ng is
60 a bit of a hack, since we "could" pass in the fractional left/top for th e bitmap, 60 a bit of a hack, since we "could" pass in the fractional left/top for th e bitmap,
61 and respect that by blending the edges of the bitmap against the device. To support 61 and respect that by blending the edges of the bitmap against the device. To support
62 this we could either add more special blitters here, or detect antialias ing in the 62 this we could either add more special blitters here, or detect antialias ing in the
63 paint and return null if it is set, forcing the client to take the slow shader case 63 paint and return null if it is set, forcing the client to take the slow shader case
64 (which does respect soft edges). 64 (which does respect soft edges).
65 */ 65 */
66 66
67 SkSpriteBlitter* blitter; 67 SkSpriteBlitter* blitter;
68 68
69 switch (device.config()) { 69 switch (device.colorType()) {
70 case SkBitmap::kRGB_565_Config: 70 case kRGB_565_SkColorType:
71 blitter = SkSpriteBlitter::ChooseD16(source, paint, storage, 71 blitter = SkSpriteBlitter::ChooseD16(source, paint, storage,
72 storageSize); 72 storageSize);
73 break; 73 break;
74 case SkBitmap::kARGB_8888_Config: 74 case kPMColor_SkColorType:
75 blitter = SkSpriteBlitter::ChooseD32(source, paint, storage, 75 blitter = SkSpriteBlitter::ChooseD32(source, paint, storage,
76 storageSize); 76 storageSize);
77 break; 77 break;
78 default: 78 default:
79 blitter = NULL; 79 blitter = NULL;
80 break; 80 break;
81 } 81 }
82 82
83 if (blitter) { 83 if (blitter) {
84 blitter->setup(device, left, top, paint); 84 blitter->setup(device, left, top, paint);
85 } 85 }
86 return blitter; 86 return blitter;
87 } 87 }
OLDNEW
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698