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

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

Issue 1823573003: Change signatures of filter bounds methods to return a rect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Hide legacy API behind #ifdef; switch callers to new API Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 "SkLocalMatrixImageFilter.h" 8 #include "SkLocalMatrixImageFilter.h"
9 #include "SkReadBuffer.h" 9 #include "SkReadBuffer.h"
10 #include "SkString.h" 10 #include "SkString.h"
(...skipping 27 matching lines...) Expand all
38 buffer.writeMatrix(fLocalM); 38 buffer.writeMatrix(fLocalM);
39 } 39 }
40 40
41 bool SkLocalMatrixImageFilter::onFilterImageDeprecated(Proxy* proxy, const SkBit map& src, 41 bool SkLocalMatrixImageFilter::onFilterImageDeprecated(Proxy* proxy, const SkBit map& src,
42 const Context& ctx, 42 const Context& ctx,
43 SkBitmap* result, SkIPoin t* offset) const { 43 SkBitmap* result, SkIPoin t* offset) const {
44 Context localCtx(SkMatrix::Concat(ctx.ctm(), fLocalM), ctx.clipBounds(), ctx .cache()); 44 Context localCtx(SkMatrix::Concat(ctx.ctm(), fLocalM), ctx.clipBounds(), ctx .cache());
45 return this->filterInputDeprecated(0, proxy, src, localCtx, result, offset); 45 return this->filterInputDeprecated(0, proxy, src, localCtx, result, offset);
46 } 46 }
47 47
48 bool SkLocalMatrixImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix & matrix, 48 SkIRect SkLocalMatrixImageFilter::onFilterBounds(const SkIRect& src, const SkMat rix& matrix,
49 SkIRect* dst, MapDirection directi on) const { 49 MapDirection direction) const {
50 return this->getInput(0)->filterBounds(src, SkMatrix::Concat(matrix, fLocalM ), dst, direction); 50 return this->getInput(0)->filterBounds(src, SkMatrix::Concat(matrix, fLocalM ), direction);
51 } 51 }
52 52
53 #ifndef SK_IGNORE_TO_STRING 53 #ifndef SK_IGNORE_TO_STRING
54 void SkLocalMatrixImageFilter::toString(SkString* str) const { 54 void SkLocalMatrixImageFilter::toString(SkString* str) const {
55 str->append("SkLocalMatrixImageFilter: ("); 55 str->append("SkLocalMatrixImageFilter: (");
56 str->append(")"); 56 str->append(")");
57 } 57 }
58 #endif 58 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698