diff options
| author | Brian Salomon <bsalomon@google.com> | 2017-03-09 13:50:43 -0500 |
|---|---|---|
| committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-09 19:26:13 +0000 |
| commit | 649a3411f99a8aea3c46e4ef1f495f61b9801164 (patch) | |
| tree | 1de3926cfb95e9fa7b440b26dfa6988fd351eccf /tests/GLProgramsTest.cpp | |
| parent | 383dd9dc58a142392907a3a975d5f3317cda5288 (diff) | |
Add a separate draw function to GrRenderTargetContext for GrMeshDrawOp derived classes.
The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work.
Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef
Reviewed-on: https://skia-review.googlesource.com/9481
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/GLProgramsTest.cpp')
| -rw-r--r-- | tests/GLProgramsTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index 7628847a48..688c59290d 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -323,7 +323,7 @@ bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages) { GrPaint grPaint; - std::unique_ptr<GrDrawOp> op(GrRandomDrawOp(&random, context)); + std::unique_ptr<GrMeshDrawOp> op(GrRandomDrawOp(&random, context)); SkASSERT(op); GrProcessorTestData ptd(&random, context, renderTargetContext.get(), dummyTextures); @@ -336,8 +336,8 @@ bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages) { static constexpr GrAAType kAATypes[] = {GrAAType::kNone, GrAAType::kCoverage}; GrAAType aaType = kAATypes[random.nextULessThan(SK_ARRAY_COUNT(kAATypes))]; - renderTargetContext->priv().testingOnly_addDrawOp(std::move(grPaint), aaType, std::move(op), - uss, snapToCenters); + renderTargetContext->priv().testingOnly_addMeshDrawOp(std::move(grPaint), aaType, + std::move(op), uss, snapToCenters); } // Flush everything, test passes if flush is successful(ie, no asserts are hit, no crashes) drawingManager->flush(); @@ -358,7 +358,7 @@ bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages) { for (int i = 0; i < fpFactoryCnt; ++i) { // Since FP factories internally randomize, call each 10 times. for (int j = 0; j < 10; ++j) { - std::unique_ptr<GrDrawOp> op(GrRandomDrawOp(&random, context)); + std::unique_ptr<GrMeshDrawOp> op(GrRandomDrawOp(&random, context)); SkASSERT(op); GrProcessorTestData ptd(&random, context, renderTargetContext.get(), dummyTextures); GrPaint grPaint; @@ -370,8 +370,8 @@ bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages) { BlockInputFragmentProcessor::Make(std::move(fp))); grPaint.addColorFragmentProcessor(std::move(blockFP)); - renderTargetContext->priv().testingOnly_addDrawOp(std::move(grPaint), GrAAType::kNone, - std::move(op)); + renderTargetContext->priv().testingOnly_addMeshDrawOp( + std::move(grPaint), GrAAType::kNone, std::move(op)); drawingManager->flush(); } } |
