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

Unified Diff: bench/BitmapScaleBench.cpp

Issue 1601093003: Valgrind is not a fan of uninitialized Src pixels. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/BitmapScaleBench.cpp
diff --git a/bench/BitmapScaleBench.cpp b/bench/BitmapScaleBench.cpp
index 2e8f72e03c2097e725de5304df8b258a4308e41a..e309d5162cd3154919f234866e44d38f9ed96b53 100644
--- a/bench/BitmapScaleBench.cpp
+++ b/bench/BitmapScaleBench.cpp
@@ -124,12 +124,12 @@ public:
PixmapScalerBench(SkBitmapScaler::ResizeMethod method, const char suffix[]) : fMethod(method) {
fName.printf("pixmapscaler_%s", suffix);
}
-
+
protected:
const char* onGetName() override {
return fName.c_str();
}
-
+
SkIPoint onGetSize() override { return{ 100, 100 }; }
bool isSuitableFor(Backend backend) override {
@@ -138,9 +138,10 @@ protected:
void onDelayedSetup() override {
fSrc.allocN32Pixels(640, 480);
+ fSrc.eraseColor(SK_ColorWHITE);
fDst.allocN32Pixels(300, 250);
}
-
+
void onDraw(int loops, SkCanvas*) override {
SkPixmap src, dst;
fSrc.peekPixels(&src);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698