Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 2057613003: Fix GrDrawContextPriv::stencilRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrDrawContext.cpp » ('j') | src/gpu/GrDrawContext.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 93481811451da2d2849a8013b830cc3893a3fa6d..a27ad7f1502539ebd46acb471790c7f89a2576df 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -51,15 +51,6 @@ static sk_sp<GrFragmentProcessor> create_fp_for_mask(GrTexture* result,
kDevice_GrCoordSet));
}
-void GrClipMaskManager::DrawNonAARect(GrDrawContext* drawContext,
- const GrFixedClip& clip,
- const SkMatrix& viewMatrix,
- const SkRect& rect,
- bool doAA,
- const GrUserStencilSettings* stencilSettings) {
- drawContext->drawContextPriv().stencilRect(clip, stencilSettings, doAA, viewMatrix, rect);
-}
-
// Does the path in 'element' require SW rendering? If so, return true (and,
// optionally, set 'prOut' to NULL. If not, return false (and, optionally, set
// 'prOut' to the non-SW path renderer that will do the job).
@@ -662,8 +653,9 @@ bool GrClipMaskManager::CreateStencilClipMask(GrContext* context,
0xffff>()
);
if (Element::kRect_Type == element->getType()) {
- DrawNonAARect(drawContext, clip, viewMatrix,
- element->getRect(), element->isAA(), &kDrawToStencil);
+ drawContext->drawContextPriv().stencilRect(clip, &kDrawToStencil,
+ element->isAA(), viewMatrix,
+ element->getRect());
} else {
if (!clipPath.isEmpty()) {
if (canRenderDirectToStencil) {
@@ -705,8 +697,8 @@ bool GrClipMaskManager::CreateStencilClipMask(GrContext* context,
if (drawDirectToClip) {
if (Element::kRect_Type == element->getType()) {
- DrawNonAARect(drawContext, clip,
- viewMatrix, element->getRect(), element->isAA(), *pass);
+ drawContext->drawContextPriv().stencilRect(clip, *pass, element->isAA(),
+ viewMatrix, element->getRect());
} else {
GrPaint paint;
paint.setXPFactory(GrDisableColorXPFactory::Make());
@@ -729,8 +721,8 @@ bool GrClipMaskManager::CreateStencilClipMask(GrContext* context,
} else {
// The view matrix is setup to do clip space -> stencil space translation, so
// draw rect in clip space.
- DrawNonAARect(drawContext, clip, viewMatrix,
- SkRect::Make(clipSpaceIBounds), false, *pass);
+ drawContext->drawContextPriv().stencilRect(clip, *pass, false, viewMatrix,
+ SkRect::Make(clipSpaceIBounds));
}
}
}
« no previous file with comments | « no previous file | src/gpu/GrDrawContext.cpp » ('j') | src/gpu/GrDrawContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698