aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrClipMaskManager.cpp
diff options
context:
space:
mode:
authorGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-14 15:03:35 +0000
committerGravatar tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-14 15:03:35 +0000
commit8afae61a57f87e4a50578effce6c428031499301 (patch)
treeba9a4d4497a0416b932b384502e3b519af57e3a1 /src/gpu/GrClipMaskManager.cpp
parent9ed02b9da25a76ee4c73c1ab19c18b899a223a17 (diff)
Clean up most clang warnings outside animator/
Diffstat (limited to 'src/gpu/GrClipMaskManager.cpp')
-rw-r--r--src/gpu/GrClipMaskManager.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index a424b02dfc..a1cd75b5f8 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -795,7 +795,7 @@ bool GrClipMaskManager::createStencilClipMask(const GrClipData& clipDataIn,
// with the existing clip.
for ( ; NULL != clip; clip = iter.next()) {
GrPathFill fill;
- bool fillInverted;
+ bool fillInverted = false;
// enabled at bottom of loop
drawState->disableState(GrGpu::kModifyStencilClip_StateBit);
// if the target is MSAA then we want MSAA enabled when the clip is soft
@@ -807,11 +807,10 @@ bool GrClipMaskManager::createStencilClipMask(const GrClipData& clipDataIn,
}
}
- bool canRenderDirectToStencil; // can the clip element be drawn
- // directly to the stencil buffer
- // with a non-inverted fill rule
- // without extra passes to
- // resolve in/out status.
+ // Can the clip element be drawn directly to the stencil buffer
+ // with a non-inverted fill rule without extra passes to
+ // resolve in/out status?
+ bool canRenderDirectToStencil = false;
SkRegion::Op op = clip->fOp;
if (first) {
@@ -831,16 +830,15 @@ bool GrClipMaskManager::createStencilClipMask(const GrClipData& clipDataIn,
contains(*clip->fRect, devRTRect, oldClipData->fOrigin)) {
continue;
}
- } else if (NULL != clip->fPath) {
+ } else {
+ GrAssert(NULL != clip->fPath);
fill = get_path_fill(*clip->fPath);
fillInverted = GrIsFillInverted(fill);
fill = GrNonInvertedFill(fill);
clipPath = clip->fPath;
- pr = this->getContext()->getPathRenderer(*clipPath,
- fill, fGpu, false,
- true);
+ pr = this->getContext()->getPathRenderer(*clipPath, fill, fGpu, false, true);
if (NULL == pr) {
- fGpu->setClip(oldClipData); // restore to the original
+ fGpu->setClip(oldClipData);
return false;
}
canRenderDirectToStencil =
@@ -856,10 +854,11 @@ bool GrClipMaskManager::createStencilClipMask(const GrClipData& clipDataIn,
// stencil bit used for clipping.
canDrawDirectToClip =
GrStencilSettings::GetClipPasses(op,
- canRenderDirectToStencil,
- clipBit,
- fillInverted,
- &passes, stencilSettings);
+ canRenderDirectToStencil,
+ clipBit,
+ fillInverted,
+ &passes,
+ stencilSettings);
// draw the element to the client stencil bits if necessary
if (!canDrawDirectToClip) {