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

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

Issue 300263005: Revert "Revert of add colortable support to imagegenerator (https://codereview.chromium.org/3044430… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 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/SkCanvas.cpp ('k') | src/image/SkImage_Raster.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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 static bool draw_rects_into_mask(const SkRect rects[], int count, SkMask* mask) { 235 static bool draw_rects_into_mask(const SkRect rects[], int count, SkMask* mask) {
236 if (!prepare_to_draw_into_mask(rects[0], mask)) { 236 if (!prepare_to_draw_into_mask(rects[0], mask)) {
237 return false; 237 return false;
238 } 238 }
239 239
240 SkBitmap bitmap; 240 SkBitmap bitmap;
241 bitmap.installPixels(SkImageInfo::Make(mask->fBounds.width(), 241 bitmap.installPixels(SkImageInfo::Make(mask->fBounds.width(),
242 mask->fBounds.height(), 242 mask->fBounds.height(),
243 kAlpha_8_SkColorType, 243 kAlpha_8_SkColorType,
244 kPremul_SkAlphaType), 244 kPremul_SkAlphaType),
245 mask->fImage, mask->fRowBytes, NULL, NULL); 245 mask->fImage, mask->fRowBytes);
246 246
247 SkCanvas canvas(bitmap); 247 SkCanvas canvas(bitmap);
248 canvas.translate(-SkIntToScalar(mask->fBounds.left()), 248 canvas.translate(-SkIntToScalar(mask->fBounds.left()),
249 -SkIntToScalar(mask->fBounds.top())); 249 -SkIntToScalar(mask->fBounds.top()));
250 250
251 SkPaint paint; 251 SkPaint paint;
252 paint.setAntiAlias(true); 252 paint.setAntiAlias(true);
253 253
254 if (1 == count) { 254 if (1 == count) {
255 canvas.drawRect(rects[0], paint); 255 canvas.drawRect(rects[0], paint);
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 } else { 1224 } else {
1225 str->append("None"); 1225 str->append("None");
1226 } 1226 }
1227 str->append("))"); 1227 str->append("))");
1228 } 1228 }
1229 #endif 1229 #endif
1230 1230
1231 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1231 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1232 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1232 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1233 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1233 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698