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

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

Issue 1014533004: SkPaint::FilterLevel -> SkFilterQuality (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/effects/SkPictureImageFilter.cpp ('k') | src/gpu/SkGpuDevice.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 #include "SkTestImageFilters.h" 2 #include "SkTestImageFilters.h"
3 #include "SkCanvas.h" 3 #include "SkCanvas.h"
4 #include "SkDevice.h" 4 #include "SkDevice.h"
5 #include "SkReadBuffer.h" 5 #include "SkReadBuffer.h"
6 #include "SkWriteBuffer.h" 6 #include "SkWriteBuffer.h"
7 7
8 // Simple helper canvas that "takes ownership" of the provided device, so that 8 // Simple helper canvas that "takes ownership" of the provided device, so that
9 // when this canvas goes out of scope, so will its device. Could be replaced 9 // when this canvas goes out of scope, so will its device. Could be replaced
10 // with the following: 10 // with the following:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // downsample 43 // downsample
44 { 44 {
45 SkBaseDevice* dev = proxy->createDevice(dstW, dstH); 45 SkBaseDevice* dev = proxy->createDevice(dstW, dstH);
46 if (NULL == dev) { 46 if (NULL == dev) {
47 return false; 47 return false;
48 } 48 }
49 OwnDeviceCanvas canvas(dev); 49 OwnDeviceCanvas canvas(dev);
50 SkPaint paint; 50 SkPaint paint;
51 51
52 paint.setFilterLevel(SkPaint::kLow_FilterLevel); 52 paint.setFilterQuality(kLow_SkFilterQuality);
53 canvas.scale(scale, scale); 53 canvas.scale(scale, scale);
54 canvas.drawBitmap(src, 0, 0, &paint); 54 canvas.drawBitmap(src, 0, 0, &paint);
55 tmp = dev->accessBitmap(false); 55 tmp = dev->accessBitmap(false);
56 } 56 }
57 57
58 // upscale 58 // upscale
59 { 59 {
60 SkBaseDevice* dev = proxy->createDevice(src.width(), src.height()); 60 SkBaseDevice* dev = proxy->createDevice(src.width(), src.height());
61 if (NULL == dev) { 61 if (NULL == dev) {
62 return false; 62 return false;
(...skipping 17 matching lines...) Expand all
80 this->INHERITED::flatten(buffer); 80 this->INHERITED::flatten(buffer);
81 buffer.writeScalar(fScale); 81 buffer.writeScalar(fScale);
82 } 82 }
83 83
84 #ifndef SK_IGNORE_TO_STRING 84 #ifndef SK_IGNORE_TO_STRING
85 void SkDownSampleImageFilter::toString(SkString* str) const { 85 void SkDownSampleImageFilter::toString(SkString* str) const {
86 str->appendf("SkDownSampleImageFilter: ("); 86 str->appendf("SkDownSampleImageFilter: (");
87 str->append(")"); 87 str->append(")");
88 } 88 }
89 #endif 89 #endif
OLDNEW
« no previous file with comments | « src/effects/SkPictureImageFilter.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698