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

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

Issue 376953003: Clean up SkImageFilter constructors. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed 100-col issues Created 6 years, 5 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/effects/SkMergeImageFilter.cpp ('k') | src/effects/SkOffsetImageFilter.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 * 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 #include "SkMorphologyImageFilter.h" 8 #include "SkMorphologyImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 14 matching lines...) Expand all
25 fRadius.fWidth = buffer.readInt(); 25 fRadius.fWidth = buffer.readInt();
26 fRadius.fHeight = buffer.readInt(); 26 fRadius.fHeight = buffer.readInt();
27 buffer.validate((fRadius.fWidth >= 0) && 27 buffer.validate((fRadius.fWidth >= 0) &&
28 (fRadius.fHeight >= 0)); 28 (fRadius.fHeight >= 0));
29 } 29 }
30 30
31 SkMorphologyImageFilter::SkMorphologyImageFilter(int radiusX, 31 SkMorphologyImageFilter::SkMorphologyImageFilter(int radiusX,
32 int radiusY, 32 int radiusY,
33 SkImageFilter* input, 33 SkImageFilter* input,
34 const CropRect* cropRect) 34 const CropRect* cropRect)
35 : INHERITED(input, cropRect), fRadius(SkISize::Make(radiusX, radiusY)) { 35 : INHERITED(1, &input, cropRect), fRadius(SkISize::Make(radiusX, radiusY)) {
36 } 36 }
37 37
38 38
39 void SkMorphologyImageFilter::flatten(SkWriteBuffer& buffer) const { 39 void SkMorphologyImageFilter::flatten(SkWriteBuffer& buffer) const {
40 this->INHERITED::flatten(buffer); 40 this->INHERITED::flatten(buffer);
41 buffer.writeInt(fRadius.fWidth); 41 buffer.writeInt(fRadius.fWidth);
42 buffer.writeInt(fRadius.fHeight); 42 buffer.writeInt(fRadius.fHeight);
43 } 43 }
44 44
45 enum MorphDirection { 45 enum MorphDirection {
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 SkBitmap* result, SkIPoint* offset) con st { 578 SkBitmap* result, SkIPoint* offset) con st {
579 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset); 579 return this->filterImageGPUGeneric(true, proxy, src, ctx, result, offset);
580 } 580 }
581 581
582 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx, 582 bool SkErodeImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx,
583 SkBitmap* result, SkIPoint* offset) cons t { 583 SkBitmap* result, SkIPoint* offset) cons t {
584 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset); 584 return this->filterImageGPUGeneric(false, proxy, src, ctx, result, offset);
585 } 585 }
586 586
587 #endif 587 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMergeImageFilter.cpp ('k') | src/effects/SkOffsetImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698