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

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

Issue 789163006: Add toString methods to SkImageFilter-derived classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make sure leading 0's aren't stripped off colors Created 6 years 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/SkOffsetImageFilter.cpp ('k') | src/effects/SkRectShaderImageFilter.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 The Android Open Source Project 2 * Copyright 2013 The Android Open Source Project
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 "SkPictureImageFilter.h" 8 #include "SkPictureImageFilter.h"
9 #include "SkDevice.h" 9 #include "SkDevice.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 SkCanvas canvas(device, proxy->surfaceProps(), SkCanvas::kDefault_InitFlags) ; 160 SkCanvas canvas(device, proxy->surfaceProps(), SkCanvas::kDefault_InitFlags) ;
161 161
162 canvas.translate(-SkIntToScalar(deviceBounds.fLeft), -SkIntToScalar(deviceBo unds.fTop)); 162 canvas.translate(-SkIntToScalar(deviceBounds.fLeft), -SkIntToScalar(deviceBo unds.fTop));
163 canvas.concat(ctx.ctm()); 163 canvas.concat(ctx.ctm());
164 SkPaint paint; 164 SkPaint paint;
165 paint.setFilterLevel(fFilterLevel); 165 paint.setFilterLevel(fFilterLevel);
166 canvas.drawBitmap(localDevice.get()->accessBitmap(false), SkIntToScalar(loca lIBounds.fLeft), 166 canvas.drawBitmap(localDevice.get()->accessBitmap(false), SkIntToScalar(loca lIBounds.fLeft),
167 SkIntToScalar(localIBounds.fTop), &paint); 167 SkIntToScalar(localIBounds.fTop), &paint);
168 //canvas.drawPicture(fPicture); 168 //canvas.drawPicture(fPicture);
169 } 169 }
170
171 #ifndef SK_IGNORE_TO_STRING
172 void SkPictureImageFilter::toString(SkString* str) const {
173 str->appendf("SkPictureImageFilter: (");
174 str->appendf("crop: (%f,%f,%f,%f) ",
175 fCropRect.fLeft, fCropRect.fTop, fCropRect.fRight, fCropRect.fB ottom);
176 if (fPicture) {
177 str->appendf("picture: (%f,%f,%f,%f)",
178 fPicture->cullRect().fLeft, fPicture->cullRect().fTop,
179 fPicture->cullRect().fRight, fPicture->cullRect().fBottom);
180 }
181 str->append(")");
182 }
183 #endif
OLDNEW
« no previous file with comments | « src/effects/SkOffsetImageFilter.cpp ('k') | src/effects/SkRectShaderImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698