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

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

Issue 148883011: Make SkImageFilter methods const. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More fixes to gm/ 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
« no previous file with comments | « src/effects/SkTestImageFilters.cpp ('k') | src/effects/SkXfermodeImageFilter.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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 "SkTileImageFilter.h" 8 #include "SkTileImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
11 #include "SkDevice.h" 11 #include "SkDevice.h"
12 #include "SkReadBuffer.h" 12 #include "SkReadBuffer.h"
13 #include "SkWriteBuffer.h" 13 #include "SkWriteBuffer.h"
14 #include "SkMatrix.h" 14 #include "SkMatrix.h"
15 #include "SkPaint.h" 15 #include "SkPaint.h"
16 #include "SkShader.h" 16 #include "SkShader.h"
17 #include "SkValidationUtils.h" 17 #include "SkValidationUtils.h"
18 18
19 bool SkTileImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, const S kMatrix& ctm, 19 bool SkTileImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, const S kMatrix& ctm,
20 SkBitmap* dst, SkIPoint* offset) { 20 SkBitmap* dst, SkIPoint* offset) const {
21 SkBitmap source = src; 21 SkBitmap source = src;
22 SkImageFilter* input = getInput(0); 22 SkImageFilter* input = getInput(0);
23 SkIPoint srcOffset = SkIPoint::Make(0, 0); 23 SkIPoint srcOffset = SkIPoint::Make(0, 0);
24 if (input && !input->filterImage(proxy, src, ctm, &source, &srcOffset)) { 24 if (input && !input->filterImage(proxy, src, ctm, &source, &srcOffset)) {
25 return false; 25 return false;
26 } 26 }
27 27
28 SkRect dstRect; 28 SkRect dstRect;
29 ctm.mapRect(&dstRect, fDstRect); 29 ctm.mapRect(&dstRect, fDstRect);
30 SkIRect dstIRect; 30 SkIRect dstIRect;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 buffer.readRect(&fSrcRect); 79 buffer.readRect(&fSrcRect);
80 buffer.readRect(&fDstRect); 80 buffer.readRect(&fDstRect);
81 buffer.validate(buffer.isValid() && SkIsValidRect(fSrcRect) && SkIsValidRect (fDstRect)); 81 buffer.validate(buffer.isValid() && SkIsValidRect(fSrcRect) && SkIsValidRect (fDstRect));
82 } 82 }
83 83
84 void SkTileImageFilter::flatten(SkWriteBuffer& buffer) const { 84 void SkTileImageFilter::flatten(SkWriteBuffer& buffer) const {
85 this->INHERITED::flatten(buffer); 85 this->INHERITED::flatten(buffer);
86 buffer.writeRect(fSrcRect); 86 buffer.writeRect(fSrcRect);
87 buffer.writeRect(fDstRect); 87 buffer.writeRect(fDstRect);
88 } 88 }
OLDNEW
« no previous file with comments | « src/effects/SkTestImageFilters.cpp ('k') | src/effects/SkXfermodeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698