use expected name for setDrawLooper/getDrawLooper

Needed for future pipe cl.
Next cl should be to guard the looper entirely (since its deprecated)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2326173002

TBR=

Review-Url: https://codereview.chromium.org/2326173002
This commit is contained in:
reed 2016-09-11 05:40:31 -07:00 committed by Commit bot
parent dddbbda3f3
commit 46f2d0ad0d
2 changed files with 12 additions and 12 deletions

View File

@ -653,19 +653,18 @@ public:
* Return the paint's SkDrawLooper (if any). Does not affect the looper's * Return the paint's SkDrawLooper (if any). Does not affect the looper's
* reference count. * reference count.
*/ */
SkDrawLooper* getLooper() const { return fLooper.get(); } SkDrawLooper* getDrawLooper() const { return fDrawLooper.get(); }
SkDrawLooper* getLooper() const { return fDrawLooper.get(); }
/** /**
* Set or clear the looper object. * Set or clear the looper object.
* <p /> * <p />
* Pass NULL to clear any previous looper. * Pass NULL to clear any previous looper.
* As a convenience, the parameter passed is also returned.
* If a previous looper exists in the paint, its reference count is * If a previous looper exists in the paint, its reference count is
* decremented. If looper is not NULL, its reference count is * decremented. If looper is not NULL, its reference count is
* incremented. * incremented.
* @param looper May be NULL. The new looper to be installed in the paint. * @param looper May be NULL. The new looper to be installed in the paint.
* @return looper
*/ */
void setDrawLooper(sk_sp<SkDrawLooper>);
#ifdef SK_SUPPORT_LEGACY_MINOR_EFFECT_PTR #ifdef SK_SUPPORT_LEGACY_MINOR_EFFECT_PTR
SkDrawLooper* setLooper(SkDrawLooper* looper); SkDrawLooper* setLooper(SkDrawLooper* looper);
#endif #endif
@ -1095,7 +1094,7 @@ private:
sk_sp<SkMaskFilter> fMaskFilter; sk_sp<SkMaskFilter> fMaskFilter;
sk_sp<SkColorFilter> fColorFilter; sk_sp<SkColorFilter> fColorFilter;
sk_sp<SkRasterizer> fRasterizer; sk_sp<SkRasterizer> fRasterizer;
sk_sp<SkDrawLooper> fLooper; sk_sp<SkDrawLooper> fDrawLooper;
sk_sp<SkImageFilter> fImageFilter; sk_sp<SkImageFilter> fImageFilter;
SkScalar fTextSize; SkScalar fTextSize;

View File

@ -73,7 +73,7 @@ SkPaint::SkPaint(const SkPaint& src)
, COPY(fMaskFilter) , COPY(fMaskFilter)
, COPY(fColorFilter) , COPY(fColorFilter)
, COPY(fRasterizer) , COPY(fRasterizer)
, COPY(fLooper) , COPY(fDrawLooper)
, COPY(fImageFilter) , COPY(fImageFilter)
, COPY(fTextSize) , COPY(fTextSize)
, COPY(fTextScaleX) , COPY(fTextScaleX)
@ -94,7 +94,7 @@ SkPaint::SkPaint(SkPaint&& src) {
MOVE(fMaskFilter); MOVE(fMaskFilter);
MOVE(fColorFilter); MOVE(fColorFilter);
MOVE(fRasterizer); MOVE(fRasterizer);
MOVE(fLooper); MOVE(fDrawLooper);
MOVE(fImageFilter); MOVE(fImageFilter);
MOVE(fTextSize); MOVE(fTextSize);
MOVE(fTextScaleX); MOVE(fTextScaleX);
@ -121,7 +121,7 @@ SkPaint& SkPaint::operator=(const SkPaint& src) {
ASSIGN(fMaskFilter); ASSIGN(fMaskFilter);
ASSIGN(fColorFilter); ASSIGN(fColorFilter);
ASSIGN(fRasterizer); ASSIGN(fRasterizer);
ASSIGN(fLooper); ASSIGN(fDrawLooper);
ASSIGN(fImageFilter); ASSIGN(fImageFilter);
ASSIGN(fTextSize); ASSIGN(fTextSize);
ASSIGN(fTextScaleX); ASSIGN(fTextScaleX);
@ -148,7 +148,7 @@ SkPaint& SkPaint::operator=(SkPaint&& src) {
MOVE(fMaskFilter); MOVE(fMaskFilter);
MOVE(fColorFilter); MOVE(fColorFilter);
MOVE(fRasterizer); MOVE(fRasterizer);
MOVE(fLooper); MOVE(fDrawLooper);
MOVE(fImageFilter); MOVE(fImageFilter);
MOVE(fTextSize); MOVE(fTextSize);
MOVE(fTextScaleX); MOVE(fTextScaleX);
@ -171,7 +171,7 @@ bool operator==(const SkPaint& a, const SkPaint& b) {
&& EQUAL(fMaskFilter) && EQUAL(fMaskFilter)
&& EQUAL(fColorFilter) && EQUAL(fColorFilter)
&& EQUAL(fRasterizer) && EQUAL(fRasterizer)
&& EQUAL(fLooper) && EQUAL(fDrawLooper)
&& EQUAL(fImageFilter) && EQUAL(fImageFilter)
&& EQUAL(fTextSize) && EQUAL(fTextSize)
&& EQUAL(fTextScaleX) && EQUAL(fTextScaleX)
@ -363,8 +363,9 @@ MOVE_FIELD(ColorFilter)
MOVE_FIELD(Xfermode) MOVE_FIELD(Xfermode)
MOVE_FIELD(PathEffect) MOVE_FIELD(PathEffect)
MOVE_FIELD(MaskFilter) MOVE_FIELD(MaskFilter)
MOVE_FIELD(DrawLooper)
#undef MOVE_FIELD #undef MOVE_FIELD
void SkPaint::setLooper(sk_sp<SkDrawLooper> looper) { fLooper = std::move(looper); } void SkPaint::setLooper(sk_sp<SkDrawLooper> looper) { fDrawLooper = std::move(looper); }
#define SET_PTR(Field) \ #define SET_PTR(Field) \
Sk##Field* SkPaint::set##Field(Sk##Field* f) { \ Sk##Field* SkPaint::set##Field(Sk##Field* f) { \
@ -2359,7 +2360,7 @@ static bool affects_alpha(const SkImageFilter* imf) {
} }
bool SkPaint::nothingToDraw() const { bool SkPaint::nothingToDraw() const {
if (fLooper) { if (fDrawLooper) {
return false; return false;
} }
SkXfermode::Mode mode; SkXfermode::Mode mode;