From 8a6697af95b340aad6dee7e6228048fa305c1e59 Mon Sep 17 00:00:00 2001 From: joshualitt Date: Wed, 30 Sep 2015 12:11:07 -0700 Subject: Fix for nexus 5 crashing in GL benches GLBenches do not expect gl state to change between onPerCanvasPreDraw and *PostDraw, but we do a clear and sometimes we clear as draw. This causes us to bind vertex objects / programs / etc. This change creates two new virtual methods which are called right before and immediately after timing. BUG=skia: Review URL: https://codereview.chromium.org/1379853003 --- bench/GeometryBench.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bench/GeometryBench.cpp') diff --git a/bench/GeometryBench.cpp b/bench/GeometryBench.cpp index 99d39dd740..718d6a432b 100644 --- a/bench/GeometryBench.cpp +++ b/bench/GeometryBench.cpp @@ -46,7 +46,7 @@ public: protected: SkRect fRects[2048]; - virtual void onPreDraw() { + virtual void onDelayedSetup() { const SkScalar min = -100; const SkScalar max = 100; SkRandom rand; -- cgit v1.2.3