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

Unified Diff: bench/Xfer4fBench.cpp

Issue 1832223002: switch xfermodes over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 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
Index: bench/Xfer4fBench.cpp
diff --git a/bench/Xfer4fBench.cpp b/bench/Xfer4fBench.cpp
index ab04476cf28a5ffff8f20146e00225d9418a344f..6ea7a4f7e2a253505f49994a872e0af341b4cc20 100644
--- a/bench/Xfer4fBench.cpp
+++ b/bench/Xfer4fBench.cpp
@@ -21,8 +21,7 @@ public:
: fDoN(doN)
, fFlags(flags & ~USE_AA)
{
- fXfer.reset(SkXfermode::Create(mode));
-
+ fXfer = SkXfermode::Make(mode);
fProc1 = SkXfermode::GetD32Proc(fXfer, fFlags | SkXfermode::kSrcIsSingle_D32Flag);
fProcN = SkXfermode::GetD32Proc(fXfer, fFlags);
fName.printf("xfer4f_%s_%s_%c_%s_%s",
@@ -53,15 +52,15 @@ protected:
void onDraw(int loops, SkCanvas*) override {
for (int i = 0; i < loops * INNER_LOOPS; ++i) {
if (fDoN) {
- fProcN(fXfer, fDst, fSrc, N, fAA);
+ fProcN(fXfer.get(), fDst, fSrc, N, fAA);
} else {
- fProc1(fXfer, fDst, fSrc, N, fAA);
+ fProc1(fXfer.get(), fDst, fSrc, N, fAA);
}
}
}
private:
- SkAutoTUnref<SkXfermode> fXfer;
+ sk_sp<SkXfermode> fXfer;
SkString fName;
SkXfermode::D32Proc fProc1;
SkXfermode::D32Proc fProcN;

Powered by Google App Engine
This is Rietveld 408576698