From fb7a713dc532ff6171c7d02be8eedd233f2b8895 Mon Sep 17 00:00:00 2001 From: Greg Kaiser Date: Fri, 8 Feb 2019 17:00:36 -0800 Subject: [PATCH] bench: Fix a couple presumed copy/paste errors We switch to FILTER_HEIGHT_SMALL when fIsSmall. Change-Id: I5d21eacbee29a349caa96815b2059c0bebd819e2 Reviewed-on: https://skia-review.googlesource.com/c/190563 Reviewed-by: Mike Klein Commit-Queue: Mike Klein --- bench/DisplacementBench.cpp | 4 ++-- bench/MagnifierBench.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bench/DisplacementBench.cpp b/bench/DisplacementBench.cpp index 37d53d1d52..97c008aafe 100644 --- a/bench/DisplacementBench.cpp +++ b/bench/DisplacementBench.cpp @@ -32,7 +32,7 @@ protected: void makeBitmap() { const int w = this->isSmall() ? FILTER_WIDTH_SMALL : FILTER_WIDTH_LARGE; - const int h = this->isSmall() ? FILTER_HEIGHT_LARGE : FILTER_HEIGHT_LARGE; + const int h = this->isSmall() ? FILTER_HEIGHT_SMALL : FILTER_HEIGHT_LARGE; fBitmap.allocN32Pixels(w, h); SkCanvas canvas(fBitmap); canvas.clear(0x00000000); @@ -46,7 +46,7 @@ protected: void makeCheckerboard() { const int w = this->isSmall() ? FILTER_WIDTH_SMALL : FILTER_WIDTH_LARGE; - const int h = this->isSmall() ? FILTER_HEIGHT_LARGE : FILTER_HEIGHT_LARGE; + const int h = this->isSmall() ? FILTER_HEIGHT_SMALL : FILTER_HEIGHT_LARGE; auto surface(SkSurface::MakeRasterN32Premul(w, h)); SkCanvas* canvas = surface->getCanvas(); canvas->clear(0x00000000); diff --git a/bench/MagnifierBench.cpp b/bench/MagnifierBench.cpp index 6403aa6de7..d345c63653 100644 --- a/bench/MagnifierBench.cpp +++ b/bench/MagnifierBench.cpp @@ -53,7 +53,7 @@ protected: private: void make_checkerboard() { const int w = fIsSmall ? FILTER_WIDTH_SMALL : FILTER_WIDTH_LARGE; - const int h = fIsSmall ? FILTER_HEIGHT_LARGE : FILTER_HEIGHT_LARGE; + const int h = fIsSmall ? FILTER_HEIGHT_SMALL : FILTER_HEIGHT_LARGE; fCheckerboard.allocN32Pixels(w, h); SkCanvas canvas(fCheckerboard); canvas.clear(0x00000000);