From 8ed6443e6c608007e1e62937acfaf29b7fe7b8b0 Mon Sep 17 00:00:00 2001 From: "skia.committer@gmail.com" Date: Tue, 11 Feb 2014 03:02:13 +0000 Subject: [PATCH] Sanitizing source files in Housekeeper-Nightly git-svn-id: http://skia.googlecode.com/svn/trunk@13393 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkBitmap.h | 4 ++-- include/core/SkImageInfo.h | 4 ++-- include/core/SkPathRef.h | 2 +- src/core/SkBitmap.cpp | 1 - src/gpu/GrClipMaskManager.cpp | 10 +++++----- src/gpu/GrClipMaskManager.h | 2 +- src/gpu/GrContext.cpp | 2 +- src/gpu/GrPathRenderer.h | 10 +++++----- 8 files changed, 17 insertions(+), 18 deletions(-) diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h index ad47dfadf4..42ef8778bf 100644 --- a/include/core/SkBitmap.h +++ b/include/core/SkBitmap.h @@ -87,12 +87,12 @@ public: int height() const { return fInfo.fHeight; } SkColorType colorType() const { return fInfo.fColorType; } SkAlphaType alphaType() const { return fInfo.fAlphaType; } - + /** Return the number of bytes per pixel based on the config. If the config does not have at least 1 byte per (e.g. kA1_Config) then 0 is returned. */ int bytesPerPixel() const { return fInfo.bytesPerPixel(); } - + /** Return the rowbytes expressed as a number of pixels (like width and height). Note, for 1-byte per pixel configs like kA8_Config, this will return the same as rowBytes(). Is undefined for configs that are less diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h index 73b8b8c12c..8ca87eba7a 100644 --- a/include/core/SkImageInfo.h +++ b/include/core/SkImageInfo.h @@ -193,11 +193,11 @@ struct SkImageInfo { uint64_t minRowBytes64() const { return sk_64_mul(fWidth, this->bytesPerPixel()); } - + size_t minRowBytes() const { return (size_t)this->minRowBytes64(); } - + bool operator==(const SkImageInfo& other) const { return 0 == memcmp(this, &other, sizeof(other)); } diff --git a/include/core/SkPathRef.h b/include/core/SkPathRef.h index 3c663f7f7d..2e8c5474fa 100644 --- a/include/core/SkPathRef.h +++ b/include/core/SkPathRef.h @@ -106,7 +106,7 @@ public: // In some cases we need to inject a leading moveTo before we add points // for lineTo, quadTo, conicTo, cubicTo - // + // // SkPath path; path.lineTo(...); <--- need a leading moveTo(0, 0) // SkPath path; ... path.close(); path.lineTo(...) <-- need a moveTo(previous moveTo) void injectMoveToIfNeeded() { fPathRef->injectMoveToIfNeeded(); } diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp index 9139f78719..e76ee02284 100644 --- a/src/core/SkBitmap.cpp +++ b/src/core/SkBitmap.cpp @@ -1691,4 +1691,3 @@ void SkImageInfo::validate() const { SkASSERT(SkAlphaTypeIsValid(fAlphaType)); } #endif - diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp index 35e0818dd0..0a36811f4d 100644 --- a/src/gpu/GrClipMaskManager.cpp +++ b/src/gpu/GrClipMaskManager.cpp @@ -70,7 +70,7 @@ static bool path_needs_SW_renderer(GrContext* context, SkPath::FillType fillType = SkPath::ConvertToNonInverseFillType(origPath.getFillType()); // the 'false' parameter disallows use of the SW path renderer - GrPathRenderer::AutoClearPath acp(context->getPathRenderer(origPath, stroke, gpu, + GrPathRenderer::AutoClearPath acp(context->getPathRenderer(origPath, stroke, gpu, false, type, fillType)); return NULL == acp.renderer(); } @@ -310,7 +310,7 @@ void setup_boolean_blendcoeffs(GrDrawState* drawState, SkRegion::Op op) { //////////////////////////////////////////////////////////////////////////////// bool GrClipMaskManager::drawFilledPath(GrTexture* target, - GrPathRenderer* pathRenderer, + GrPathRenderer* pathRenderer, bool isAA) { GrDrawState* drawState = fGpu->drawState(); @@ -349,7 +349,7 @@ bool GrClipMaskManager::drawElement(GrTexture* target, GrPathRendererChain::kColor_DrawType; SkPath::FillType fillType = element->getPath().getFillType(); GrPathRenderer::AutoClearPath acp(this->getContext()->getPathRenderer( - element->getPath(), + element->getPath(), stroke, fGpu, false, type, SkPath::ConvertToNonInverseFillType(fillType))); if (NULL == acp.renderer()) { @@ -381,9 +381,9 @@ bool GrClipMaskManager::canStencilAndDrawElement(GrTexture* target, GrPathRendererChain::kStencilAndColorAntiAlias_DrawType : GrPathRendererChain::kStencilAndColor_DrawType; SkPath::FillType fillType = element->getPath().getFillType(); - acp->set(this->getContext()->getPathRenderer(element->getPath(), + acp->set(this->getContext()->getPathRenderer(element->getPath(), stroke, fGpu, false, type, - SkPath::ConvertToNonInverseFillType(fillType))); + SkPath::ConvertToNonInverseFillType(fillType))); return NULL != acp->renderer(); } default: diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h index fa54f3ce0e..5e7d737868 100644 --- a/src/gpu/GrClipMaskManager.h +++ b/src/gpu/GrClipMaskManager.h @@ -141,7 +141,7 @@ private: // Determines whether it is possible to draw the element to both the stencil buffer and the // alpha mask simultaneously. If so and the element is a path a compatible path renderer is // also returned. - bool canStencilAndDrawElement(GrTexture* target, const SkClipStack::Element*, + bool canStencilAndDrawElement(GrTexture* target, const SkClipStack::Element*, GrPathRenderer::AutoClearPath* pr); void mergeMask(GrTexture* dstMask, diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index ab20dc3902..3fbdf16005 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -1155,7 +1155,7 @@ void GrContext::internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& SkTCopyOnFirstWrite stroke(origStroke); // Try a 1st time without stroking the path and without allowing the SW renderer - GrPathRenderer::AutoClearPath acp(this->getPathRenderer(*pathPtr, *stroke, + GrPathRenderer::AutoClearPath acp(this->getPathRenderer(*pathPtr, *stroke, target, false, type, pathPtr->getFillType())); diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h index 692cefc7f1..4dafcff0e1 100644 --- a/src/gpu/GrPathRenderer.h +++ b/src/gpu/GrPathRenderer.h @@ -100,8 +100,8 @@ public: } /** - * Returns true if this path renderer is able to render the current path. Returning false - * allows the caller to fallback to another path renderer This function is called when + * Returns true if this path renderer is able to render the current path. Returning false + * allows the caller to fallback to another path renderer This function is called when * searching for a path renderer capable of rendering a path. * * @param stroke The stroke information (width, join, cap) @@ -114,8 +114,8 @@ public: const GrDrawTarget* target, bool antiAlias) const = 0; /** - * Draws the current path into the draw target. If getStencilSupport() would return - * kNoRestriction then the subclass must respect the stencil settings of the + * Draws the current path into the draw target. If getStencilSupport() would return + * kNoRestriction then the subclass must respect the stencil settings of the * target's draw state. * * @param stroke the stroke information (width, join, cap) @@ -134,7 +134,7 @@ public: /** * Draws the current path to the stencil buffer. Assume the writable stencil bits are already - * initialized to zero. The pixels inside the path will have non-zero stencil values + * initialized to zero. The pixels inside the path will have non-zero stencil values * afterwards. * * @param stroke the stroke information (width, join, cap)