diff options
author | 2017-10-09 15:45:33 -0400 | |
---|---|---|
committer | 2017-10-09 21:20:34 +0000 | |
commit | 63fd760a37905c45d26fc3d49cac261fad1b4808 (patch) | |
tree | 279aa7293ea1773ac60230790868fe0e1fc725b0 /src | |
parent | a49909aa24a370d6dff98d300d0c42ff8cd2c623 (diff) |
Remove trailing whitespace.
Also adds a presubmit to prevent adding trailing whitespace to source
code in the future.
Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6
Reviewed-on: https://skia-review.googlesource.com/57380
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src')
57 files changed, 129 insertions, 129 deletions
diff --git a/src/codec/SkRawCodec.cpp b/src/codec/SkRawCodec.cpp index dfbd7e996a..5f3d469b5d 100644 --- a/src/codec/SkRawCodec.cpp +++ b/src/codec/SkRawCodec.cpp @@ -184,7 +184,7 @@ class SkRawStream { public: virtual ~SkRawStream() {} - /* + /* * Gets the length of the stream. Depending on the type of stream, this may require reading to * the end of the stream. */ diff --git a/src/core/SkBitmapCache.cpp b/src/core/SkBitmapCache.cpp index 0fc0c9e075..210787e47d 100644 --- a/src/core/SkBitmapCache.cpp +++ b/src/core/SkBitmapCache.cpp @@ -193,7 +193,7 @@ public: SkASSERT(rec->fMalloc != nullptr); } } - + bool install(SkBitmap* bitmap) { SkAutoMutexAcquire ama(fMutex); diff --git a/src/core/SkBuffer.cpp b/src/core/SkBuffer.cpp index b7cf8b2b87..51ab239afe 100644 --- a/src/core/SkBuffer.cpp +++ b/src/core/SkBuffer.cpp @@ -35,7 +35,7 @@ bool SkRBuffer::skipToAlign4() { return false; } } - + /////////////////////////////////////////////////////////////////////////////////////////////////// void* SkWBuffer::skip(size_t size) { diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index f1b42e6975..fdfd5a4007 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -1440,7 +1440,7 @@ void SkCanvas::onClipRRect(const SkRRect& rrect, SkClipOp op, ClipEdgeStyle edge AutoValidateClip avc(this); bool isAA = kSoft_ClipEdgeStyle == edgeStyle; - + FOR_EACH_TOP_DEVICE(device->clipRRect(rrect, op, isAA)); fMCRec->fRasterClip.op(rrect, fMCRec->fMatrix, this->getTopLayerBounds(), (SkRegion::Op)op, @@ -1477,7 +1477,7 @@ void SkCanvas::onClipPath(const SkPath& path, SkClipOp op, ClipEdgeStyle edgeSty AutoValidateClip avc(this); bool isAA = kSoft_ClipEdgeStyle == edgeStyle; - + FOR_EACH_TOP_DEVICE(device->clipPath(path, op, isAA)); const SkPath* rasterClipPath = &path; diff --git a/src/core/SkColorSpace_ICC.cpp b/src/core/SkColorSpace_ICC.cpp index 5a510903c6..72592d6444 100644 --- a/src/core/SkColorSpace_ICC.cpp +++ b/src/core/SkColorSpace_ICC.cpp @@ -652,7 +652,7 @@ static bool load_color_lut(sk_sp<SkColorLookUpTable>* colorLUT, uint32_t inputCh * 3x3 matrix with no translation * * @param matrix The matrix to store the result in - * @param src Data to load the matrix out of. + * @param src Data to load the matrix out of. * @param len The length of |src|. * Must have 48 bytes if |translate| is set and 36 bytes otherwise. * @param translate Whether to read the translation column or not @@ -679,7 +679,7 @@ static bool load_matrix(SkMatrix44* matrix, const uint8_t* src, size_t len, bool default: encodingFactor = 1.f; SkASSERT(false); - break; + break; } float array[16]; array[ 0] = encodingFactor * SkFixedToFloat(read_big_endian_i32(src)); @@ -1100,7 +1100,7 @@ bool load_a2b0_lutn_type(std::vector<SkColorSpace_A2B::Element>* elements, const inTableEntries = read_big_endian_u16(src + 48); outTableEntries = read_big_endian_u16(src + 50); precision = 2; - + constexpr size_t kMaxLut16GammaEntries = 4096; if (inTableEntries < 2) { SkColorSpacePrintf("Too few (%d) input gamma table entries. Must have at least 2.\n", @@ -1111,7 +1111,7 @@ bool load_a2b0_lutn_type(std::vector<SkColorSpace_A2B::Element>* elements, const inTableEntries, kMaxLut16GammaEntries); return false; } - + if (outTableEntries < 2) { SkColorSpacePrintf("Too few (%d) output gamma table entries. Must have at least 2.\n", outTableEntries); diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp index caae8398f1..0b3eedab17 100644 --- a/src/core/SkGeometry.cpp +++ b/src/core/SkGeometry.cpp @@ -1185,7 +1185,7 @@ int SkConic::computeQuadPOW2(SkScalar tol) const { return pow2; } -// This was originally developed and tested for pathops: see SkOpTypes.h +// This was originally developed and tested for pathops: see SkOpTypes.h // returns true if (a <= b <= c) || (a >= b >= c) static bool between(SkScalar a, SkScalar b, SkScalar c) { return (a - b) * (c - b) <= 0; @@ -1425,7 +1425,7 @@ int SkConic::BuildUnitArc(const SkVector& uStart, const SkVector& uStop, SkRotat if (!lastQ.equalsWithinTolerance(offCurve)) { dst[conicCount].set(lastQ, offCurve, finalP, cosThetaOver2); conicCount += 1; - } + } } // now handle counter-clockwise and the initial unitStart rotation diff --git a/src/core/SkMatrixPriv.h b/src/core/SkMatrixPriv.h index 844901c011..ee6f8a153d 100644 --- a/src/core/SkMatrixPriv.h +++ b/src/core/SkMatrixPriv.h @@ -27,7 +27,7 @@ public: return true; } // Insert other special-cases here (e.g. scale+translate) - + // general case SkMatrix inverse; if (mx.invert(&inverse)) { @@ -42,7 +42,7 @@ public: SkASSERT(0 == stride % sizeof(SkScalar)); SkMatrix::TypeMask tm = mx.getType(); - + if (SkMatrix::kIdentity_Mask == tm) { return; } @@ -57,7 +57,7 @@ public: return; } // Insert other special-cases here (e.g. scale+translate) - + // general case SkMatrix::MapXYProc proc = mx.getMapXYProc(); for (int i = 0; i < count; ++i) { diff --git a/src/core/SkPaintPriv.h b/src/core/SkPaintPriv.h index 663ed2d836..72c9274859 100644 --- a/src/core/SkPaintPriv.h +++ b/src/core/SkPaintPriv.h @@ -62,7 +62,7 @@ public: static void MakeTextMatrix(SkMatrix* matrix, const SkPaint& paint) { MakeTextMatrix(matrix, paint.getTextSize(), paint.getTextScaleX(), paint.getTextSkewX()); } - + static bool ShouldDither(const SkPaint&, SkColorType); }; diff --git a/src/core/SkPathEffect.cpp b/src/core/SkPathEffect.cpp index ec5ac3b945..3eee6656dd 100644 --- a/src/core/SkPathEffect.cpp +++ b/src/core/SkPathEffect.cpp @@ -104,7 +104,7 @@ public: } return fPE0->filterPath(dst, *ptr, rec, cullRect); } - + SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect) @@ -170,7 +170,7 @@ public: return fPE0->filterPath(dst, src, rec, cullRect) | fPE1->filterPath(dst, src, rec, cullRect); } - + SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect) diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp index 69ff736fcf..40ce54e4d8 100644 --- a/src/core/SkPictureData.cpp +++ b/src/core/SkPictureData.cpp @@ -95,7 +95,7 @@ SkPictureData::SkPictureData(const SkPictureRecord& record, fVerticesRefs[i] = SkRef(verts[i]); } } - + const SkTDArray<const SkImage*>& imgs = record.getImageRefs(); fImageCount = imgs.count(); if (fImageCount > 0) { diff --git a/src/core/SkReadBuffer.h b/src/core/SkReadBuffer.h index 2541b54202..28f7ecba17 100644 --- a/src/core/SkReadBuffer.h +++ b/src/core/SkReadBuffer.h @@ -223,7 +223,7 @@ public: void setInflator(SkInflator* inf) { fInflator = inf; } // sk_sp<SkImage> inflateImage(); - + protected: /** * Allows subclass to check if we are using factories for expansion diff --git a/src/core/SkRegion.cpp b/src/core/SkRegion.cpp index b25633b67c..dd70d1f507 100644 --- a/src/core/SkRegion.cpp +++ b/src/core/SkRegion.cpp @@ -200,7 +200,7 @@ char* SkRegion::toString() { iter.reset(*this); while (!iter.done()) { const SkIRect& r = iter.rect(); - count += snprintf(result+count, max - count, + count += snprintf(result+count, max - count, "(%d,%d,%d,%d)", r.fLeft, r.fTop, r.fRight, r.fBottom); iter.next(); } diff --git a/src/core/SkStroke.cpp b/src/core/SkStroke.cpp index 7e5d4e3939..0852f56bd2 100644 --- a/src/core/SkStroke.cpp +++ b/src/core/SkStroke.cpp @@ -1396,7 +1396,7 @@ void SkStroke::strokePath(const SkPath& src, SkPath* dst) const { // We can always ignore centers for stroke and fill convex line-only paths // TODO: remove the line-only restriction - bool ignoreCenter = fDoFill && (src.getSegmentMasks() == SkPath::kLine_SegmentMask) && + bool ignoreCenter = fDoFill && (src.getSegmentMasks() == SkPath::kLine_SegmentMask) && src.isLastContourClosed() && src.isConvex(); SkPathStroker stroker(src, radius, fMiterLimit, this->getCap(), this->getJoin(), diff --git a/src/core/SkTextBlob.cpp b/src/core/SkTextBlob.cpp index 03ef397dc0..ebd73a91dc 100644 --- a/src/core/SkTextBlob.cpp +++ b/src/core/SkTextBlob.cpp @@ -247,7 +247,7 @@ private: SkTextBlob::GlyphPositioning positioning) { return glyphCount * ScalarsPerGlyph(positioning); } - + uint32_t* textSizePtr() const { // textSize follows the position buffer. SkASSERT(isExtended()); @@ -809,7 +809,7 @@ sk_sp<SkTextBlob> SkTextBlob::MakeFromBuffer(SkReadBuffer& reader) { } } } - + return blobBuilder.make(); } diff --git a/src/core/SkVertices.cpp b/src/core/SkVertices.cpp index 8dadad056b..853bd31ca8 100644 --- a/src/core/SkVertices.cpp +++ b/src/core/SkVertices.cpp @@ -216,6 +216,6 @@ sk_sp<SkVertices> SkVertices::Decode(const void* data, size_t length) { reader.read(builder.texCoords(), sizes.fTSize); reader.read(builder.colors(), sizes.fCSize); reader.read(builder.indices(), sizes.fISize); - + return builder.detach(); } diff --git a/src/effects/SkDropShadowImageFilter.cpp b/src/effects/SkDropShadowImageFilter.cpp index f0e4c7f022..7d0d90587e 100644 --- a/src/effects/SkDropShadowImageFilter.cpp +++ b/src/effects/SkDropShadowImageFilter.cpp @@ -20,7 +20,7 @@ sk_sp<SkImageFilter> SkDropShadowImageFilter::Make(SkScalar dx, SkScalar dy, SkColor color, ShadowMode shadowMode, sk_sp<SkImageFilter> input, const CropRect* cropRect) { - return sk_sp<SkImageFilter>(new SkDropShadowImageFilter(dx, dy, sigmaX, sigmaY, + return sk_sp<SkImageFilter>(new SkDropShadowImageFilter(dx, dy, sigmaX, sigmaY, color, shadowMode, std::move(input), cropRect)); diff --git a/src/effects/SkEmbossMaskFilter.h b/src/effects/SkEmbossMaskFilter.h index 395657224c..29b70ad1f9 100644 --- a/src/effects/SkEmbossMaskFilter.h +++ b/src/effects/SkEmbossMaskFilter.h @@ -24,7 +24,7 @@ public: }; static sk_sp<SkMaskFilter> Make(SkScalar blurSigma, const Light& light); - + // overrides from SkMaskFilter // This method is not exported to java. SkMask::Format getFormat() const override; diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp index da3204e132..c335474200 100644 --- a/src/effects/SkPictureImageFilter.cpp +++ b/src/effects/SkPictureImageFilter.cpp @@ -22,7 +22,7 @@ sk_sp<SkImageFilter> SkPictureImageFilter::Make(sk_sp<SkPicture> picture) { sk_sp<SkImageFilter> SkPictureImageFilter::Make(sk_sp<SkPicture> picture, const SkRect& cropRect) { - return sk_sp<SkImageFilter>(new SkPictureImageFilter(std::move(picture), + return sk_sp<SkImageFilter>(new SkPictureImageFilter(std::move(picture), cropRect, kDeviceSpace_PictureResolution, kLow_SkFilterQuality, @@ -177,7 +177,7 @@ void SkPictureImageFilter::drawPictureAtLocalResolution(SkSpecialImage* source, SkIRect localIBounds = localBounds.roundOut(); sk_sp<SkSpecialImage> localImg; - { + { sk_sp<SkSpecialSurface> localSurface(source->makeSurface(ctx.outputProperties(), localIBounds.size())); if (!localSurface) { diff --git a/src/effects/SkRRectsGaussianEdgeMaskFilter.cpp b/src/effects/SkRRectsGaussianEdgeMaskFilter.cpp index 2f697a3a63..27bf09fd7c 100644 --- a/src/effects/SkRRectsGaussianEdgeMaskFilter.cpp +++ b/src/effects/SkRRectsGaussianEdgeMaskFilter.cpp @@ -415,7 +415,7 @@ private: second.getBounds().centerX(), second.getBounds().centerY()); - pdman.set4f(fSizesUni, + pdman.set4f(fSizesUni, 0.5f * first.rect().width(), 0.5f * first.rect().height(), 0.5f * second.rect().width(), @@ -425,7 +425,7 @@ private: edgeFP.secondMode() == kSimpleCircular_Mode) { // This is a bit of overkill since fX should equal fY for both round rects but it // makes the shader code simpler. - pdman.set4f(fRadiiUni, + pdman.set4f(fRadiiUni, first.getSimpleRadii().fX, first.getSimpleRadii().fY, second.getSimpleRadii().fX, second.getSimpleRadii().fY); } @@ -495,7 +495,7 @@ private: bool onIsEqual(const GrFragmentProcessor& proc) const override { const RRectsGaussianEdgeFP& edgeFP = proc.cast<RRectsGaussianEdgeFP>(); return fFirst == edgeFP.fFirst && - fSecond == edgeFP.fSecond && + fSecond == edgeFP.fSecond && fRadius == edgeFP.fRadius; } @@ -568,9 +568,9 @@ void SkRRectsGaussianEdgeMaskFilterImpl::flatten(SkWriteBuffer& buf) const { sk_sp<SkMaskFilter> SkRRectsGaussianEdgeMaskFilter::Make(const SkRRect& first, const SkRRect& second, SkScalar radius) { - if ((!first.isRect() && !first.isCircle() && !first.isSimpleCircular()) || + if ((!first.isRect() && !first.isCircle() && !first.isSimpleCircular()) || (!second.isRect() && !second.isCircle() && !second.isSimpleCircular())) { - // we only deal with the shapes where the x & y radii are equal + // we only deal with the shapes where the x & y radii are equal // and the same for all four corners return nullptr; } diff --git a/src/effects/SkTileImageFilter.cpp b/src/effects/SkTileImageFilter.cpp index 050e813a9a..59e6e29fee 100644 --- a/src/effects/SkTileImageFilter.cpp +++ b/src/effects/SkTileImageFilter.cpp @@ -89,7 +89,7 @@ sk_sp<SkSpecialImage> SkTileImageFilter::onFilterImage(SkSpecialImage* source, SkPaint paint; paint.setBlendMode(SkBlendMode::kSrc); - input->draw(canvas, + input->draw(canvas, SkIntToScalar(inputOffset.x()), SkIntToScalar(inputOffset.y()), &paint); diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp index 4ad789269c..1337cfa481 100644 --- a/src/effects/SkXfermodeImageFilter.cpp +++ b/src/effects/SkXfermodeImageFilter.cpp @@ -128,7 +128,7 @@ sk_sp<SkSpecialImage> SkXfermodeImageFilter_Base::onFilterImage(SkSpecialImage* srcBounds = SkIRect::MakeXYWH(backgroundOffset.x(), backgroundOffset.y(), background->width(), background->height()); } - + srcBounds.join(foregroundBounds); if (srcBounds.isEmpty()) { return nullptr; @@ -145,7 +145,7 @@ sk_sp<SkSpecialImage> SkXfermodeImageFilter_Base::onFilterImage(SkSpecialImage* #if SK_SUPPORT_GPU if (source->isTextureBacked()) { return this->filterImageGPU(source, - background, backgroundOffset, + background, backgroundOffset, foreground, foregroundOffset, bounds, ctx.outputProperties()); } diff --git a/src/gpu/GrShaderVar.h b/src/gpu/GrShaderVar.h index 5a379b9d77..29e056c332 100644 --- a/src/gpu/GrShaderVar.h +++ b/src/gpu/GrShaderVar.h @@ -29,7 +29,7 @@ public: }; /** - * Values for array count that have special meaning. We allow 1-sized arrays.git + * Values for array count that have special meaning. We allow 1-sized arrays.git */ enum { kNonArray = 0, // not an array diff --git a/src/gpu/GrSurfaceContextPriv.h b/src/gpu/GrSurfaceContextPriv.h index bd3d2de217..4a45f8f9b8 100644 --- a/src/gpu/GrSurfaceContextPriv.h +++ b/src/gpu/GrSurfaceContextPriv.h @@ -18,7 +18,7 @@ public: GrContext* getContext() { return fSurfaceContext->fContext; } private: - explicit GrSurfaceContextPriv(GrSurfaceContext* surfaceContext) + explicit GrSurfaceContextPriv(GrSurfaceContext* surfaceContext) : fSurfaceContext(surfaceContext) { } diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp index 580031f2fb..1b39363419 100644 --- a/src/gpu/GrSurfaceProxy.cpp +++ b/src/gpu/GrSurfaceProxy.cpp @@ -454,7 +454,7 @@ void GrSurfaceProxyPriv::exactify() { if (fProxy->fTarget) { // The kApprox but already instantiated case. Setting the proxy's width & height to // the instantiated width & height could have side-effects going forward, since we're - // obliterating the area of interest information. This call (exactify) only used + // obliterating the area of interest information. This call (exactify) only used // when converting an SkSpecialImage to an SkImage so the proxy shouldn't be // used for additional draws. fProxy->fWidth = fProxy->fTarget->width(); diff --git a/src/gpu/GrTessellator.h b/src/gpu/GrTessellator.h index a09b7c2e43..4f82ea8b8c 100644 --- a/src/gpu/GrTessellator.h +++ b/src/gpu/GrTessellator.h @@ -46,7 +46,7 @@ struct WindingVertex { int PathToVertices(const SkPath& path, SkScalar tolerance, const SkRect& clipBounds, WindingVertex** verts); -int PathToTriangles(const SkPath& path, SkScalar tolerance, const SkRect& clipBounds, +int PathToTriangles(const SkPath& path, SkScalar tolerance, const SkRect& clipBounds, VertexAllocator*, bool antialias, const GrColor& color, bool canTweakAlphaForCoverage, bool *isLinear); } diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 94c5f2e184..63fe074d79 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -585,7 +585,7 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, // See crbug.com/755871. This could probably be narrowed to just partial clears as the driver // bugs seems to involve clearing too much and not skipping the clear. - // See crbug.com/768134. This is also needed for full clears and was seen on an nVidia K620 + // See crbug.com/768134. This is also needed for full clears and was seen on an nVidia K620 // but only for D3D11 ANGLE. if (GrGLANGLEBackend::kD3D11 == ctxInfo.angleBackend()) { fUseDrawInsteadOfClear = true; diff --git a/src/gpu/gl/GrGLContext.h b/src/gpu/gl/GrGLContext.h index 977d3606a5..4e3712559c 100644 --- a/src/gpu/gl/GrGLContext.h +++ b/src/gpu/gl/GrGLContext.h @@ -95,7 +95,7 @@ public: ~GrGLContext() override; private: - GrGLContext(const ConstructorArgs& args) + GrGLContext(const ConstructorArgs& args) : INHERITED(args) , fCompiler(nullptr) {} diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 10dabe4629..159cec721f 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -3304,7 +3304,7 @@ static inline bool can_blit_framebuffer_for_copy_surface( if (dstRT && dstRT->numColorSamples() > 0) { return false; } - } + } if (GrGLCaps::kNoFormatConversion_BlitFramebufferFlag & blitFramebufferFlags) { if (dst->config() != src->config()) { return false; diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp index d5b1a8d1d4..6de545b0c4 100644 --- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp +++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp @@ -226,7 +226,7 @@ void GrGLSLFragmentShaderBuilder::enableCustomOutput() { fCustomColorOutputIndex = fOutputs.count(); fOutputs.push_back().set(kHalf4_GrSLType, DeclaredColorOutputName(), GrShaderVar::kOut_TypeModifier); - fProgramBuilder->finalizeFragmentOutputColor(fOutputs.back()); + fProgramBuilder->finalizeFragmentOutputColor(fOutputs.back()); } } diff --git a/src/gpu/instanced/InstancedRendering.h b/src/gpu/instanced/InstancedRendering.h index e349f6337b..93e3d5884e 100644 --- a/src/gpu/instanced/InstancedRendering.h +++ b/src/gpu/instanced/InstancedRendering.h @@ -35,7 +35,7 @@ class InstanceProcessor; * There is only one OpAllocator which encapsulates the creation of InstancedOps and the pool * of memory used for their Draw objects. * - * The InstancedRendering class tracks a list of InstancedOps that will all be drawn during + * The InstancedRendering class tracks a list of InstancedOps that will all be drawn during * the same flush. There is currently one per opList. The nature of instanced * rendering allows these ops to combine well and render efficiently. * During a flush, it assembles the accumulated draw data into a single vertex and texel diff --git a/src/gpu/mtl/GrMtlCaps.h b/src/gpu/mtl/GrMtlCaps.h index b793159ad5..75bb2e7125 100644 --- a/src/gpu/mtl/GrMtlCaps.h +++ b/src/gpu/mtl/GrMtlCaps.h @@ -60,7 +60,7 @@ public: private: void initFeatureSet(MTLFeatureSet featureSet); - + void initGrCaps(const id<MTLDevice> device); void initShaderCaps(); void initSampleCount(); diff --git a/src/gpu/ops/GrAAConvexTessellator.cpp b/src/gpu/ops/GrAAConvexTessellator.cpp index aea7ce72ae..6c0125a576 100644 --- a/src/gpu/ops/GrAAConvexTessellator.cpp +++ b/src/gpu/ops/GrAAConvexTessellator.cpp @@ -584,7 +584,7 @@ void GrAAConvexTessellator::createOuterRing(const Ring& previousRing, SkScalar o // For very shallow angles all the corner points could fuse if (!duplicate_pt(miter, this->point(perp1Idx))) { int miterIdx; - miterIdx = this->addPt(miter, -outset, coverage, false, + miterIdx = this->addPt(miter, -outset, coverage, false, kSharp_CurveState); nextRing->addIdx(miterIdx, originalIdx); // The two triangles for the corner diff --git a/src/gpu/ops/GrAAConvexTessellator.h b/src/gpu/ops/GrAAConvexTessellator.h index 2fdde10324..ee91128bfb 100644 --- a/src/gpu/ops/GrAAConvexTessellator.h +++ b/src/gpu/ops/GrAAConvexTessellator.h @@ -143,7 +143,7 @@ private: void makeOriginalRing() { for (int i = 0; i < fPts.count(); ++i) { fPts[i].fOrigEdgeId = fPts[i].fIndex; - } + } } // init should be called after all the indices have been added (via addIdx) diff --git a/src/gpu/ops/GrAtlasTextOp.h b/src/gpu/ops/GrAtlasTextOp.h index 7ae31665f4..0738ce7f20 100644 --- a/src/gpu/ops/GrAtlasTextOp.h +++ b/src/gpu/ops/GrAtlasTextOp.h @@ -172,7 +172,7 @@ private: bool onCombineIfPossible(GrOp* t, const GrCaps& caps) override; static constexpr auto kMaxTextures = 4; - + // TODO just use class params sk_sp<GrGeometryProcessor> setupDfProcessor(const SkMatrix& viewMatrix, SkColor luminanceColor, GrColor color, diff --git a/src/gpu/vk/GrVkDescriptorPool.h b/src/gpu/vk/GrVkDescriptorPool.h index 5327a7de8c..97c27e1eaf 100644 --- a/src/gpu/vk/GrVkDescriptorPool.h +++ b/src/gpu/vk/GrVkDescriptorPool.h @@ -33,7 +33,7 @@ public: #ifdef SK_TRACE_VK_RESOURCES void dumpInfo() const override { - SkDebugf("GrVkDescriptorPool: %d, type %d (%d refs)\n", fDescPool, fType, + SkDebugf("GrVkDescriptorPool: %d, type %d (%d refs)\n", fDescPool, fType, this->getRefCnt()); } #endif diff --git a/src/gpu/vk/GrVkMemory.cpp b/src/gpu/vk/GrVkMemory.cpp index 0496a5463c..a90533e17b 100644 --- a/src/gpu/vk/GrVkMemory.cpp +++ b/src/gpu/vk/GrVkMemory.cpp @@ -483,7 +483,7 @@ GrVkSubHeap::GrVkSubHeap(const GrVkGpu* gpu, uint32_t memoryTypeIndex, uint32_t &fAlloc)); if (VK_SUCCESS != err) { this->reset(); - } + } #ifdef SK_DEBUG else { gHeapUsage[heapIndex] += size; diff --git a/src/gpu/vk/GrVkMemory.h b/src/gpu/vk/GrVkMemory.h index 77267ab48c..a8f3771388 100644 --- a/src/gpu/vk/GrVkMemory.h +++ b/src/gpu/vk/GrVkMemory.h @@ -107,7 +107,7 @@ private: const GrVkGpu* fGpu; #ifdef SK_DEBUG uint32_t fHeapIndex; -#endif +#endif uint32_t fMemoryTypeIndex; VkDeviceMemory fAlloc; diff --git a/src/pathops/SkAddIntersections.cpp b/src/pathops/SkAddIntersections.cpp index b9f2d8dee2..f772cc2b06 100644 --- a/src/pathops/SkAddIntersections.cpp +++ b/src/pathops/SkAddIntersections.cpp @@ -521,7 +521,7 @@ bool AddIntersectTs(SkOpContour* test, SkOpContour* next, SkOpCoincidence* coinc SkOpPtT* nextTAt = iPtIsIntegral ? wn.segment()->addT(ts[!swap][pt], iPt) : wn.segment()->addT(ts[!swap][pt]); if (!testTAt->contains(nextTAt)) { - SkOpPtT* oppPrev = testTAt->oppPrev(nextTAt); // Returns nullptr if pair + SkOpPtT* oppPrev = testTAt->oppPrev(nextTAt); // Returns nullptr if pair if (oppPrev) { // already share a pt-t loop. testTAt->span()->mergeMatches(nextTAt->span()); testTAt->addOpp(nextTAt, oppPrev); diff --git a/src/pathops/SkDLineIntersection.cpp b/src/pathops/SkDLineIntersection.cpp index 082e2987b9..5540c5c165 100644 --- a/src/pathops/SkDLineIntersection.cpp +++ b/src/pathops/SkDLineIntersection.cpp @@ -122,10 +122,10 @@ int SkIntersections::intersect(const SkDLine& a, const SkDLine& b) { computePoints(a, 1); } } -/* Allow tracking that both sets of end points are near each other -- the lines are entirely +/* Allow tracking that both sets of end points are near each other -- the lines are entirely coincident -- even when the end points are not exactly the same. Mark this as a 'wild card' for the end points, so that either point is considered totally - coincident. Then, avoid folding the lines over each other, but allow either end to mate + coincident. Then, avoid folding the lines over each other, but allow either end to mate to the next set of lines. */ if (fAllowNear || !unparallel) { diff --git a/src/pathops/SkOpCubicHull.cpp b/src/pathops/SkOpCubicHull.cpp index 6b17608e84..a733138ad4 100644 --- a/src/pathops/SkOpCubicHull.cpp +++ b/src/pathops/SkOpCubicHull.cpp @@ -97,7 +97,7 @@ int SkDCubic::convexHull(char order[4]) const { order[2] = 1; return 3; } - // one of the control points may be very nearly but not exactly equal -- + // one of the control points may be very nearly but not exactly equal -- double dist1_0 = fPts[1].distanceSquared(fPts[0]); double dist1_3 = fPts[1].distanceSquared(fPts[3]); double dist2_0 = fPts[2].distanceSquared(fPts[0]); diff --git a/src/pathops/SkOpSpan.cpp b/src/pathops/SkOpSpan.cpp index 40d6383c74..28989d9511 100644 --- a/src/pathops/SkOpSpan.cpp +++ b/src/pathops/SkOpSpan.cpp @@ -327,7 +327,7 @@ void SkOpSpanBase::mergeMatches(SkOpSpanBase* opp) { } SkOpSpanBase* innerBase = inner->span(); SkASSERT(innerBase->ptT() == inner); - // when the intersection is first detected, the span base is marked if there are + // when the intersection is first detected, the span base is marked if there are // more than one point in the intersection. if (!zero_or_one(inner->fT)) { innerBase->upCast()->release(test); diff --git a/src/pathops/SkPathOpsCommon.cpp b/src/pathops/SkPathOpsCommon.cpp index 9cdf8124a8..feba8d38a8 100644 --- a/src/pathops/SkPathOpsCommon.cpp +++ b/src/pathops/SkPathOpsCommon.cpp @@ -326,7 +326,7 @@ bool HandleCoincidence(SkOpContourHead* contourList, SkOpCoincidence* coincidenc // adjust the winding value to account for coincident edges if (!pairs->apply(DEBUG_ITER_ONLY_PARAMS(SAFETY_COUNT - safetyHatch))) { return false; - } + } // For each coincident pair that overlaps another, when the receivers (the 1st of the pair) // are different, construct a new pair to resolve their mutual span if (!pairs->findOverlaps(&overlaps DEBUG_ITER_PARAMS(SAFETY_COUNT - safetyHatch))) { diff --git a/src/pathops/SkPathOpsDebug.cpp b/src/pathops/SkPathOpsDebug.cpp index f0a8da3136..b3ca85210b 100644 --- a/src/pathops/SkPathOpsDebug.cpp +++ b/src/pathops/SkPathOpsDebug.cpp @@ -1122,7 +1122,7 @@ void SkOpSegment::debugSetCoinT(int index, SkScalar t) const { fDebugBaseMin = SkTMin(t, fDebugBaseMin); fDebugBaseMax = SkTMax(t, fDebugBaseMax); return; - } + } SkASSERT(fDebugBaseMin >= t || t >= fDebugBaseMax); if (fDebugLastMax < 0 || fDebugLastIndex == index) { fDebugLastIndex = index; @@ -1840,8 +1840,8 @@ void SkOpCoincidence::debugAddOrOverlap(SkPathOpsDebug::GlitchLog* log, } this->debugValidate(); RETURN_FALSE_IF(csDeleted, coinSeg); - RETURN_FALSE_IF(osDeleted, oppSeg); - RETURN_FALSE_IF(ceDeleted, coinSeg); + RETURN_FALSE_IF(osDeleted, oppSeg); + RETURN_FALSE_IF(ceDeleted, coinSeg); RETURN_FALSE_IF(oeDeleted, oppSeg); RETURN_FALSE_IF(!cs || !ce || cs == ce || cs->contains(ce) || !os || !oe || os == oe || os->contains(oe), coinSeg); bool result = true; @@ -2508,7 +2508,7 @@ void SkOpSpanBase::debugMergeMatches(SkPathOpsDebug::GlitchLog* log, const SkOpS } const SkOpSpanBase* innerBase = inner->span(); SkASSERT(innerBase->ptT() == inner); - // when the intersection is first detected, the span base is marked if there are + // when the intersection is first detected, the span base is marked if there are // more than one point in the intersection. // if (!innerBase->hasMultipleHint() && !testBase->hasMultipleHint()) { if (!zero_or_one(inner->fT)) { @@ -2537,7 +2537,7 @@ void SkOpSpanBase::debugMergeMatches(SkPathOpsDebug::GlitchLog* log, const SkOpS SkOPASSERT(0); } #endif - break; + break; // } break; } while ((inner = inner->next()) != innerStop); @@ -2793,13 +2793,13 @@ const SkOpPtT* SkOpPtT::debugOppPrev(const SkOpPtT* opp) const { void SkOpPtT::debugResetCoinT() const { #if DEBUG_COINCIDENCE_ORDER - this->segment()->debugResetCoinT(); + this->segment()->debugResetCoinT(); #endif } void SkOpPtT::debugSetCoinT(int index) const { #if DEBUG_COINCIDENCE_ORDER - this->segment()->debugSetCoinT(index, fT); + this->segment()->debugSetCoinT(index, fT); #endif } diff --git a/src/pathops/SkPathOpsDebug.h b/src/pathops/SkPathOpsDebug.h index 65aedc55df..afdfb32be1 100644 --- a/src/pathops/SkPathOpsDebug.h +++ b/src/pathops/SkPathOpsDebug.h @@ -134,7 +134,7 @@ class SkOpContourHead; extern int gDumpTSectNum; #endif -#if DEBUG_COINCIDENCE || DEBUG_COINCIDENCE_DUMP +#if DEBUG_COINCIDENCE || DEBUG_COINCIDENCE_DUMP #define DEBUG_COIN 1 #else #define DEBUG_COIN 0 diff --git a/src/pathops/SkPathOpsTSect.cpp b/src/pathops/SkPathOpsTSect.cpp index 9bff5af4f0..e096837cec 100644 --- a/src/pathops/SkPathOpsTSect.cpp +++ b/src/pathops/SkPathOpsTSect.cpp @@ -8,54 +8,54 @@ #include "SkPathOpsTSect.h" int SkIntersections::intersect(const SkDQuad& quad1, const SkDQuad& quad2) { - SkTSect<SkDQuad, SkDQuad> sect1(quad1 + SkTSect<SkDQuad, SkDQuad> sect1(quad1 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); - SkTSect<SkDQuad, SkDQuad> sect2(quad2 + SkTSect<SkDQuad, SkDQuad> sect2(quad2 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); SkTSect<SkDQuad, SkDQuad>::BinarySearch(§1, §2, this); return used(); } int SkIntersections::intersect(const SkDConic& conic, const SkDQuad& quad) { - SkTSect<SkDConic, SkDQuad> sect1(conic + SkTSect<SkDConic, SkDQuad> sect1(conic SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); - SkTSect<SkDQuad, SkDConic> sect2(quad + SkTSect<SkDQuad, SkDConic> sect2(quad SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); SkTSect<SkDConic, SkDQuad>::BinarySearch(§1, §2, this); return used(); } int SkIntersections::intersect(const SkDConic& conic1, const SkDConic& conic2) { - SkTSect<SkDConic, SkDConic> sect1(conic1 + SkTSect<SkDConic, SkDConic> sect1(conic1 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); - SkTSect<SkDConic, SkDConic> sect2(conic2 + SkTSect<SkDConic, SkDConic> sect2(conic2 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); SkTSect<SkDConic, SkDConic>::BinarySearch(§1, §2, this); return used(); } int SkIntersections::intersect(const SkDCubic& cubic, const SkDQuad& quad) { - SkTSect<SkDCubic, SkDQuad> sect1(cubic + SkTSect<SkDCubic, SkDQuad> sect1(cubic SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); - SkTSect<SkDQuad, SkDCubic> sect2(quad + SkTSect<SkDQuad, SkDCubic> sect2(quad SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); SkTSect<SkDCubic, SkDQuad>::BinarySearch(§1, §2, this); return used(); } int SkIntersections::intersect(const SkDCubic& cubic, const SkDConic& conic) { - SkTSect<SkDCubic, SkDConic> sect1(cubic + SkTSect<SkDCubic, SkDConic> sect1(cubic SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); - SkTSect<SkDConic, SkDCubic> sect2(conic + SkTSect<SkDConic, SkDCubic> sect2(conic SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); SkTSect<SkDCubic, SkDConic>::BinarySearch(§1, §2, this); return used(); } int SkIntersections::intersect(const SkDCubic& cubic1, const SkDCubic& cubic2) { - SkTSect<SkDCubic, SkDCubic> sect1(cubic1 + SkTSect<SkDCubic, SkDCubic> sect1(cubic1 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); - SkTSect<SkDCubic, SkDCubic> sect2(cubic2 + SkTSect<SkDCubic, SkDCubic> sect2(cubic2 SkDEBUGPARAMS(globalState()) PATH_OPS_DEBUG_T_SECT_PARAMS(2)); SkTSect<SkDCubic, SkDCubic>::BinarySearch(§1, §2, this); return used(); diff --git a/src/pathops/SkPathWriter.cpp b/src/pathops/SkPathWriter.cpp index 9893a502ca..7291002593 100644 --- a/src/pathops/SkPathWriter.cpp +++ b/src/pathops/SkPathWriter.cpp @@ -237,7 +237,7 @@ void SkPathWriter::assemble() { double dist = dx * dx + dy * dy; distLookup.push_back(rRow + iIndex); distances.push_back(dist); // oStart distance from iStart - sortedDist.push_back(dIndex++); + sortedDist.push_back(dIndex++); } rRow += endCount; } diff --git a/src/pathops/SkPathWriter.h b/src/pathops/SkPathWriter.h index 5dd1bf6f60..6534b840c1 100644 --- a/src/pathops/SkPathWriter.h +++ b/src/pathops/SkPathWriter.h @@ -43,7 +43,7 @@ private: bool someAssemblyRequired(); void update(const SkOpPtT* pt); - SkPath fCurrent; // contour under construction + SkPath fCurrent; // contour under construction SkTArray<SkPath> fPartials; // contours with mismatched starts and ends SkTDArray<const SkOpPtT*> fEndPtTs; // possible pt values for partial starts and ends SkPath* fPathPtr; // closed contours are written here diff --git a/src/pipe/SkPipeCanvas.h b/src/pipe/SkPipeCanvas.h index 5604ba787a..dec346f367 100644 --- a/src/pipe/SkPipeCanvas.h +++ b/src/pipe/SkPipeCanvas.h @@ -154,7 +154,7 @@ protected: const SkPaint*) override; void onDrawBitmapLattice(const SkBitmap&, const Lattice& lattice, const SkRect& dst, const SkPaint*) override; - + private: SkPipeDeduper* fDeduper; SkWStream* fStream; diff --git a/src/pipe/SkPipeFormat.h b/src/pipe/SkPipeFormat.h index a6521279d0..3d4904f0d2 100644 --- a/src/pipe/SkPipeFormat.h +++ b/src/pipe/SkPipeFormat.h @@ -17,7 +17,7 @@ enum class SkPipeVerb : uint8_t { kSaveLayer, kRestore, // extra == 0 kConcat, // extra == SkMatrix::MaskType - + kClipRect, // extra == (SkRegion::Op << 1) | isAntiAlias:1 kClipRRect, // extra == (SkRegion::Op << 1) | isAntiAlias:1 kClipPath, // extra == (SkRegion::Op << 1) | isAntiAlias:1 @@ -40,14 +40,14 @@ enum class SkPipeVerb : uint8_t { kDrawPath, // extra == 0 kDrawOval, // extra == 0 kDrawRRect, // extra == 0 - + kDrawImage, // extra == has_paint:1 kDrawImageRect, // extra == constraint | has_src_rect | has_paint kDrawImageNine, // extra == has_paint:1 kDrawImageLattice, // extra == x_count:8 | y_count:8 | has_paint:1 - + kDrawVertices, - + kDrawPicture, // extra == picture_index kDrawAnnotation, // extra == (key_len_plus_1:23 << 1) else next 32 | has_data:1 diff --git a/src/pipe/SkPipeReader.cpp b/src/pipe/SkPipeReader.cpp index 7854a78f4b..593c8b3ce9 100644 --- a/src/pipe/SkPipeReader.cpp +++ b/src/pipe/SkPipeReader.cpp @@ -37,7 +37,7 @@ public: , fTFDeserializer(tfd) , fIMDeserializer(imd) {} - + SkImage* getImage(int index) override { return index ? fImages->get(index - 1) : nullptr; } @@ -79,11 +79,11 @@ public: void setTypefaceDeserializer(SkTypefaceDeserializer* tfd) { fTFDeserializer = tfd; } - + void setImageDeserializer(SkImageDeserializer* imd) { fIMDeserializer = imd; } - + sk_sp<SkTypeface> makeTypeface(const void* data, size_t size); sk_sp<SkImage> makeImage(const sk_sp<SkData>&); @@ -216,7 +216,7 @@ public: } return factory; } - + void readPaint(SkPaint* paint) override { *paint = read_paint(*this); } @@ -767,12 +767,12 @@ const HandlerRec gPipeHandlers[] = { HANDLER(saveLayer), HANDLER(restore), HANDLER(concat), - + HANDLER(clipRect), HANDLER(clipRRect), HANDLER(clipPath), HANDLER(clipRegion), - + HANDLER(drawArc), HANDLER(drawAtlas), HANDLER(drawDRRect), @@ -790,14 +790,14 @@ const HandlerRec gPipeHandlers[] = { HANDLER(drawPath), HANDLER(drawOval), HANDLER(drawRRect), - + HANDLER(drawImage), HANDLER(drawImageRect), HANDLER(drawImageNine), HANDLER(drawImageLattice), - + HANDLER(drawVertices), - + HANDLER(drawPicture), HANDLER(drawAnnotation), diff --git a/src/shaders/SkPerlinNoiseShader.cpp b/src/shaders/SkPerlinNoiseShader.cpp index b1ef1f0a6b..6a59e8972f 100644 --- a/src/shaders/SkPerlinNoiseShader.cpp +++ b/src/shaders/SkPerlinNoiseShader.cpp @@ -489,7 +489,7 @@ SkScalar SkPerlinNoiseShaderImpl::PerlinNoiseShaderContext::noise2D( if (sx < 0 || sy < 0 || sx > 1 || sy > 1) { return 0; // Check for pathological inputs. } - + // This is taken 1:1 from SVG spec: http://www.w3.org/TR/SVG11/filters.html#feTurbulenceElement SkPoint fractionValue = SkPoint::Make(noiseX.noisePositionFractionValue, noiseY.noisePositionFractionValue); // Offset (0,0) diff --git a/src/shaders/gradients/SkRadialGradient.h b/src/shaders/gradients/SkRadialGradient.h index 6a6dadfbc4..1f6441b5a4 100644 --- a/src/shaders/gradients/SkRadialGradient.h +++ b/src/shaders/gradients/SkRadialGradient.h @@ -26,7 +26,7 @@ protected: SkRadialGradient(SkReadBuffer& buffer); void flatten(SkWriteBuffer& buffer) const override; sk_sp<SkShader> onMakeColorSpace(SkColorSpaceXformer* xformer) const override; - + void appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* tPipeline, SkRasterPipeline* postPipeline) const override; diff --git a/src/shaders/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/shaders/gradients/SkTwoPointConicalGradient_gpu.cpp index a08addbff9..5743d24b91 100644 --- a/src/shaders/gradients/SkTwoPointConicalGradient_gpu.cpp +++ b/src/shaders/gradients/SkTwoPointConicalGradient_gpu.cpp @@ -641,7 +641,7 @@ private: typedef GrGradientEffect INHERITED; }; -class FocalInside2PtConicalEffect::GLSLFocalInside2PtConicalProcessor +class FocalInside2PtConicalEffect::GLSLFocalInside2PtConicalProcessor : public GrGradientEffect::GLSLProcessor { public: GLSLFocalInside2PtConicalProcessor(const GrProcessor&); diff --git a/src/sksl/GLSL.std.450.h b/src/sksl/GLSL.std.450.h index 54cc00e9a8..943fd8650f 100644 --- a/src/sksl/GLSL.std.450.h +++ b/src/sksl/GLSL.std.450.h @@ -13,7 +13,7 @@ ** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/src/sksl/spirv.h b/src/sksl/spirv.h index e4f5b5beeb..22821ed862 100644 --- a/src/sksl/spirv.h +++ b/src/sksl/spirv.h @@ -1,20 +1,20 @@ /* ** Copyright (c) 2014-2016 The Khronos Group Inc. -** +** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and/or associated documentation files (the "Materials"), ** to deal in the Materials without restriction, including without limitation ** the rights to use, copy, modify, merge, publish, distribute, sublicense, ** and/or sell copies of the Materials, and to permit persons to whom the ** Materials are furnished to do so, subject to the following conditions: -** +** ** The above copyright notice and this permission notice shall be included in ** all copies or substantial portions of the Materials. -** +** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ -** +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -32,13 +32,13 @@ /* ** Enumeration tokens for SPIR-V, in various styles: ** C, C++, C++11, JSON, Lua, Python -** +** ** - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL ** - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL ** - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL ** - Lua will use tables, e.g.: spv.SourceLanguage.GLSL ** - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] -** +** ** Some tokens act like mask values, which can be OR'd together, ** while others are mutually exclusive. The mask-like ones have ** "Mask" in their name, and a parallel enum that has the shift diff --git a/src/views/mac/SkTextFieldCell.m b/src/views/mac/SkTextFieldCell.m index c5efc46406..fbfed05f7f 100644 --- a/src/views/mac/SkTextFieldCell.m +++ b/src/views/mac/SkTextFieldCell.m @@ -5,14 +5,14 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ - + #import "SkTextFieldCell.h" @implementation SkTextFieldCell - (NSRect)drawingRectForBounds:(NSRect)theRect { NSRect newRect = [super drawingRectForBounds:theRect]; if (selectingOrEditing == NO) { NSSize textSize = [self cellSizeForBounds:theRect]; - float heightDelta = newRect.size.height - textSize.height; + float heightDelta = newRect.size.height - textSize.height; if (heightDelta > 0) { newRect.size.height -= heightDelta; newRect.origin.y += (heightDelta / 2); @@ -21,34 +21,34 @@ return newRect; } -- (void)selectWithFrame:(NSRect)aRect - inView:(NSView *)controlView - editor:(NSText *)textObj - delegate:(id)anObject - start:(NSInteger)selStart +- (void)selectWithFrame:(NSRect)aRect + inView:(NSView *)controlView + editor:(NSText *)textObj + delegate:(id)anObject + start:(NSInteger)selStart length:(NSInteger)selLength { aRect = [self drawingRectForBounds:aRect]; - selectingOrEditing = YES; - [super selectWithFrame:aRect - inView:controlView - editor:textObj - delegate:anObject - start:selStart + selectingOrEditing = YES; + [super selectWithFrame:aRect + inView:controlView + editor:textObj + delegate:anObject + start:selStart length:selLength]; selectingOrEditing = NO; } -- (void)editWithFrame:(NSRect)aRect - inView:(NSView *)controlView - editor:(NSText *)textObj - delegate:(id)anObject - event:(NSEvent *)theEvent { +- (void)editWithFrame:(NSRect)aRect + inView:(NSView *)controlView + editor:(NSText *)textObj + delegate:(id)anObject + event:(NSEvent *)theEvent { aRect = [self drawingRectForBounds:aRect]; selectingOrEditing = YES; - [super editWithFrame:aRect - inView:controlView - editor:textObj - delegate:anObject + [super editWithFrame:aRect + inView:controlView + editor:textObj + delegate:anObject event:theEvent]; selectingOrEditing = NO; } diff --git a/src/xml/SkXMLWriter.cpp b/src/xml/SkXMLWriter.cpp index 3a2c3d40c9..67dcf59d1d 100644 --- a/src/xml/SkXMLWriter.cpp +++ b/src/xml/SkXMLWriter.cpp @@ -47,9 +47,9 @@ void SkXMLWriter::addText(const char text[], size_t length) { if (fElems.isEmpty()) { return; } - + this->onAddText(text, length); - + fElems.top()->fHasText = true; } |