aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureOpList.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-06-12 10:11:12 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-12 14:43:03 +0000
commit7c525e62d405d57ae7a7742cf607b9770a83a0ab (patch)
tree8dabe9ed08bddd398b8fac935decaf2743f5a6f7 /src/gpu/GrTextureOpList.cpp
parent7deacf4833dcdb6c1101a18a2b46a8c516a96f9a (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/GrTextureOpList.cpp')
-rw-r--r--src/gpu/GrTextureOpList.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gpu/GrTextureOpList.cpp b/src/gpu/GrTextureOpList.cpp
index c09dbffba5..a868b5d393 100644
--- a/src/gpu/GrTextureOpList.cpp
+++ b/src/gpu/GrTextureOpList.cpp
@@ -8,6 +8,8 @@
#include "GrTextureOpList.h"
#include "GrAuditTrail.h"
+#include "GrContext.h"
+#include "GrContextPriv.h"
#include "GrGpu.h"
#include "GrResourceAllocator.h"
#include "GrTextureProxy.h"
@@ -113,20 +115,21 @@ void GrTextureOpList::endFlush() {
// This closely parallels GrRenderTargetOpList::copySurface but renderTargetOpList
// stores extra data with the op
-bool GrTextureOpList::copySurface(const GrCaps& caps,
+bool GrTextureOpList::copySurface(GrContext* context,
GrSurfaceProxy* dst,
GrSurfaceProxy* src,
const SkIRect& srcRect,
const SkIPoint& dstPoint) {
SkASSERT(dst == 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;
}
- auto addDependency = [ &caps, this ] (GrSurfaceProxy* p) {
- this->addDependency(p, caps);
+ const GrCaps* caps = context->contextPriv().caps();
+ auto addDependency = [ caps, this ] (GrSurfaceProxy* p) {
+ this->addDependency(p, *caps);
};
op->visitProxies(addDependency);