Index: src/gpu/GrDrawContext.cpp |
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp |
index 549e5ebf80b0efc82bf39950692df8dde15ed659..113f288c159fdd805cbd20e92b9f674be3a3df77 100644 |
--- a/src/gpu/GrDrawContext.cpp |
+++ b/src/gpu/GrDrawContext.cpp |
@@ -35,10 +35,10 @@ |
SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fSingleOwner);) |
#define ASSERT_SINGLE_OWNER_PRIV \ |
SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fDrawContext->fSingleOwner);) |
-#define RETURN_IF_ABANDONED if (fDrawingManager->abandoned()) { return; } |
-#define RETURN_FALSE_IF_ABANDONED if (fDrawingManager->abandoned()) { return false; } |
-#define RETURN_FALSE_IF_ABANDONED_PRIV if (fDrawContext->fDrawingManager->abandoned()) { return false; } |
-#define RETURN_NULL_IF_ABANDONED if (fDrawingManager->abandoned()) { return nullptr; } |
+#define RETURN_IF_ABANDONED if (fDrawingManager->wasAbandoned()) { return; } |
+#define RETURN_FALSE_IF_ABANDONED if (fDrawingManager->wasAbandoned()) { return false; } |
+#define RETURN_FALSE_IF_ABANDONED_PRIV if (fDrawContext->fDrawingManager->wasAbandoned()) { return false; } |
+#define RETURN_NULL_IF_ABANDONED if (fDrawingManager->wasAbandoned()) { return nullptr; } |
class AutoCheckFlush { |
public: |
@@ -51,6 +51,10 @@ private: |
GrDrawingManager* fDrawingManager; |
}; |
+bool GrDrawContext::wasAbandoned() const { |
+ return fDrawingManager->wasAbandoned(); |
+} |
+ |
// In MDB mode the reffing of the 'getLastDrawTarget' call's result allows in-progress |
// drawTargets to be picked up and added to by drawContexts lower in the call |
// stack. When this occurs with a closed drawTarget, a new one will be allocated |