| OLD | NEW |
| 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 22 matching lines...) Expand all Loading... |
| 33 return SkLocalMatrixImageFilter::Create(lm, common.getInput(0)); | 33 return SkLocalMatrixImageFilter::Create(lm, common.getInput(0)); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void SkLocalMatrixImageFilter::flatten(SkWriteBuffer& buffer) const { | 36 void SkLocalMatrixImageFilter::flatten(SkWriteBuffer& buffer) const { |
| 37 this->INHERITED::flatten(buffer); | 37 this->INHERITED::flatten(buffer); |
| 38 buffer.writeMatrix(fLocalM); | 38 buffer.writeMatrix(fLocalM); |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool SkLocalMatrixImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src,
const Context& ctx, | 41 bool SkLocalMatrixImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src,
const Context& ctx, |
| 42 SkBitmap* result, SkIPoint* offset)
const { | 42 SkBitmap* result, SkIPoint* offset)
const { |
| 43 Context localCtx(SkMatrix::Concat(ctx.ctm(), fLocalM), ctx.clipBounds(), ctx
.cache(), | 43 Context localCtx(SkMatrix::Concat(ctx.ctm(), fLocalM), ctx.clipBounds(), ctx
.cache()); |
| 44 ctx.sizeConstraint()); | 44 return this->filterInput(0, proxy, src, localCtx, result, offset); |
| 45 return this->filterInput(0, proxy, src, localCtx, result, offset, false); | |
| 46 } | 45 } |
| 47 | 46 |
| 48 bool SkLocalMatrixImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix
& matrix, | 47 bool SkLocalMatrixImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix
& matrix, |
| 49 SkIRect* dst) const { | 48 SkIRect* dst) const { |
| 50 return this->getInput(0)->filterBounds(src, SkMatrix::Concat(matrix, fLocalM
), dst); | 49 return this->getInput(0)->filterBounds(src, SkMatrix::Concat(matrix, fLocalM
), dst); |
| 51 } | 50 } |
| 52 | 51 |
| 53 #ifndef SK_IGNORE_TO_STRING | 52 #ifndef SK_IGNORE_TO_STRING |
| 54 void SkLocalMatrixImageFilter::toString(SkString* str) const { | 53 void SkLocalMatrixImageFilter::toString(SkString* str) const { |
| 55 str->append("SkLocalMatrixImageFilter: ("); | 54 str->append("SkLocalMatrixImageFilter: ("); |
| 56 str->append(")"); | 55 str->append(")"); |
| 57 } | 56 } |
| 58 #endif | 57 #endif |
| OLD | NEW |