aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetContext.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-06-14 14:31:17 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-15 11:33:14 +0000
commitc8cee446bf9c07da8848bbd032abf26e79966ac1 (patch)
tree5f024f9dfb1aca470915da9fae96eac0710f5884 /src/gpu/GrRenderTargetContext.cpp
parent9e6402677f1c8f2c3bdc3b812ee38ea2931d92b3 (diff)
Move op memory storage to GrContext
TBR=bsalomon@google.com Change-Id: Ifa95bf0073b9d948f2c937d10088b7734b971f90 Reviewed-on: https://skia-review.googlesource.com/131500 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetContext.cpp')
-rw-r--r--src/gpu/GrRenderTargetContext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index d8298108ab..3e5fb49bc0 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -1727,6 +1727,7 @@ static void op_bounds(SkRect* bounds, const GrOp* op) {
uint32_t GrRenderTargetContext::addDrawOp(const GrClip& clip, std::unique_ptr<GrDrawOp> op) {
ASSERT_SINGLE_OWNER
if (this->drawingManager()->wasAbandoned()) {
+ fContext->contextPriv().opMemoryPool()->release(std::move(op));
return SK_InvalidUniqueID;
}
SkDEBUGCODE(this->validate();)
@@ -1740,6 +1741,7 @@ uint32_t GrRenderTargetContext::addDrawOp(const GrClip& clip, std::unique_ptr<Gr
if (!clip.apply(fContext, this, fixedFunctionFlags & GrDrawOp::FixedFunctionFlags::kUsesHWAA,
fixedFunctionFlags & GrDrawOp::FixedFunctionFlags::kUsesStencil, &appliedClip,
&bounds)) {
+ fContext->contextPriv().opMemoryPool()->release(std::move(op));
return SK_InvalidUniqueID;
}
@@ -1756,6 +1758,7 @@ uint32_t GrRenderTargetContext::addDrawOp(const GrClip& clip, std::unique_ptr<Gr
if (GrDrawOp::RequiresDstTexture::kYes == op->finalize(*this->caps(), &appliedClip,
dstIsClamped)) {
if (!this->setupDstProxy(this->asRenderTargetProxy(), clip, op->bounds(), &dstProxy)) {
+ fContext->contextPriv().opMemoryPool()->release(std::move(op));
return SK_InvalidUniqueID;
}
}