From 91ab15588451be2f7ec87635590f1e4f90bbbf9a Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Wed, 18 Apr 2018 13:24:25 -0600 Subject: Always call endFlush on opLists that might survive a flush We were missing a few that got unreffed due to failed proxy instantiation. Bug: skia:7655 Bug: skia:7111 Change-Id: I95847a16890f2993a1433d4d9fdaa8a4a6c2f0b6 Reviewed-on: https://skia-review.googlesource.com/122121 Reviewed-by: Robert Phillips Commit-Queue: Chris Dalton --- tests/GrCCPRTest.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/GrCCPRTest.cpp') diff --git a/tests/GrCCPRTest.cpp b/tests/GrCCPRTest.cpp index 2a51c1b176..6f0d8852d9 100644 --- a/tests/GrCCPRTest.cpp +++ b/tests/GrCCPRTest.cpp @@ -126,6 +126,7 @@ public: mockOptions.fGeometryShaderSupport = true; mockOptions.fIntegerSupport = true; mockOptions.fFlatInterpolationSupport = true; + this->customizeMockOptions(&mockOptions); GrContextOptions ctxOptions; ctxOptions.fAllowPathMaskCaching = false; @@ -154,6 +155,7 @@ public: virtual ~CCPRTest() {} protected: + virtual void customizeMockOptions(GrMockOptions*) {} virtual void onRun(skiatest::Reporter* reporter, CCPRPathDrawer& ccpr) = 0; sk_sp fMockContext; @@ -192,6 +194,13 @@ class GrCCPRTest_cleanup : public CCPRTest { }; DEF_CCPR_TEST(GrCCPRTest_cleanup) +class GrCCPRTest_cleanupWithTexAllocFail : public GrCCPRTest_cleanup { + void customizeMockOptions(GrMockOptions* options) override { + options->fFailTextureAllocations = true; + } +}; +DEF_CCPR_TEST(GrCCPRTest_cleanupWithTexAllocFail) + class GrCCPRTest_unregisterCulledOps : public CCPRTest { void onRun(skiatest::Reporter* reporter, CCPRPathDrawer& ccpr) override { REPORTER_ASSERT(reporter, SkPathPriv::TestingOnly_unique(fPath)); -- cgit v1.2.3