Chromium Code Reviews| Index: src/gpu/GrDrawContext.cpp |
| diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp |
| index 195cb7a91176c0d28986bd1f9195663d3a5b9b86..9cfd34e006f84e8b83445bbc1f2ef6565a33fc91 100644 |
| --- a/src/gpu/GrDrawContext.cpp |
| +++ b/src/gpu/GrDrawContext.cpp |
| @@ -10,6 +10,7 @@ |
| #include "GrDrawContext.h" |
| #include "GrDrawContextPriv.h" |
| #include "GrDrawingManager.h" |
| +#include "GrGpuResourcePriv.h" |
| #include "GrOvalRenderer.h" |
| #include "GrPathRenderer.h" |
| #include "GrPipelineBuilder.h" |
| @@ -1216,6 +1217,18 @@ bool GrDrawContextPriv::drawAndStencilPath(const GrFixedClip& clip, |
| return true; |
| } |
| +SkBudgeted GrDrawContextPriv::isBudgeted() const { |
| + ASSERT_SINGLE_OWNER_PRIV |
| + |
| + if (fDrawContext->fDrawingManager->wasAbandoned()) { |
|
egdaniel
2016/08/03 19:55:06
can we just do fDrawContext->wasAbandoned()?
robertphillips
2016/08/03 20:36:09
Done.
|
| + return SkBudgeted::kNo; |
| + } |
| + |
| + SkDEBUGCODE(fDrawContext->validate();) |
| + |
| + return fDrawContext->fRenderTarget->resourcePriv().isBudgeted(); |
| +} |
| + |
| void GrDrawContext::internalDrawPath(const GrClip& clip, |
| const GrPaint& paint, |
| const SkMatrix& viewMatrix, |