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

Unified Diff: bench/XferU64Bench.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/XferU64Bench.cpp
diff --git a/bench/XferU64Bench.cpp b/bench/XferU64Bench.cpp
index 90aa328b40e35d9585c5a679534df6d6102010df..324655b351bcd0e6999e8e0c0f2281e633dcaf11 100644
--- a/bench/XferU64Bench.cpp
+++ b/bench/XferU64Bench.cpp
@@ -21,7 +21,7 @@ public:
: fDoN(doN)
, fFlags(flags & ~USE_AA)
{
- fXfer.reset(SkXfermode::Create(mode));
+ fXfer = SkXfermode::Make(mode);
fProc1 = SkXfermode::GetD64Proc(fXfer, fFlags | SkXfermode::kSrcIsSingle_D64Flag);
fProcN = SkXfermode::GetD64Proc(fXfer, fFlags);
@@ -53,15 +53,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::D64Proc fProc1;
SkXfermode::D64Proc fProcN;

Powered by Google App Engine
This is Rietveld 408576698