aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/PictureNestingBench.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-09-30 12:11:07 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-30 12:11:07 -0700
commit8a6697af95b340aad6dee7e6228048fa305c1e59 (patch)
tree08b4c39b0bc264940ff65b97a83c95d3d9bc1bbf /bench/PictureNestingBench.cpp
parent7fac5af5e9310826721ff416bdbe71294d607b2a (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/PictureNestingBench.cpp')
-rw-r--r--bench/PictureNestingBench.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/bench/PictureNestingBench.cpp b/bench/PictureNestingBench.cpp
index 48f2ef46c5..e315fe6dbd 100644
--- a/bench/PictureNestingBench.cpp
+++ b/bench/PictureNestingBench.cpp
@@ -139,8 +139,8 @@ public:
: INHERITED("playback", maxLevel, maxPictureLevel) {
}
protected:
- void onPreDraw() override {
- this->INHERITED::onPreDraw();
+ void onDelayedSetup() override {
+ this->INHERITED::onDelayedSetup();
SkIPoint canvasSize = onGetSize();
SkPictureRecorder recorder;