diff options
author | Robert Phillips <robertphillips@google.com> | 2018-06-12 10:11:12 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-12 14:43:03 +0000 |
commit | 7c525e62d405d57ae7a7742cf607b9770a83a0ab (patch) | |
tree | 8dabe9ed08bddd398b8fac935decaf2743f5a6f7 /src/gpu/GrRenderTargetOpList.cpp | |
parent | 7deacf4833dcdb6c1101a18a2b46a8c516a96f9a (diff) |
Plumb GrContext everywhere
There is no good way to split the monster CL up. This breaks out
the GrContext plumbing but doesn't use it.
Change-Id: I90856d428d372bcec3f8821e6364667b367927d4
Reviewed-on: https://skia-review.googlesource.com/133382
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetOpList.cpp')
-rw-r--r-- | src/gpu/GrRenderTargetOpList.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp index f98e0f4197..b04ec3629a 100644 --- a/src/gpu/GrRenderTargetOpList.cpp +++ b/src/gpu/GrRenderTargetOpList.cpp @@ -10,6 +10,7 @@ #include "GrCaps.h" #include "GrGpu.h" #include "GrGpuCommandBuffer.h" +#include "GrMemoryPool.h" #include "GrRect.h" #include "GrRenderTargetContext.h" #include "GrResourceAllocator.h" @@ -201,7 +202,7 @@ void GrRenderTargetOpList::discard() { } } -void GrRenderTargetOpList::fullClear(const GrCaps& caps, GrColor color) { +void GrRenderTargetOpList::fullClear(GrContext* context, GrColor color) { // This is conservative. If the opList is marked as needing a stencil buffer then there // may be a prior op that writes to the stencil buffer. Although the clear will ignore the @@ -216,30 +217,31 @@ void GrRenderTargetOpList::fullClear(const GrCaps& caps, GrColor color) { return; } - std::unique_ptr<GrClearOp> op(GrClearOp::Make(GrFixedClip::Disabled(), color, fTarget.get())); + std::unique_ptr<GrClearOp> op(GrClearOp::Make(context, GrFixedClip::Disabled(), + color, fTarget.get())); if (!op) { return; } - this->recordOp(std::move(op), caps); + this->recordOp(std::move(op), *context->contextPriv().caps()); } //////////////////////////////////////////////////////////////////////////////// // This closely parallels GrTextureOpList::copySurface but renderTargetOpLists // also store the applied clip and dest proxy with the op -bool GrRenderTargetOpList::copySurface(const GrCaps& caps, +bool GrRenderTargetOpList::copySurface(GrContext* context, GrSurfaceProxy* dst, GrSurfaceProxy* src, const SkIRect& srcRect, const SkIPoint& dstPoint) { SkASSERT(dst->asRenderTargetProxy() == fTarget.get()); - std::unique_ptr<GrOp> op = GrCopySurfaceOp::Make(dst, src, srcRect, dstPoint); + std::unique_ptr<GrOp> op = GrCopySurfaceOp::Make(context, dst, src, srcRect, dstPoint); if (!op) { return false; } - this->addOp(std::move(op), caps); + this->addOp(std::move(op), *context->contextPriv().caps()); return true; } |