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

Unified Diff: bench/ETCBitmapBench.cpp

Issue 345183003: optimize circularclips to act as a bench, fix null-check bug in etcbench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | gm/circularclips.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/ETCBitmapBench.cpp
diff --git a/bench/ETCBitmapBench.cpp b/bench/ETCBitmapBench.cpp
index aaa2ce7a6600411021cceb5213e7e26d85671505..e5ec44f2de820bdb4da78691a81f8e20714ccdb5 100644
--- a/bench/ETCBitmapBench.cpp
+++ b/bench/ETCBitmapBench.cpp
@@ -210,8 +210,11 @@ protected:
}
virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE {
+ SkPixelRef* pr = fBitmap.pixelRef();
for (int i = 0; i < loops; ++i) {
- this->fBitmap.pixelRef()->notifyPixelsChanged();
+ if (pr) {
+ pr->notifyPixelsChanged();
+ }
canvas->drawBitmap(this->fBitmap, 0, 0, NULL);
}
}
« no previous file with comments | « no previous file | gm/circularclips.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698