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

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

Issue 1164373003: Revert of change SkDraw and all Blitters to use pixmap instead of bitmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « src/core/SkBlitMask.h ('k') | src/core/SkBlitter.h » ('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 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "SkBlitMask.h" 8 #include "SkBlitMask.h"
9 #include "SkColor.h" 9 #include "SkColor.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 default: 140 default:
141 break; 141 break;
142 } 142 }
143 break; 143 break;
144 default: 144 default:
145 break; 145 break;
146 } 146 }
147 return NULL; 147 return NULL;
148 } 148 }
149 149
150 bool SkBlitMask::BlitColor(const SkPixmap& device, const SkMask& mask, 150 bool SkBlitMask::BlitColor(const SkBitmap& device, const SkMask& mask,
151 const SkIRect& clip, SkColor color) { 151 const SkIRect& clip, SkColor color) {
152 ColorProc proc = ColorFactory(device.colorType(), mask.fFormat, color); 152 ColorProc proc = ColorFactory(device.colorType(), mask.fFormat, color);
153 if (proc) { 153 if (proc) {
154 int x = clip.fLeft; 154 int x = clip.fLeft;
155 int y = clip.fTop; 155 int y = clip.fTop;
156 proc(device.writable_addr32(x, y), device.rowBytes(), mask.getAddr(x, y) , 156 proc(device.getAddr32(x, y), device.rowBytes(), mask.getAddr(x, y),
157 mask.fRowBytes, color, clip.width(), clip.height()); 157 mask.fRowBytes, color, clip.width(), clip.height());
158 return true; 158 return true;
159 } 159 }
160 return false; 160 return false;
161 } 161 }
162 162
163 /////////////////////////////////////////////////////////////////////////////// 163 ///////////////////////////////////////////////////////////////////////////////
164 /////////////////////////////////////////////////////////////////////////////// 164 ///////////////////////////////////////////////////////////////////////////////
165 165
166 static void BW_RowProc_Blend(SkPMColor* SK_RESTRICT dst, 166 static void BW_RowProc_Blend(SkPMColor* SK_RESTRICT dst,
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 if (flags & kSrcIsOpaque_RowFlag) { 389 if (flags & kSrcIsOpaque_RowFlag) {
390 index |= 1; 390 index |= 1;
391 } 391 }
392 SkASSERT((size_t)index < SK_ARRAY_COUNT(gProcs)); 392 SkASSERT((size_t)index < SK_ARRAY_COUNT(gProcs));
393 return gProcs[index]; 393 return gProcs[index];
394 default: 394 default:
395 break; 395 break;
396 } 396 }
397 return NULL; 397 return NULL;
398 } 398 }
OLDNEW
« no previous file with comments | « src/core/SkBlitMask.h ('k') | src/core/SkBlitter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698