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

Side by Side Diff: src/effects/SkBlurMaskFilter.cpp

Issue 169913003: replace SkBitmap::Config with SkColorType in gms (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/SkBitmap.cpp ('k') | src/effects/SkLayerRasterizer.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 #include "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkBlurMask.h" 10 #include "SkBlurMask.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 189
190 static bool draw_rrect_into_mask(const SkRRect rrect, SkMask* mask) { 190 static bool draw_rrect_into_mask(const SkRRect rrect, SkMask* mask) {
191 if (!prepare_to_draw_into_mask(rrect.rect(), mask)) { 191 if (!prepare_to_draw_into_mask(rrect.rect(), mask)) {
192 return false; 192 return false;
193 } 193 }
194 194
195 // FIXME: This code duplicates code in draw_rects_into_mask, below. Is there a 195 // FIXME: This code duplicates code in draw_rects_into_mask, below. Is there a
196 // clean way to share more code? 196 // clean way to share more code?
197 SkBitmap bitmap; 197 SkBitmap bitmap;
198 bitmap.installPixels(SkImageInfo::MakeA8(mask->fBounds.width(), 198 bitmap.installMaskPixels(*mask);
199 mask->fBounds.height()),
200 mask->fImage, mask->fRowBytes, NULL, NULL);
201 199
202 SkCanvas canvas(bitmap); 200 SkCanvas canvas(bitmap);
203 canvas.translate(-SkIntToScalar(mask->fBounds.left()), 201 canvas.translate(-SkIntToScalar(mask->fBounds.left()),
204 -SkIntToScalar(mask->fBounds.top())); 202 -SkIntToScalar(mask->fBounds.top()));
205 203
206 SkPaint paint; 204 SkPaint paint;
207 paint.setAntiAlias(true); 205 paint.setAntiAlias(true);
208 canvas.drawRRect(rrect, paint); 206 canvas.drawRRect(rrect, paint);
209 return true; 207 return true;
210 } 208 }
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 } else { 895 } else {
898 str->append("None"); 896 str->append("None");
899 } 897 }
900 str->append("))"); 898 str->append("))");
901 } 899 }
902 #endif 900 #endif
903 901
904 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 902 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
905 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 903 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
906 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 904 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | src/effects/SkLayerRasterizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698