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

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

Issue 1847583002: Update SkMergeImageFilter to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to To Created 4 years, 8 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"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 SkRect SkTileImageFilter::computeFastBounds(const SkRect& src) const { 121 SkRect SkTileImageFilter::computeFastBounds(const SkRect& src) const {
122 return fDstRect; 122 return fDstRect;
123 } 123 }
124 124
125 SkFlattenable* SkTileImageFilter::CreateProc(SkReadBuffer& buffer) { 125 SkFlattenable* SkTileImageFilter::CreateProc(SkReadBuffer& buffer) {
126 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); 126 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
127 SkRect src, dst; 127 SkRect src, dst;
128 buffer.readRect(&src); 128 buffer.readRect(&src);
129 buffer.readRect(&dst); 129 buffer.readRect(&dst);
130 return Create(src, dst, common.getInput(0)); 130 return Create(src, dst, common.getInput(0).get());
131 } 131 }
132 132
133 void SkTileImageFilter::flatten(SkWriteBuffer& buffer) const { 133 void SkTileImageFilter::flatten(SkWriteBuffer& buffer) const {
134 this->INHERITED::flatten(buffer); 134 this->INHERITED::flatten(buffer);
135 buffer.writeRect(fSrcRect); 135 buffer.writeRect(fSrcRect);
136 buffer.writeRect(fDstRect); 136 buffer.writeRect(fDstRect);
137 } 137 }
138 138
139 #ifndef SK_IGNORE_TO_STRING 139 #ifndef SK_IGNORE_TO_STRING
140 void SkTileImageFilter::toString(SkString* str) const { 140 void SkTileImageFilter::toString(SkString* str) const {
141 str->appendf("SkTileImageFilter: ("); 141 str->appendf("SkTileImageFilter: (");
142 str->appendf("src: %.2f %.2f %.2f %.2f", 142 str->appendf("src: %.2f %.2f %.2f %.2f",
143 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto m); 143 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto m);
144 str->appendf(" dst: %.2f %.2f %.2f %.2f", 144 str->appendf(" dst: %.2f %.2f %.2f %.2f",
145 fDstRect.fLeft, fDstRect.fTop, fDstRect.fRight, fDstRect.fBotto m); 145 fDstRect.fLeft, fDstRect.fTop, fDstRect.fRight, fDstRect.fBotto m);
146 if (this->getInput(0)) { 146 if (this->getInput(0)) {
147 str->appendf("input: ("); 147 str->appendf("input: (");
148 this->getInput(0)->toString(str); 148 this->getInput(0)->toString(str);
149 str->appendf(")"); 149 str->appendf(")");
150 } 150 }
151 str->append(")"); 151 str->append(")");
152 } 152 }
153 #endif 153 #endif
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