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

Unified Diff: include/core/SkPaint.h

Issue 821083002: add newImage API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add SkFilterQuality option Created 5 years, 12 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
Index: include/core/SkPaint.h
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 68220f65c9c25519b1884c155adc8f632478cf4b..63011d7e4e9d80925a64b42d988590bda5c43720 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -10,6 +10,7 @@
#include "SkColor.h"
#include "SkDrawLooper.h"
+#include "SkFilterQuality.h"
#include "SkMatrix.h"
#include "SkXfermode.h"
@@ -295,10 +296,10 @@ public:
void setDistanceFieldTextTEMP(bool distanceFieldText);
enum FilterLevel {
- kNone_FilterLevel,
- kLow_FilterLevel,
- kMedium_FilterLevel,
- kHigh_FilterLevel
+ kNone_FilterLevel = kNone_SkFilterQuality,
+ kLow_FilterLevel = kLow_SkFilterQuality,
+ kMedium_FilterLevel = kMedium_SkFilterQuality,
+ kHigh_FilterLevel = kHigh_SkFilterQuality
};
/**
@@ -316,6 +317,14 @@ public:
void setFilterLevel(FilterLevel);
/**
+ * Set the filter quality. This affects the quality (and performance) of
+ * drawing scaled images.
+ */
+ void setFilterQuality(SkFilterQuality quality) {
scroggo 2015/01/05 16:15:33 Do we need both? (enums and methods)
reed1 2015/01/05 21:58:14 For now we need filterlevel, until we decided to u
scroggo 2015/01/05 22:12:02 Should we go ahead and use a #define to stage?
reed1 2015/01/20 22:23:08 Started too fix all of skia internally, but it is
+ this->setFilterLevel(static_cast<FilterLevel>(quality));
+ }
+
+ /**
* If the predicate is true, set the filterLevel to Low, else set it to
* None.
*/

Powered by Google App Engine
This is Rietveld 408576698