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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 1096513002: Pass dashing information to path rasterizers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix 100-col issue Created 5 years, 8 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
Index: src/gpu/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 2f6f635d043eebe3ea6f14d5c30bf35fa6902645..eed8deb86ef42dfc8d361374abd922d2bd7fc81e 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -14,6 +14,7 @@
#include "GrPathRenderer.h"
#include "GrRenderTarget.h"
#include "GrRenderTargetPriv.h"
+#include "GrStrokeInfo.h"
#include "GrStencilBuffer.h"
#include "GrSWMaskHelper.h"
#include "SkRasterClip.h"
@@ -60,7 +61,7 @@ bool path_needs_SW_renderer(GrContext* context,
const GrPipelineBuilder* pipelineBuilder,
const SkMatrix& viewMatrix,
const SkPath& origPath,
- const SkStrokeRec& stroke,
+ const GrStrokeInfo& stroke,
bool doAA) {
// the gpu alpha mask will draw the inverse paths as non-inverse to a temp buffer
SkTCopyOnFirstWrite<SkPath> path(origPath);
@@ -88,7 +89,7 @@ bool GrClipMaskManager::useSWOnlyPath(const GrPipelineBuilder* pipelineBuilder,
// TODO: generalize this function so that when
// a clip gets complex enough it can just be done in SW regardless
// of whether it would invoke the GrSoftwarePathRenderer.
- SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle);
+ GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle);
// Set the matrix so that rendered clip elements are transformed to mask space from clip
// space.
@@ -413,7 +414,7 @@ bool GrClipMaskManager::drawElement(GrPipelineBuilder* pipelineBuilder,
if (path.isInverseFillType()) {
path.toggleInverseFillType();
}
- SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle);
+ GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle);
if (NULL == pr) {
GrPathRendererChain::DrawType type;
type = element->isAA() ? GrPathRendererChain::kColorAntiAlias_DrawType :
@@ -449,7 +450,7 @@ bool GrClipMaskManager::canStencilAndDrawElement(GrPipelineBuilder* pipelineBuil
if (path.isInverseFillType()) {
path.toggleInverseFillType();
}
- SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle);
+ GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle);
GrPathRendererChain::DrawType type = element->isAA() ?
GrPathRendererChain::kStencilAndColorAntiAlias_DrawType :
GrPathRendererChain::kStencilAndColor_DrawType;
@@ -758,7 +759,7 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
// stencil with arbitrary stencil settings.
GrPathRenderer::StencilSupport stencilSupport;
- SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle);
+ GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle);
SkRegion::Op op = element->getOp();
GrPathRenderer* pr = NULL;

Powered by Google App Engine
This is Rietveld 408576698