diff options
author | Chris Dalton <csmartdalton@google.com> | 2018-04-18 13:24:25 -0600 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-18 20:00:53 +0000 |
commit | 91ab15588451be2f7ec87635590f1e4f90bbbf9a (patch) | |
tree | 81c7c8e4519675b086fdb0a0bd323883e7fd3037 /tests/GrCCPRTest.cpp | |
parent | 15a64e71f68f7d1fcd16247c3d30375d3e2f41e8 (diff) |
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 <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'tests/GrCCPRTest.cpp')
-rw-r--r-- | tests/GrCCPRTest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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<GrContext> 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)); |