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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 1422023003: Cosmetic portion of reverted "Fix ClipMaskManager's SW-fallback logic" CL (Closed) Base URL: https://skia.googlesource.com/skia.git@mdb-simplify-cmm-2
Patch Set: git pull Created 5 years, 2 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 | « include/gpu/GrPathRendererChain.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »
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 23f2d2b54076146bec09f833ae39f6d9df499517..b2b9bd28967ff68bde18b56f80be873beb676142 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -87,7 +87,7 @@ static bool path_needs_SW_renderer(GrContext* context,
}
// the 'false' parameter disallows use of the SW path renderer
- GrPathRenderer* pr = context->getPathRenderer(&pipelineBuilder, viewMatrix, path,
+ GrPathRenderer* pr = context->getPathRenderer(pipelineBuilder, viewMatrix, path,
stroke, false, type);
if (tryStencilFirst && !pr) {
// If the path can't be stenciled, createAlphaClipMask falls back to color rendering
@@ -96,7 +96,7 @@ static bool path_needs_SW_renderer(GrContext* context,
? GrPathRendererChain::kColorAntiAlias_DrawType
: GrPathRendererChain::kColor_DrawType;
- pr = context->getPathRenderer(&pipelineBuilder, viewMatrix, path, stroke, false, type);
+ pr = context->getPathRenderer(pipelineBuilder, viewMatrix, path, stroke, false, type);
}
if (prOut) {
@@ -127,8 +127,7 @@ bool GrClipMaskManager::useSWOnlyPath(const GrPipelineBuilder& pipelineBuilder,
// Set the matrix so that rendered clip elements are transformed to mask space from clip
// space.
- SkMatrix translate;
- translate.setTranslate(clipToMaskOffset);
+ const SkMatrix translate = SkMatrix::MakeTrans(clipToMaskOffset.fX, clipToMaskOffset.fY);
for (GrReducedClip::ElementList::Iter iter(elements.headIter()); iter.get(); iter.next()) {
const Element* element = iter.get();
@@ -453,7 +452,7 @@ bool GrClipMaskManager::drawElement(GrPipelineBuilder* pipelineBuilder,
GrPathRendererChain::DrawType type;
type = element->isAA() ? GrPathRendererChain::kColorAntiAlias_DrawType :
GrPathRendererChain::kColor_DrawType;
- pr = this->getContext()->getPathRenderer(pipelineBuilder, viewMatrix,
+ pr = this->getContext()->getPathRenderer(*pipelineBuilder, viewMatrix,
path, stroke, false, type);
}
if (nullptr == pr) {
@@ -495,7 +494,7 @@ bool GrClipMaskManager::canStencilAndDrawElement(GrPipelineBuilder* pipelineBuil
GrPathRendererChain::DrawType type = element->isAA() ?
GrPathRendererChain::kStencilAndColorAntiAlias_DrawType :
GrPathRendererChain::kStencilAndColor_DrawType;
- *pr = this->getContext()->getPathRenderer(pipelineBuilder, SkMatrix::I(), path,
+ *pr = this->getContext()->getPathRenderer(*pipelineBuilder, SkMatrix::I(), path,
stroke, false, type);
return SkToBool(*pr);
}
@@ -596,8 +595,7 @@ GrTexture* GrClipMaskManager::createAlphaClipMask(int32_t elementsGenID,
// Set the matrix so that rendered clip elements are transformed to mask space from clip
// space.
- SkMatrix translate;
- translate.setTranslate(clipToMaskOffset);
+ const SkMatrix translate = SkMatrix::MakeTrans(clipToMaskOffset.fX, clipToMaskOffset.fY);
// The texture may be larger than necessary, this rect represents the part of the texture
// we populate with a rasterization of the clip.
@@ -800,7 +798,7 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
if (fillInverted) {
clipPath.toggleInverseFillType();
}
- pr = this->getContext()->getPathRenderer(&pipelineBuilder,
+ pr = this->getContext()->getPathRenderer(pipelineBuilder,
viewMatrix,
clipPath,
stroke,
« no previous file with comments | « include/gpu/GrPathRendererChain.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698