aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrLatticeOp.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/ops/GrLatticeOp.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/ops/GrLatticeOp.cpp')
-rw-r--r--src/gpu/ops/GrLatticeOp.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/gpu/ops/GrLatticeOp.cpp b/src/gpu/ops/GrLatticeOp.cpp
index fec62e99da..c06dd26065 100644
--- a/src/gpu/ops/GrLatticeOp.cpp
+++ b/src/gpu/ops/GrLatticeOp.cpp
@@ -125,13 +125,17 @@ public:
static const int kVertsPerRect = 4;
static const int kIndicesPerRect = 6;
- static std::unique_ptr<GrDrawOp> Make(GrPaint&& paint, const SkMatrix& viewMatrix,
+ static std::unique_ptr<GrDrawOp> Make(GrContext* context,
+ GrPaint&& paint,
+ const SkMatrix& viewMatrix,
sk_sp<GrTextureProxy> proxy,
sk_sp<GrColorSpaceXform> colorSpaceXForm,
GrSamplerState::Filter filter,
- std::unique_ptr<SkLatticeIter> iter, const SkRect& dst) {
+ std::unique_ptr<SkLatticeIter> iter,
+ const SkRect& dst) {
SkASSERT(proxy);
- return Helper::FactoryHelper<NonAALatticeOp>(std::move(paint), viewMatrix, std::move(proxy),
+ return Helper::FactoryHelper<NonAALatticeOp>(context, std::move(paint), viewMatrix,
+ std::move(proxy),
std::move(colorSpaceXForm), filter,
std::move(iter), dst);
}
@@ -310,12 +314,15 @@ private:
} // anonymous namespace
namespace GrLatticeOp {
-std::unique_ptr<GrDrawOp> MakeNonAA(GrPaint&& paint, const SkMatrix& viewMatrix,
+std::unique_ptr<GrDrawOp> MakeNonAA(GrContext* context,
+ GrPaint&& paint,
+ const SkMatrix& viewMatrix,
sk_sp<GrTextureProxy> proxy,
sk_sp<GrColorSpaceXform> colorSpaceXform,
GrSamplerState::Filter filter,
- std::unique_ptr<SkLatticeIter> iter, const SkRect& dst) {
- return NonAALatticeOp::Make(std::move(paint), viewMatrix, std::move(proxy),
+ std::unique_ptr<SkLatticeIter> iter,
+ const SkRect& dst) {
+ return NonAALatticeOp::Make(context, std::move(paint), viewMatrix, std::move(proxy),
std::move(colorSpaceXform), filter, std::move(iter), dst);
}
};
@@ -424,8 +431,8 @@ GR_DRAW_OP_TEST_DEFINE(NonAALatticeOp) {
auto csxf = GrTest::TestColorXform(random);
GrSamplerState::Filter filter =
random->nextBool() ? GrSamplerState::Filter::kNearest : GrSamplerState::Filter::kBilerp;
- return NonAALatticeOp::Make(std::move(paint), viewMatrix, std::move(proxy), std::move(csxf),
- filter, std::move(iter), dst);
+ return NonAALatticeOp::Make(context, std::move(paint), viewMatrix, std::move(proxy),
+ std::move(csxf), filter, std::move(iter), dst);
}
#endif