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

Side by Side Diff: include/effects/SkMorphologyImageFilter.h

Issue 137423005: Implement a computeFastBounds() traversal for SkImageFilter. This allows for correct culling of pri… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix Win build; update to ToT Created 6 years, 11 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 | « include/effects/SkDropShadowImageFilter.h ('k') | include/effects/SkOffsetImageFilter.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 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 8
9 #ifndef SkMorphologyImageFilter_DEFINED 9 #ifndef SkMorphologyImageFilter_DEFINED
10 #define SkMorphologyImageFilter_DEFINED 10 #define SkMorphologyImageFilter_DEFINED
11 11
12 #include "SkColor.h" 12 #include "SkColor.h"
13 #include "SkImageFilter.h" 13 #include "SkImageFilter.h"
14 #include "SkSize.h" 14 #include "SkSize.h"
15 15
16 class SK_API SkMorphologyImageFilter : public SkImageFilter { 16 class SK_API SkMorphologyImageFilter : public SkImageFilter {
17 public: 17 public:
18 SkMorphologyImageFilter(int radiusX, int radiusY, SkImageFilter* input, cons t CropRect* cropRect); 18 SkMorphologyImageFilter(int radiusX, int radiusY, SkImageFilter* input, cons t CropRect* cropRect);
19 virtual void computeFastBounds(const SkRect& src, SkRect* dst) const SK_OVER RIDE;
19 20
20 /** 21 /**
21 * All morphology procs have the same signature: src is the source buffer, d st the 22 * All morphology procs have the same signature: src is the source buffer, d st the
22 * destination buffer, radius is the morphology radius, width and height are the bounds 23 * destination buffer, radius is the morphology radius, width and height are the bounds
23 * of the destination buffer (in pixels), and srcStride and dstStride are th e 24 * of the destination buffer (in pixels), and srcStride and dstStride are th e
24 * number of pixels per row in each buffer. All buffers are 8888. 25 * number of pixels per row in each buffer. All buffers are 8888.
25 */ 26 */
26 27
27 typedef void (*Proc)(const SkPMColor* src, SkPMColor* dst, int radius, 28 typedef void (*Proc)(const SkPMColor* src, SkPMColor* dst, int radius,
28 int width, int height, int srcStride, int dstStride); 29 int width, int height, int srcStride, int dstStride);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter) 88 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter)
88 89
89 protected: 90 protected:
90 SkErodeImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {} 91 SkErodeImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
91 92
92 private: 93 private:
93 typedef SkMorphologyImageFilter INHERITED; 94 typedef SkMorphologyImageFilter INHERITED;
94 }; 95 };
95 96
96 #endif 97 #endif
OLDNEW
« no previous file with comments | « include/effects/SkDropShadowImageFilter.h ('k') | include/effects/SkOffsetImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698