Prepare flag to hide setFilterQuality
Bug: skia:7650 Change-Id: I9cfd6f87e2ca1eb5680e1ec83a029c6bfdbe7b2f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/370236 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
4f065e286d
commit
554aabbaa8
@ -226,6 +226,7 @@ DEF_SIMPLE_GM(tiled_picture_shader, canvas, 400, 400) {
|
||||
canvas->drawPaint(p);
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_SETFILTERQUALITY
|
||||
/*
|
||||
Test picture-shader's filtering (after the tile is created.
|
||||
The GM draws a 2x2 grid of tiled images (circle, square, X)
|
||||
@ -287,3 +288,4 @@ DEF_SIMPLE_GM(picture_shader_filter, canvas, 230, 230) {
|
||||
canvas->drawRect({0, 0, 300, 300}, paint);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -277,10 +277,7 @@ public:
|
||||
|
||||
builder.child("input") = fMandrill->makeShader(sampling);
|
||||
|
||||
// TODO: Move filter quality to the shader itself. We need to enforce at least kLow here
|
||||
// so that we bilerp the color cube image.
|
||||
SkPaint paint;
|
||||
paint.setFilterQuality(kLow_SkFilterQuality);
|
||||
|
||||
// TODO: Should we add SkImage::makeNormalizedShader() to handle this automatically?
|
||||
SkMatrix normalize = SkMatrix::Scale(1.0f / (kSize * kSize), 1.0f / kSize);
|
||||
|
@ -23,7 +23,7 @@ class SkPath;
|
||||
class SkPathEffect;
|
||||
class SkShader;
|
||||
|
||||
// WIP to eventually remove filter-quality
|
||||
// Move to clients when they are ready -- aid in deprecating the enum
|
||||
#define SK_SUPPORT_LEGACY_SETFILTERQUALITY
|
||||
|
||||
/** \class SkPaint
|
||||
@ -192,9 +192,6 @@ public:
|
||||
*/
|
||||
void setDither(bool dither) { fBitfields.fDither = static_cast<unsigned>(dither); }
|
||||
|
||||
#ifndef SK_SUPPORT_LEGACY_SETFILTERQUALITY
|
||||
private:
|
||||
#endif
|
||||
/** Returns SkFilterQuality, the image filtering level. A lower setting
|
||||
draws faster; a higher setting looks better when the image is scaled.
|
||||
*/
|
||||
@ -202,6 +199,9 @@ private:
|
||||
return (SkFilterQuality)fBitfields.fFilterQuality;
|
||||
}
|
||||
|
||||
#ifndef SK_SUPPORT_LEGACY_SETFILTERQUALITY
|
||||
private:
|
||||
#endif
|
||||
/** Sets SkFilterQuality, the image filtering level. A lower setting
|
||||
draws faster; a higher setting looks better when the image is scaled.
|
||||
Does not check to see if quality is valid.
|
||||
|
Loading…
Reference in New Issue
Block a user