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

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

Issue 253633003: add asAShadowBlur for android to drawlooper (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add unittests (and fix bugs in layerdrawlooper) Created 6 years, 7 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/SkDrawLooper.cpp ('k') | src/effects/SkBlurDrawLooper.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 "SkMaskFilter.h" 10 #include "SkMaskFilter.h"
11 #include "SkBlitter.h" 11 #include "SkBlitter.h"
12 #include "SkBounder.h" 12 #include "SkBounder.h"
13 #include "SkDraw.h" 13 #include "SkDraw.h"
14 #include "SkRasterClip.h" 14 #include "SkRasterClip.h"
15 #include "SkRRect.h" 15 #include "SkRRect.h"
16 #include "SkTypes.h" 16 #include "SkTypes.h"
17 17
18 #if SK_SUPPORT_GPU 18 #if SK_SUPPORT_GPU
19 #include "GrTexture.h" 19 #include "GrTexture.h"
20 #include "SkGr.h" 20 #include "SkGr.h"
21 #include "SkGrPixelRef.h" 21 #include "SkGrPixelRef.h"
22 #endif 22 #endif
23 23
24 bool SkMaskFilter::filterMask(SkMask*, const SkMask&, const SkMatrix&, 24 bool SkMaskFilter::filterMask(SkMask*, const SkMask&, const SkMatrix&,
25 SkIPoint*) const { 25 SkIPoint*) const {
26 return false; 26 return false;
27 } 27 }
28 28
29 bool SkMaskFilter::asABlur(BlurRec*) const {
30 return false;
31 }
32
29 static void extractMaskSubset(const SkMask& src, SkMask* dst) { 33 static void extractMaskSubset(const SkMask& src, SkMask* dst) {
30 SkASSERT(src.fBounds.contains(dst->fBounds)); 34 SkASSERT(src.fBounds.contains(dst->fBounds));
31 35
32 const int dx = dst->fBounds.left() - src.fBounds.left(); 36 const int dx = dst->fBounds.left() - src.fBounds.left();
33 const int dy = dst->fBounds.top() - src.fBounds.top(); 37 const int dy = dst->fBounds.top() - src.fBounds.top();
34 dst->fImage = src.fImage + dy * src.fRowBytes + dx; 38 dst->fImage = src.fImage + dy * src.fRowBytes + dx;
35 dst->fRowBytes = src.fRowBytes; 39 dst->fRowBytes = src.fRowBytes;
36 dst->fFormat = src.fFormat; 40 dst->fFormat = src.fFormat;
37 } 41 }
38 42
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 srcM.fRowBytes = 0; 345 srcM.fRowBytes = 0;
342 srcM.fFormat = SkMask::kA8_Format; 346 srcM.fFormat = SkMask::kA8_Format;
343 347
344 SkIPoint margin; // ignored 348 SkIPoint margin; // ignored
345 if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) { 349 if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) {
346 dst->set(dstM.fBounds); 350 dst->set(dstM.fBounds);
347 } else { 351 } else {
348 dst->set(srcM.fBounds); 352 dst->set(srcM.fBounds);
349 } 353 }
350 } 354 }
OLDNEW
« no previous file with comments | « src/core/SkDrawLooper.cpp ('k') | src/effects/SkBlurDrawLooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698