diff options
author | joshualitt <joshualitt@chromium.org> | 2015-09-30 12:11:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-30 12:11:07 -0700 |
commit | 8a6697af95b340aad6dee7e6228048fa305c1e59 (patch) | |
tree | 08b4c39b0bc264940ff65b97a83c95d3d9bc1bbf /bench/TextBench.cpp | |
parent | 7fac5af5e9310826721ff416bdbe71294d607b2a (diff) |
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
Diffstat (limited to 'bench/TextBench.cpp')
-rw-r--r-- | bench/TextBench.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bench/TextBench.cpp b/bench/TextBench.cpp index ee5d5e0db3..cc9537a22b 100644 --- a/bench/TextBench.cpp +++ b/bench/TextBench.cpp @@ -69,7 +69,7 @@ public: } protected: - void onPreDraw() override { + void onDelayedSetup() override { if (fDoColorEmoji) { SkASSERT(kBW == fFQ); fColorEmojiTypeface.reset(GetResourceAsTypeface("/fonts/Funkster.ttf")); |