aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSWMaskHelper.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-06-14 09:49:26 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-14 20:26:51 +0000
commit1ec03f33cf493352174c748662d4a3cca29f78fd (patch)
tree352c8f7fe900ea4c71846f3bc45a7f5a26d6469e /src/gpu/GrSWMaskHelper.cpp
parentd99148623b1daecc54eca1e2df607a49f86c6fae (diff)
Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp subclasses.
Consolidates op factory functions to a rewritten GrRectOpFactory. Removes GrRenderTargetContext::drawNonAAFilledRect() in favor of creating and adding ops directly by the callers. Change-Id: I57e5fc739bf4e92b4a4710c739e6d22cce82a479 Reviewed-on: https://skia-review.googlesource.com/17711 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrSWMaskHelper.cpp')
-rw-r--r--src/gpu/GrSWMaskHelper.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index 141f35710e..fb66886098 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -6,7 +6,6 @@
*/
#include "GrSWMaskHelper.h"
-
#include "GrCaps.h"
#include "GrContext.h"
#include "GrContextPriv.h"
@@ -15,11 +14,9 @@
#include "GrShape.h"
#include "GrSurfaceContext.h"
#include "GrTextureProxy.h"
-#include "ops/GrDrawOp.h"
-
#include "SkDistanceFieldGen.h"
-
-#include "ops/GrNonAAFillRectOp.h"
+#include "ops/GrDrawOp.h"
+#include "ops/GrRectOpFactory.h"
/*
* Convert a boolean operation into a transfer mode code
@@ -176,7 +173,8 @@ void GrSWMaskHelper::DrawToTargetWithShapeMask(sk_sp<GrTextureProxy> proxy,
paint.addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(
resourceProvider, std::move(proxy), nullptr, maskMatrix,
GrSamplerParams::kNone_FilterMode));
- renderTargetContext->addDrawOp(
- clip, GrNonAAFillRectOp::Make(std::move(paint), SkMatrix::I(), dstRect, nullptr,
- &invert, GrAAType::kNone, &userStencilSettings));
+ renderTargetContext->addDrawOp(clip,
+ GrRectOpFactory::MakeNonAAFillWithLocalMatrix(
+ std::move(paint), SkMatrix::I(), invert, dstRect,
+ GrAAType::kNone, &userStencilSettings));
}