Fix assert accessing pipeline from initBatchTracker
authorcdalton <cdalton@nvidia.com>
Wed, 3 Feb 2016 21:29:19 +0000 (13:29 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 3 Feb 2016 21:29:19 +0000 (13:29 -0800)
Marks fPipelineInstalled as true before calling initBatchTracker. The
batch subclass ought to be able to access the newly constructed
pipeline object during its init.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666813002

Review URL: https://codereview.chromium.org/1666813002

src/gpu/batches/GrDrawBatch.cpp

index 4253923..b73f751 100644 (file)
@@ -29,7 +29,7 @@ bool GrDrawBatch::installPipeline(const GrPipeline::CreateArgs& args) {
     if (!GrPipeline::CreateAt(location, args, &overrides)) {
         return false;
     }
-    this->initBatchTracker(overrides);
     fPipelineInstalled = true;
+    this->initBatchTracker(overrides);
     return true;
 }