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

Unified Diff: src/effects/SkMatrixImageFilter.cpp

Issue 1009183002: swith over from SkPaint::FilterLevel to 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkBitmapSource.cpp ('k') | src/effects/SkPictureImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkMatrixImageFilter.cpp
diff --git a/src/effects/SkMatrixImageFilter.cpp b/src/effects/SkMatrixImageFilter.cpp
index 4d9b1fa33517130f083500a31092c9125d88424d..54caca6dc3230110a512ab907050945b14838a81 100644
--- a/src/effects/SkMatrixImageFilter.cpp
+++ b/src/effects/SkMatrixImageFilter.cpp
@@ -16,33 +16,33 @@
#include "SkRect.h"
SkMatrixImageFilter::SkMatrixImageFilter(const SkMatrix& transform,
- SkPaint::FilterLevel filterLevel,
+ SkFilterQuality filterQuality,
SkImageFilter* input,
uint32_t uniqueID)
: INHERITED(1, &input, NULL, uniqueID),
fTransform(transform),
- fFilterLevel(filterLevel) {
+ fFilterQuality(filterQuality) {
}
SkMatrixImageFilter* SkMatrixImageFilter::Create(const SkMatrix& transform,
- SkPaint::FilterLevel filterLevel,
+ SkFilterQuality filterQuality,
SkImageFilter* input,
uint32_t uniqueID) {
- return SkNEW_ARGS(SkMatrixImageFilter, (transform, filterLevel, input, uniqueID));
+ return SkNEW_ARGS(SkMatrixImageFilter, (transform, filterQuality, input, uniqueID));
}
SkFlattenable* SkMatrixImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
SkMatrix matrix;
buffer.readMatrix(&matrix);
- SkPaint::FilterLevel level = static_cast<SkPaint::FilterLevel>(buffer.readInt());
- return Create(matrix, level, common.getInput(0), common.uniqueID());
+ SkFilterQuality quality = static_cast<SkFilterQuality>(buffer.readInt());
+ return Create(matrix, quality, common.getInput(0), common.uniqueID());
}
void SkMatrixImageFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeMatrix(fTransform);
- buffer.writeInt(fFilterLevel);
+ buffer.writeInt(fFilterQuality);
}
SkMatrixImageFilter::~SkMatrixImageFilter() {
@@ -84,7 +84,7 @@ bool SkMatrixImageFilter::onFilterImage(Proxy* proxy,
SkPaint paint;
paint.setXfermodeMode(SkXfermode::kSrc_Mode);
- paint.setFilterLevel(fFilterLevel);
+ paint.setFilterQuality(fFilterQuality);
canvas.drawBitmap(src, srcRect.x(), srcRect.y(), &paint);
*result = device.get()->accessBitmap(false);
@@ -142,7 +142,7 @@ void SkMatrixImageFilter::toString(SkString* str) const {
str->append("<dt>FilterLevel:</dt><dd>");
static const char* gFilterLevelStrings[] = { "None", "Low", "Medium", "High" };
- str->append(gFilterLevelStrings[fFilterLevel]);
+ str->append(gFilterLevelStrings[fFilterQuality]);
str->append("</dd>");
str->appendf(")");
« no previous file with comments | « src/effects/SkBitmapSource.cpp ('k') | src/effects/SkPictureImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698