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

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

Issue 2357273002: Add output format properties to SkImageFilter::Context (Closed)
Patch Set: Spelling Created 4 years, 3 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/core/SkImageFilter.cpp ('k') | src/effects/SkAlphaThresholdFilter.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 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 "SkSpecialImage.h" 10 #include "SkSpecialImage.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 void SkLocalMatrixImageFilter::flatten(SkWriteBuffer& buffer) const { 40 void SkLocalMatrixImageFilter::flatten(SkWriteBuffer& buffer) const {
41 this->INHERITED::flatten(buffer); 41 this->INHERITED::flatten(buffer);
42 buffer.writeMatrix(fLocalM); 42 buffer.writeMatrix(fLocalM);
43 } 43 }
44 44
45 sk_sp<SkSpecialImage> SkLocalMatrixImageFilter::onFilterImage(SkSpecialImage* so urce, 45 sk_sp<SkSpecialImage> SkLocalMatrixImageFilter::onFilterImage(SkSpecialImage* so urce,
46 const Context& ctx , 46 const Context& ctx ,
47 SkIPoint* offset) const { 47 SkIPoint* offset) const {
48 Context localCtx(SkMatrix::Concat(ctx.ctm(), fLocalM), ctx.clipBounds(), ctx .cache()); 48 Context localCtx(SkMatrix::Concat(ctx.ctm(), fLocalM), ctx.clipBounds(), ctx .cache(),
49 ctx.outputProperties());
49 return this->filterInput(0, source, localCtx, offset); 50 return this->filterInput(0, source, localCtx, offset);
50 } 51 }
51 52
52 SkIRect SkLocalMatrixImageFilter::onFilterBounds(const SkIRect& src, const SkMat rix& matrix, 53 SkIRect SkLocalMatrixImageFilter::onFilterBounds(const SkIRect& src, const SkMat rix& matrix,
53 MapDirection direction) const { 54 MapDirection direction) const {
54 return this->getInput(0)->filterBounds(src, SkMatrix::Concat(matrix, fLocalM ), direction); 55 return this->getInput(0)->filterBounds(src, SkMatrix::Concat(matrix, fLocalM ), direction);
55 } 56 }
56 57
57 #ifndef SK_IGNORE_TO_STRING 58 #ifndef SK_IGNORE_TO_STRING
58 void SkLocalMatrixImageFilter::toString(SkString* str) const { 59 void SkLocalMatrixImageFilter::toString(SkString* str) const {
59 str->append("SkLocalMatrixImageFilter: ("); 60 str->append("SkLocalMatrixImageFilter: (");
60 str->append(")"); 61 str->append(")");
61 } 62 }
62 #endif 63 #endif
OLDNEW
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698