diff options
Diffstat (limited to 'src/core')
140 files changed, 222 insertions, 333 deletions
diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp index 71d212a292..f71d7b61d2 100644 --- a/src/core/SkAAClip.cpp +++ b/src/core/SkAAClip.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkAAClip.h b/src/core/SkAAClip.h index 0207233386..7b29ef142a 100644 --- a/src/core/SkAAClip.h +++ b/src/core/SkAAClip.h @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkAdvancedTypefaceMetrics.cpp b/src/core/SkAdvancedTypefaceMetrics.cpp index 48b2cd73f7..ce2c15b345 100644 --- a/src/core/SkAdvancedTypefaceMetrics.cpp +++ b/src/core/SkAdvancedTypefaceMetrics.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkAdvancedTypefaceMetrics.h b/src/core/SkAdvancedTypefaceMetrics.h index 424e5f3f51..329b7d13c1 100644 --- a/src/core/SkAdvancedTypefaceMetrics.h +++ b/src/core/SkAdvancedTypefaceMetrics.h @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkAlphaRuns.cpp b/src/core/SkAlphaRuns.cpp index 37b1a5705c..37f57c1fa8 100644 --- a/src/core/SkAlphaRuns.cpp +++ b/src/core/SkAlphaRuns.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkAntiRun.h b/src/core/SkAntiRun.h index d49a723b20..8214e28d5b 100644 --- a/src/core/SkAntiRun.h +++ b/src/core/SkAntiRun.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkAutoKern.h b/src/core/SkAutoKern.h index 27df6da22b..8b032519b3 100644 --- a/src/core/SkAutoKern.h +++ b/src/core/SkAutoKern.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkAutoPixmapStorage.cpp b/src/core/SkAutoPixmapStorage.cpp index c0e9c3c8c4..865b3a6029 100644 --- a/src/core/SkAutoPixmapStorage.cpp +++ b/src/core/SkAutoPixmapStorage.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2016 Google Inc. * @@ -57,4 +56,3 @@ const SkData* SkAutoPixmapStorage::detachPixelsAsData() { return data.release(); } - diff --git a/src/core/SkAutoPixmapStorage.h b/src/core/SkAutoPixmapStorage.h index 1a07a9773a..379bf420b0 100644 --- a/src/core/SkAutoPixmapStorage.h +++ b/src/core/SkAutoPixmapStorage.h @@ -1,4 +1,3 @@ - /* * Copyright 2016 Google Inc. * diff --git a/src/core/SkBitmapController.cpp b/src/core/SkBitmapController.cpp index eabf1356bb..ac1029db81 100644 --- a/src/core/SkBitmapController.cpp +++ b/src/core/SkBitmapController.cpp @@ -49,7 +49,7 @@ public: private: SkBitmap fResultBitmap; SkAutoTUnref<const SkMipMap> fCurrMip; - + bool processHQRequest(const SkBitmapProvider&); bool processMediumRequest(const SkBitmapProvider&); }; @@ -77,17 +77,17 @@ bool SkDefaultBitmapControllerState::processHQRequest(const SkBitmapProvider& pr if (fQuality != kHigh_SkFilterQuality) { return false; } - + // Our default return state is to downgrade the request to Medium, w/ or w/o setting fBitmap // to a valid bitmap. If we succeed, we will set this to Low instead. fQuality = kMedium_SkFilterQuality; - + if (kN32_SkColorType != provider.info().colorType() || !cache_size_okay(provider, fInvMatrix) || fInvMatrix.hasPerspective()) { return false; // can't handle the reqeust } - + SkScalar invScaleX = fInvMatrix.getScaleX(); SkScalar invScaleY = fInvMatrix.getScaleY(); if (fInvMatrix.getType() & SkMatrix::kAffine_Mask) { @@ -126,7 +126,7 @@ bool SkDefaultBitmapControllerState::processHQRequest(const SkBitmapProvider& pr dstW, dstH, SkResourceCache::GetAllocator())) { return false; // we failed to create fScaledBitmap } - + SkASSERT(fResultBitmap.getPixels()); fResultBitmap.setImmutable(); if (!provider.isVolatile()) { @@ -135,9 +135,9 @@ bool SkDefaultBitmapControllerState::processHQRequest(const SkBitmapProvider& pr } } } - + SkASSERT(fResultBitmap.getPixels()); - + fInvMatrix.postScale(SkIntToScalar(dstW) / provider.width(), SkIntToScalar(dstH) / provider.height()); fQuality = kLow_SkFilterQuality; @@ -153,11 +153,11 @@ bool SkDefaultBitmapControllerState::processMediumRequest(const SkBitmapProvider if (fQuality != kMedium_SkFilterQuality) { return false; } - + // Our default return state is to downgrade the request to Low, w/ or w/o setting fBitmap // to a valid bitmap. fQuality = kLow_SkFilterQuality; - + SkSize invScaleSize; if (!fInvMatrix.decomposeScale(&invScaleSize, nullptr)) { return false; @@ -179,7 +179,7 @@ bool SkDefaultBitmapControllerState::processMediumRequest(const SkBitmapProvider if (nullptr == fCurrMip->data()) { sk_throw(); } - + const SkSize scale = SkSize::Make(SkScalarInvert(invScaleSize.width()), SkScalarInvert(invScaleSize.height())); SkMipMap::Level level; @@ -225,4 +225,3 @@ SkBitmapController::State* SkDefaultBitmapController::onRequestBitmap(const SkBi void* storage, size_t size) { return SkInPlaceNewCheck<SkDefaultBitmapControllerState>(storage, size, bm, inverse, quality); } - diff --git a/src/core/SkBitmapController.h b/src/core/SkBitmapController.h index 32e73e813d..86b8755ec1 100644 --- a/src/core/SkBitmapController.h +++ b/src/core/SkBitmapController.h @@ -27,12 +27,12 @@ public: const SkPixmap& pixmap() const { return fPixmap; } const SkMatrix& invMatrix() const { return fInvMatrix; } SkFilterQuality quality() const { return fQuality; } - + protected: SkPixmap fPixmap; SkMatrix fInvMatrix; SkFilterQuality fQuality; - + private: friend class SkBitmapController; }; @@ -56,7 +56,7 @@ protected: class SkDefaultBitmapController : public SkBitmapController { public: SkDefaultBitmapController() {} - + protected: State* onRequestBitmap(const SkBitmapProvider&, const SkMatrix& inverse, SkFilterQuality, void* storage, size_t storageSize) override; diff --git a/src/core/SkBitmapHeap.cpp b/src/core/SkBitmapHeap.cpp index c65a704b5a..071647e13e 100644 --- a/src/core/SkBitmapHeap.cpp +++ b/src/core/SkBitmapHeap.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2012 Google Inc. * diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp index ab2321254b..fc749116df 100644 --- a/src/core/SkBitmapProcState.cpp +++ b/src/core/SkBitmapProcState.cpp @@ -824,4 +824,3 @@ void Clamp_S32_opaque_D32_nofilter_DX_shaderproc(const void* sIn, int x, int y, } } } - diff --git a/src/core/SkBitmapProcState_filter.h b/src/core/SkBitmapProcState_filter.h index 99f40eca56..dfc18d8a2b 100644 --- a/src/core/SkBitmapProcState_filter.h +++ b/src/core/SkBitmapProcState_filter.h @@ -1,4 +1,3 @@ - /* * Copyright 2009 The Android Open Source Project * diff --git a/src/core/SkBitmapProcState_matrix.h b/src/core/SkBitmapProcState_matrix.h index 860e27ac7d..7e2e44bcee 100644 --- a/src/core/SkBitmapProcState_matrix.h +++ b/src/core/SkBitmapProcState_matrix.h @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkBitmapProvider.cpp b/src/core/SkBitmapProvider.cpp index 9cf2e9ae6b..9f6eb94310 100644 --- a/src/core/SkBitmapProvider.cpp +++ b/src/core/SkBitmapProvider.cpp @@ -84,4 +84,3 @@ bool SkBitmapProvider::asBitmap(SkBitmap* bm) const { return true; } } - diff --git a/src/core/SkBitmapScaler.cpp b/src/core/SkBitmapScaler.cpp index e3face8c75..398e20c246 100644 --- a/src/core/SkBitmapScaler.cpp +++ b/src/core/SkBitmapScaler.cpp @@ -263,4 +263,3 @@ bool SkBitmapScaler::Resize(SkBitmap* resultPtr, const SkPixmap& source, ResizeM SkASSERT(resultPtr->getPixels()); return true; } - diff --git a/src/core/SkBlitBWMaskTemplate.h b/src/core/SkBlitBWMaskTemplate.h index accf498aba..b0b9358b49 100644 --- a/src/core/SkBlitBWMaskTemplate.h +++ b/src/core/SkBlitBWMaskTemplate.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkBlitter.h b/src/core/SkBlitter.h index 8711f1a10f..0095826248 100644 --- a/src/core/SkBlitter.h +++ b/src/core/SkBlitter.h @@ -59,7 +59,7 @@ public: virtual void blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) { int16_t runs[3]; uint8_t aa[2]; - + runs[0] = 1; runs[1] = 1; runs[2] = 0; @@ -72,7 +72,7 @@ public: virtual void blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) { int16_t runs[2]; uint8_t aa[1]; - + runs[0] = 1; runs[1] = 0; aa[0] = SkToU8(a0); @@ -83,7 +83,7 @@ public: aa[0] = SkToU8(a1); this->blitAntiH(x, y + 1, aa, runs); } - + /** * Special method just to identify the null blitter, which is returned * from Choose() if the request cannot be fulfilled. Default impl diff --git a/src/core/SkBlitter_A8.cpp b/src/core/SkBlitter_A8.cpp index 51748b00e9..57587c675a 100644 --- a/src/core/SkBlitter_A8.cpp +++ b/src/core/SkBlitter_A8.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkBlitter_PM4f.cpp b/src/core/SkBlitter_PM4f.cpp index b7d8e7f8d3..820d72cc2e 100644 --- a/src/core/SkBlitter_PM4f.cpp +++ b/src/core/SkBlitter_PM4f.cpp @@ -26,17 +26,17 @@ public: void blitH(int x, int y, int width) override { SkASSERT(x >= 0 && y >= 0 && x + width <= fDevice.width()); - + fState.fProc1(fState.fXfer, State::WritableAddr(fDevice, x, y), &fState.fPM4f, width, nullptr); } void blitV(int x, int y, int height, SkAlpha alpha) override { SkASSERT(x >= 0 && y >= 0 && y + height <= fDevice.height()); - + typename State::DstType* device = State::WritableAddr(fDevice, x, y); size_t deviceRB = fDevice.rowBytes(); - + for (int i = 0; i < height; ++i) { fState.fProc1(fState.fXfer, device, &fState.fPM4f, 1, &alpha); device = (typename State::DstType*)((char*)device + deviceRB); @@ -46,10 +46,10 @@ public: void blitRect(int x, int y, int width, int height) override { SkASSERT(x >= 0 && y >= 0 && x + width <= fDevice.width() && y + height <= fDevice.height()); - + typename State::DstType* device = State::WritableAddr(fDevice, x, y); size_t deviceRB = fDevice.rowBytes(); - + do { fState.fProc1(fState.fXfer, device, &fState.fPM4f, width, nullptr); y += 1; @@ -59,7 +59,7 @@ public: void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]) override { typename State::DstType* device = State::WritableAddr(fDevice, x, y); - + for (;;) { int count = *runs; if (count <= 0) { @@ -84,24 +84,24 @@ public: void blitLCDMask(const SkMask& mask, const SkIRect& clip) { auto proc = fState.getLCDProc(SkXfermode::kSrcIsSingle_LCDFlag); - + const int x = clip.fLeft; const int width = clip.width(); const int y = clip.fTop; const int height = clip.height(); - + typename State::DstType* device = State::WritableAddr(fDevice, x, y); const size_t dstRB = fDevice.rowBytes(); const uint16_t* maskRow = (const uint16_t*)mask.getAddr(x, y); const size_t maskRB = mask.fRowBytes; - + for (int i = 0; i < height; ++i) { proc(device, &fState.fPM4f, width, maskRow); device = (typename State::DstType*)((char*)device + dstRB); maskRow = (const uint16_t*)((const char*)maskRow + maskRB); } } - + void blitMask(const SkMask& mask, const SkIRect& clip) override { if (SkMask::kLCD16_Format == mask.fFormat) { this->blitLCDMask(mask, clip); @@ -111,19 +111,19 @@ public: this->INHERITED::blitMask(mask, clip); return; } - + SkASSERT(mask.fBounds.contains(clip)); - + const int x = clip.fLeft; const int width = clip.width(); const int y = clip.fTop; const int height = clip.height(); - + typename State::DstType* device = State::WritableAddr(fDevice, x, y); const size_t dstRB = fDevice.rowBytes(); const uint8_t* maskRow = (const uint8_t*)mask.getAddr(x, y); const size_t maskRB = mask.fRowBytes; - + for (int i = 0; i < height; ++i) { fState.fProc1(fState.fXfer, device, &fState.fPM4f, width, maskRow); device = (typename State::DstType*)((char*)device + dstRB); @@ -144,10 +144,10 @@ public: , fBlitBW(bstate.fBlitBW) , fBlitAA(bstate.fBlitAA) {} - + void blitH(int x, int y, int width) override { SkASSERT(x >= 0 && y >= 0 && x + width <= fDevice.width()); - + if (fBlitBW) { fBlitBW(&fBState, x, y, fDevice, width); return; @@ -170,7 +170,7 @@ public: typename State::DstType* device = State::WritableAddr(fDevice, x, y); size_t deviceRB = fDevice.rowBytes(); - + if (fConstInY) { fShaderContext->shadeSpan4f(x, y, fState.fBuffer, 1); } @@ -186,17 +186,17 @@ public: void blitRect(int x, int y, int width, int height) override { SkASSERT(x >= 0 && y >= 0 && x + width <= fDevice.width() && y + height <= fDevice.height()); - + if (fBlitBW) { for (const int bottom = y + height; y < bottom; ++y) { fBlitBW(&fBState, x, y, fDevice, width); } return; } - + typename State::DstType* device = State::WritableAddr(fDevice, x, y); size_t deviceRB = fDevice.rowBytes(); - + if (fConstInY) { fShaderContext->shadeSpan4f(x, y, fState.fBuffer, width); } @@ -211,7 +211,7 @@ public: void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]) override { typename State::DstType* device = State::WritableAddr(fDevice, x, y); - + for (;;) { int count = *runs; if (count <= 0) { @@ -241,16 +241,16 @@ public: void blitLCDMask(const SkMask& mask, const SkIRect& clip) { auto proc = fState.getLCDProc(0); - + const int x = clip.fLeft; const int width = clip.width(); int y = clip.fTop; - + typename State::DstType* device = State::WritableAddr(fDevice, x, y); const size_t deviceRB = fDevice.rowBytes(); const uint16_t* maskRow = (const uint16_t*)mask.getAddr(x, y); const size_t maskRB = mask.fRowBytes; - + if (fConstInY) { fShaderContext->shadeSpan4f(x, y, fState.fBuffer, width); } @@ -292,7 +292,7 @@ public: typename State::DstType* device = State::WritableAddr(fDevice, x, y); const size_t deviceRB = fDevice.rowBytes(); - + if (fConstInY) { fShaderContext->shadeSpan4f(x, y, fState.fBuffer, width); } @@ -305,7 +305,7 @@ public: maskRow += maskRB; } } - + protected: State fState; SkShader::Context::BlitState fBState; @@ -344,10 +344,10 @@ struct State4f { struct State32 : State4f { typedef uint32_t DstType; - + SkXfermode::D32Proc fProc1; SkXfermode::D32Proc fProcN; - + State32(const SkImageInfo& info, const SkPaint& paint, const SkShader::Context* shaderContext) : State4f(info, paint, shaderContext) { @@ -360,7 +360,7 @@ struct State32 : State4f { fProc1 = SkXfermode::GetD32Proc(fXfer, fFlags | SkXfermode::kSrcIsSingle_D32Flag); fProcN = SkXfermode::GetD32Proc(fXfer, fFlags); } - + SkXfermode::LCD32Proc getLCDProc(uint32_t oneOrManyFlag) const { uint32_t flags = fFlags & 1; if (!(fFlags & SkXfermode::kDstIsSRGB_D32Flag)) { @@ -376,10 +376,10 @@ struct State32 : State4f { struct State64 : State4f { typedef uint64_t DstType; - + SkXfermode::D64Proc fProc1; SkXfermode::D64Proc fProcN; - + State64(const SkImageInfo& info, const SkPaint& paint, const SkShader::Context* shaderContext) : State4f(info, paint, shaderContext) { @@ -400,7 +400,7 @@ struct State64 : State4f { } return SkXfermode::GetLCD64Proc(flags | oneOrManyFlag); } - + static DstType* WritableAddr(const SkPixmap& device, int x, int y) { return device.writable_addr64(x, y); } diff --git a/src/core/SkBuffer.h b/src/core/SkBuffer.h index 92ed7059db..c466fb65ea 100644 --- a/src/core/SkBuffer.h +++ b/src/core/SkBuffer.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkCachedData.cpp b/src/core/SkCachedData.cpp index cfa4c6165f..1ea232b2c5 100644 --- a/src/core/SkCachedData.cpp +++ b/src/core/SkCachedData.cpp @@ -98,7 +98,7 @@ void SkCachedData::inMutexRef(bool fromCache) { if ((1 == fRefCnt) && fInCache) { this->inMutexLock(); } - + fRefCnt += 1; if (fromCache) { SkASSERT(!fInCache); @@ -125,22 +125,22 @@ bool SkCachedData::inMutexUnref(bool fromCache) { default: break; } - + if (fromCache) { SkASSERT(fInCache); fInCache = false; } - + // return true when we need to be deleted return 0 == fRefCnt; } void SkCachedData::inMutexLock() { fMutex.assertHeld(); - + SkASSERT(!fIsLocked); fIsLocked = true; - + switch (fStorageType) { case kMalloc_StorageType: this->setData(fStorage.fMalloc); @@ -159,10 +159,10 @@ void SkCachedData::inMutexLock() { void SkCachedData::inMutexUnlock() { fMutex.assertHeld(); - + SkASSERT(fIsLocked); fIsLocked = false; - + switch (fStorageType) { case kMalloc_StorageType: // nothing to do/check diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 6a11db5ee5..258343a92f 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -2235,7 +2235,7 @@ void SkCanvas::onDrawImage(const SkImage* image, SkScalar x, SkScalar y, const S return; } } - + SkLazyPaint lazy; if (nullptr == paint) { paint = lazy.init(); @@ -2272,7 +2272,7 @@ void SkCanvas::onDrawImage(const SkImage* image, SkScalar x, SkScalar y, const S iter.fDevice->drawImage(iter, image, x, y, pnt); } } - + LOOPER_END } @@ -2292,14 +2292,14 @@ void SkCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, const Sk if (nullptr == paint) { paint = lazy.init(); } - + LOOPER_BEGIN_CHECK_COMPLETE_OVERWRITE(*paint, SkDrawFilter::kBitmap_Type, &dst, image->isOpaque()) - + while (iter.next()) { iter.fDevice->drawImageRect(iter, image, src, dst, looper.paint(), constraint); } - + LOOPER_END } @@ -2397,25 +2397,25 @@ void SkCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const void SkCanvas::onDrawImageNine(const SkImage* image, const SkIRect& center, const SkRect& dst, const SkPaint* paint) { TRACE_EVENT0("disabled-by-default-skia", "SkCanvas::drawImageNine()"); - + if (nullptr == paint || paint->canComputeFastBounds()) { SkRect storage; if (this->quickReject(paint ? paint->computeFastBounds(dst, &storage) : dst)) { return; } } - + SkLazyPaint lazy; if (nullptr == paint) { paint = lazy.init(); } - + LOOPER_BEGIN(*paint, SkDrawFilter::kBitmap_Type, &dst) - + while (iter.next()) { iter.fDevice->drawImageNine(iter, image, center, dst, looper.paint()); } - + LOOPER_END } @@ -2430,18 +2430,18 @@ void SkCanvas::onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, c return; } } - + SkLazyPaint lazy; if (nullptr == paint) { paint = lazy.init(); } - + LOOPER_BEGIN(*paint, SkDrawFilter::kBitmap_Type, &dst) - + while (iter.next()) { iter.fDevice->drawBitmapNine(iter, bitmap, center, dst, looper.paint()); } - + LOOPER_END } @@ -2740,7 +2740,7 @@ void SkCanvas::onDrawAtlas(const SkImage* atlas, const SkRSXform xform[], const if (paint) { pnt = *paint; } - + LOOPER_BEGIN(pnt, SkDrawFilter::kPath_Type, nullptr) while (iter.next()) { iter.fDevice->drawAtlas(iter, atlas, xform, tex, colors, count, mode, pnt); diff --git a/src/core/SkChunkAlloc.cpp b/src/core/SkChunkAlloc.cpp index 3f30276f1b..8c5b8fb6a4 100644 --- a/src/core/SkChunkAlloc.cpp +++ b/src/core/SkChunkAlloc.cpp @@ -23,7 +23,7 @@ struct SkChunkAlloc::Block { char* fFreePtr; // data[] follows - size_t blockSize() { + size_t blockSize() { char* start = this->startOfData(); size_t bytes = fFreePtr - start; return fFreeSize + bytes; @@ -232,4 +232,3 @@ void SkChunkAlloc::validate() { SkASSERT(totCapacity == totUsed + totLost + totAvailable); } #endif - diff --git a/src/core/SkColorFilter.cpp b/src/core/SkColorFilter.cpp index 59a625d0b6..3e0a2ec46f 100644 --- a/src/core/SkColorFilter.cpp +++ b/src/core/SkColorFilter.cpp @@ -78,17 +78,17 @@ public: // Can only claim alphaunchanged and SkPM4f support if both our proxys do. return fOuter->getFlags() & fInner->getFlags(); } - + void filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const override { fInner->filterSpan(shader, count, result); fOuter->filterSpan(result, count, result); } - + void filterSpan4f(const SkPM4f shader[], int count, SkPM4f result[]) const override { fInner->filterSpan4f(shader, count, result); fOuter->filterSpan4f(result, count, result); } - + #ifndef SK_IGNORE_TO_STRING void toString(SkString* str) const override { SkString outerS, innerS; @@ -111,13 +111,13 @@ public: #endif SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeColorFilter) - + protected: void flatten(SkWriteBuffer& buffer) const override { buffer.writeFlattenable(fOuter.get()); buffer.writeFlattenable(fInner.get()); } - + private: SkComposeColorFilter(sk_sp<SkColorFilter> outer, sk_sp<SkColorFilter> inner, int composedFilterCount) @@ -178,4 +178,3 @@ SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkColorFilter) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkComposeColorFilter) SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkModeColorFilter) SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END - diff --git a/src/core/SkColorFilterShader.h b/src/core/SkColorFilterShader.h index 167a272fa4..e42d06c667 100644 --- a/src/core/SkColorFilterShader.h +++ b/src/core/SkColorFilterShader.h @@ -27,9 +27,9 @@ public: // Takes ownership of shaderContext and calls its destructor. FilterShaderContext(const SkColorFilterShader&, SkShader::Context*, const ContextRec&); virtual ~FilterShaderContext(); - + uint32_t getFlags() const override; - + void shadeSpan(int x, int y, SkPMColor[], int count) override; void shadeSpan4f(int x, int y, SkPM4f[], int count) override; @@ -37,25 +37,25 @@ public: // forward to our proxy fShaderContext->set3DMask(mask); } - + private: SkShader::Context* fShaderContext; - + typedef SkShader::Context INHERITED; }; - + SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterShader) - + protected: void flatten(SkWriteBuffer&) const override; size_t onContextSize(const ContextRec&) const override; Context* onCreateContext(const ContextRec&, void* storage) const override; - + private: sk_sp<SkShader> fShader; sk_sp<SkColorFilter> fFilter; - + typedef SkShader INHERITED; }; diff --git a/src/core/SkColorTable.cpp b/src/core/SkColorTable.cpp index d11ef78b1a..d7253e1d8c 100644 --- a/src/core/SkColorTable.cpp +++ b/src/core/SkColorTable.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2009 The Android Open Source Project * @@ -109,4 +108,3 @@ SkColorTable* SkColorTable::Create(SkReadBuffer& buffer) { return new SkColorTable(colors.release(), count, kAllocatedWithMalloc); } - diff --git a/src/core/SkComposeShader.h b/src/core/SkComposeShader.h index ee6e36a222..8ea7c67ae7 100644 --- a/src/core/SkComposeShader.h +++ b/src/core/SkComposeShader.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkConfig8888.cpp b/src/core/SkConfig8888.cpp index e2dd1020de..5bac16a272 100644 --- a/src/core/SkConfig8888.cpp +++ b/src/core/SkConfig8888.cpp @@ -129,7 +129,7 @@ bool SkSrcPixelInfo::convertPixelsTo(SkDstPixelInfo* dst, int width, int height) static void copy_g8_to_32(void* dst, size_t dstRB, const void* src, size_t srcRB, int w, int h) { uint32_t* dst32 = (uint32_t*)dst; const uint8_t* src8 = (const uint8_t*)src; - + for (int y = 0; y < h; ++y) { for (int x = 0; x < w; ++x) { dst32[x] = SkPackARGB32(0xFF, src8[x], src8[x], src8[x]); @@ -173,10 +173,10 @@ bool SkPixelInfo::CopyPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t if (srcInfo.dimensions() != dstInfo.dimensions()) { return false; } - + const int width = srcInfo.width(); const int height = srcInfo.height(); - + // Do the easiest one first : both configs are equal if ((srcInfo == dstInfo) && !ctable) { size_t bytes = width * srcInfo.bytesPerPixel(); @@ -303,4 +303,3 @@ bool SkPixelInfo::CopyPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t return true; } } - diff --git a/src/core/SkCoreBlitters.h b/src/core/SkCoreBlitters.h index 06e106dd8e..ec9ee203ef 100644 --- a/src/core/SkCoreBlitters.h +++ b/src/core/SkCoreBlitters.h @@ -171,17 +171,17 @@ public: void blitRect(int x, int y, int width, int height) override; void blitAntiH(int x, int y, const SkAlpha[], const int16_t[]) override; void blitMask(const SkMask&, const SkIRect&) override; - + private: SkXfermode* fXfermode; SkPMColor* fBuffer; SkBlitRow::Proc32 fProc32; SkBlitRow::Proc32 fProc32Blend; bool fShadeDirectlyIntoDevice; - + // illegal SkARGB32_Shader_Blitter& operator=(const SkARGB32_Shader_Blitter&); - + typedef SkShaderBlitter INHERITED; }; diff --git a/src/core/SkCubicClipper.cpp b/src/core/SkCubicClipper.cpp index 469fc222e3..b5b7dceabe 100644 --- a/src/core/SkCubicClipper.cpp +++ b/src/core/SkCubicClipper.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2009 The Android Open Source Project * diff --git a/src/core/SkCubicClipper.h b/src/core/SkCubicClipper.h index d7dc381233..617086edb9 100644 --- a/src/core/SkCubicClipper.h +++ b/src/core/SkCubicClipper.h @@ -1,4 +1,3 @@ - /* * Copyright 2009 The Android Open Source Project * diff --git a/src/core/SkData.cpp b/src/core/SkData.cpp index 4b2194973b..995a30a542 100644 --- a/src/core/SkData.cpp +++ b/src/core/SkData.cpp @@ -192,4 +192,3 @@ sk_sp<SkData> SkData::MakeFromStream(SkStream* stream, size_t size) { } return data; } - diff --git a/src/core/SkDeque.cpp b/src/core/SkDeque.cpp index 2e469d1faf..f9ab4af531 100644 --- a/src/core/SkDeque.cpp +++ b/src/core/SkDeque.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkDescriptor.h b/src/core/SkDescriptor.h index 1f6f4a8657..0f13acde97 100644 --- a/src/core/SkDescriptor.h +++ b/src/core/SkDescriptor.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp index 0ff094d73b..3a4090e2d3 100644 --- a/src/core/SkDevice.cpp +++ b/src/core/SkDevice.cpp @@ -88,11 +88,11 @@ void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer, void SkBaseDevice::drawPatch(const SkDraw& draw, const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint) { SkPatchUtils::VertexData data; - + SkISize lod = SkPatchUtils::GetLevelOfDetail(cubics, draw.fMatrix); // It automatically adjusts lodX and lodY in case it exceeds the number of indices. - // If it fails to generate the vertices, then we do not draw. + // If it fails to generate the vertices, then we do not draw. if (SkPatchUtils::getVertexData(&data, cubics, colors, texCoords, lod.width(), lod.height())) { this->drawVertices(draw, SkCanvas::kTriangles_VertexMode, data.fVertexCount, data.fPoints, data.fTexCoords, data.fColors, xmode, data.fIndices, data.fIndexCount, @@ -176,7 +176,7 @@ void SkBaseDevice::drawImageNine(const SkDraw& draw, const SkImage* image, const void SkBaseDevice::drawBitmapNine(const SkDraw& draw, const SkBitmap& bitmap, const SkIRect& center, const SkRect& dst, const SkPaint& paint) { SkNinePatchIter iter(bitmap.width(), bitmap.height(), center, dst); - + SkRect srcR, dstR; while (iter.next(&srcR, &dstR)) { this->drawBitmapRect(draw, bitmap, &srcR, dstR, paint, SkCanvas::kStrict_SrcRectConstraint); @@ -192,7 +192,7 @@ void SkBaseDevice::drawAtlas(const SkDraw& draw, const SkImage* atlas, const SkR for (int i = 0; i < count; ++i) { SkPoint quad[4]; xform[i].toQuad(tex[i].width(), tex[i].height(), quad); - + SkMatrix localM; localM.setRSXform(xform[i]); localM.preTranslate(-tex[i].left(), -tex[i].top()); @@ -209,7 +209,7 @@ void SkBaseDevice::drawAtlas(const SkDraw& draw, const SkImage* atlas, const SkR if (colors) { pnt.setColorFilter(SkColorFilter::MakeModeFilter(colors[i], mode)); } - + path.rewind(); path.addPoly(quad, 4, true); path.setConvexity(SkPath::kConvex_Convexity); @@ -283,24 +283,24 @@ bool SkBaseDevice::peekPixels(SkPixmap* pmap) { static void morphpoints(SkPoint dst[], const SkPoint src[], int count, SkPathMeasure& meas, const SkMatrix& matrix) { SkMatrix::MapXYProc proc = matrix.getMapXYProc(); - + for (int i = 0; i < count; i++) { SkPoint pos; SkVector tangent; - + proc(matrix, src[i].fX, src[i].fY, &pos); SkScalar sx = pos.fX; SkScalar sy = pos.fY; - + if (!meas.getPosTan(sx, &pos, &tangent)) { // set to 0 if the measure failed, so that we just set dst == pos tangent.set(0, 0); } - + /* This is the old way (that explains our approach but is way too slow SkMatrix matrix; SkPoint pt; - + pt.set(sx, sy); matrix.setSinCos(tangent.fY, tangent.fX); matrix.preTranslate(-sx, 0); @@ -313,7 +313,7 @@ static void morphpoints(SkPoint dst[], const SkPoint src[], int count, } /* TODO - + Need differentially more subdivisions when the follow-path is curvy. Not sure how to determine that, but we need it. I guess a cheap answer is let the caller tell us, but that seems like a cop-out. Another answer is to get Rob Johnson to figure it out. @@ -323,7 +323,7 @@ static void morphpath(SkPath* dst, const SkPath& src, SkPathMeasure& meas, SkPath::Iter iter(src, false); SkPoint srcP[4], dstP[3]; SkPath::Verb verb; - + while ((verb = iter.next(srcP)) != SkPath::kDone_Verb) { switch (verb) { case SkPath::kMove_Verb: @@ -359,16 +359,16 @@ void SkBaseDevice::drawTextOnPath(const SkDraw& draw, const void* text, size_t b const SkPath& follow, const SkMatrix* matrix, const SkPaint& paint) { SkASSERT(byteLength == 0 || text != nullptr); - + // nothing to draw if (text == nullptr || byteLength == 0 || draw.fRC->isEmpty()) { return; } - + SkTextToPathIter iter((const char*)text, byteLength, paint, true); SkPathMeasure meas(follow, false); SkScalar hOffset = 0; - + // need to measure first if (paint.getTextAlign() != SkPaint::kLeft_Align) { SkScalar pathLen = meas.getLength(); @@ -377,19 +377,19 @@ void SkBaseDevice::drawTextOnPath(const SkDraw& draw, const void* text, size_t b } hOffset += pathLen; } - + const SkPath* iterPath; SkScalar xpos; SkMatrix scaledMatrix; SkScalar scale = iter.getPathScale(); - + scaledMatrix.setScale(scale, scale); - + while (iter.next(&iterPath, &xpos)) { if (iterPath) { SkPath tmp; SkMatrix m(scaledMatrix); - + tmp.setIsVolatile(true); m.postTranslate(xpos + hOffset, 0); if (matrix) { diff --git a/src/core/SkDeviceProfile.h b/src/core/SkDeviceProfile.h index 2872b13458..ed533f8329 100644 --- a/src/core/SkDeviceProfile.h +++ b/src/core/SkDeviceProfile.h @@ -12,7 +12,7 @@ class SkDeviceProfile : public SkRefCnt { public: - + enum LCDConfig { kNone_LCDConfig, // disables LCD text rendering, uses A8 instead diff --git a/src/core/SkDither.cpp b/src/core/SkDither.cpp index 546d4799c8..d966e0e910 100644 --- a/src/core/SkDither.cpp +++ b/src/core/SkDither.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkDither.h b/src/core/SkDither.h index d82b4167b5..463b50403d 100644 --- a/src/core/SkDither.h +++ b/src/core/SkDither.h @@ -1,4 +1,3 @@ - /* * Copyright 2008 The Android Open Source Project * diff --git a/src/core/SkEdge.cpp b/src/core/SkEdge.cpp index 94b7870b03..49df95b568 100644 --- a/src/core/SkEdge.cpp +++ b/src/core/SkEdge.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkEdge.h b/src/core/SkEdge.h index c3adbf85cb..11669b4f7f 100644 --- a/src/core/SkEdge.h +++ b/src/core/SkEdge.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkEdgeBuilder.cpp b/src/core/SkEdgeBuilder.cpp index 8ff68ee4fd..af68e0ff65 100644 --- a/src/core/SkEdgeBuilder.cpp +++ b/src/core/SkEdgeBuilder.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkEdgeBuilder.h b/src/core/SkEdgeBuilder.h index 047460d4fe..59f62870e7 100644 --- a/src/core/SkEdgeBuilder.h +++ b/src/core/SkEdgeBuilder.h @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkEdgeClipper.cpp b/src/core/SkEdgeClipper.cpp index 55f9192aea..85c519d364 100644 --- a/src/core/SkEdgeClipper.cpp +++ b/src/core/SkEdgeClipper.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2009 The Android Open Source Project * diff --git a/src/core/SkEdgeClipper.h b/src/core/SkEdgeClipper.h index 16887b4a32..e460c1cd87 100644 --- a/src/core/SkEdgeClipper.h +++ b/src/core/SkEdgeClipper.h @@ -1,4 +1,3 @@ - /* * Copyright 2009 The Android Open Source Project * diff --git a/src/core/SkError.cpp b/src/core/SkError.cpp index 9e4385b489..d85b5ff0cc 100644 --- a/src/core/SkError.cpp +++ b/src/core/SkError.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2013 Google Inc. * diff --git a/src/core/SkErrorInternals.h b/src/core/SkErrorInternals.h index 65ff231821..d573576099 100644 --- a/src/core/SkErrorInternals.h +++ b/src/core/SkErrorInternals.h @@ -1,4 +1,3 @@ - /* * Copyright 2013 Google Inc. * diff --git a/src/core/SkFDot6.h b/src/core/SkFDot6.h index 91f3dda020..82138acf11 100644 --- a/src/core/SkFDot6.h +++ b/src/core/SkFDot6.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkFilterProc.cpp b/src/core/SkFilterProc.cpp index 290384903e..5049727bde 100644 --- a/src/core/SkFilterProc.cpp +++ b/src/core/SkFilterProc.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkFilterProc.h b/src/core/SkFilterProc.h index 3b20d592d2..7348967fd0 100644 --- a/src/core/SkFilterProc.h +++ b/src/core/SkFilterProc.h @@ -1,4 +1,3 @@ - /* * Copyright 2008 The Android Open Source Project * diff --git a/src/core/SkGlyphCache.cpp b/src/core/SkGlyphCache.cpp index 93d48a3d15..241854eb5a 100644 --- a/src/core/SkGlyphCache.cpp +++ b/src/core/SkGlyphCache.cpp @@ -53,7 +53,7 @@ SkGlyphCache::SkGlyphCache(SkTypeface* typeface, const SkDescriptor* desc, SkSca } SkGlyphCache::~SkGlyphCache() { - fGlyphMap.foreach ([](SkGlyph* g) { + fGlyphMap.foreach ([](SkGlyph* g) { if (g->fPathData) { delete g->fPathData->fPath; } } ); @@ -267,7 +267,7 @@ void SkGlyphCache::AddInterval(SkScalar val, SkGlyph::Intercept* intercept) { intercept->fInterval[1] = SkTMax(intercept->fInterval[1], val); } -void SkGlyphCache::AddPoints(const SkPoint* pts, int ptCount, const SkScalar bounds[2], +void SkGlyphCache::AddPoints(const SkPoint* pts, int ptCount, const SkScalar bounds[2], bool yAxis, SkGlyph::Intercept* intercept) { for (int i = 0; i < ptCount; ++i) { SkScalar val = *(&pts[i].fY - yAxis); diff --git a/src/core/SkGlyphCache.h b/src/core/SkGlyphCache.h index 8d6bae6992..2b5262ba5e 100644 --- a/src/core/SkGlyphCache.h +++ b/src/core/SkGlyphCache.h @@ -242,7 +242,7 @@ private: static void OffsetResults(const SkGlyph::Intercept* intercept, SkScalar scale, SkScalar xPos, SkScalar* array, int* count); static void AddInterval(SkScalar val, SkGlyph::Intercept* intercept); - static void AddPoints(const SkPoint* pts, int ptCount, const SkScalar bounds[2], + static void AddPoints(const SkPoint* pts, int ptCount, const SkScalar bounds[2], bool yAxis, SkGlyph::Intercept* intercept); static void AddLine(const SkPoint pts[2], SkScalar axis, bool yAxis, SkGlyph::Intercept* intercept); diff --git a/src/core/SkGraphics.cpp b/src/core/SkGraphics.cpp index 2b1212c0dc..0273139ad7 100644 --- a/src/core/SkGraphics.cpp +++ b/src/core/SkGraphics.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkHalf.cpp b/src/core/SkHalf.cpp index 0db979bc76..262362e076 100644 --- a/src/core/SkHalf.cpp +++ b/src/core/SkHalf.cpp @@ -34,18 +34,18 @@ SkHalf SkFloatToHalf(float f) { static const uint32_t sign_mask = 0x80000000u; static const uint32_t round_mask = ~0xfffu; SkHalf o = 0; - + FloatUIntUnion floatUnion; floatUnion.fFloat = f; - + uint32_t sign = floatUnion.fUInt & sign_mask; floatUnion.fUInt ^= sign; - + // NOTE all the integer compares in this function can be safely // compiled into signed compares since all operands are below // 0x80000000. Important if you want fast straight SSE2 code // (since there's no unsigned PCMPGTD). - + // Inf or NaN (all exponent bits set) if (floatUnion.fUInt >= f32infty) // NaN->qNaN and Inf->Inf @@ -59,10 +59,10 @@ SkHalf SkFloatToHalf(float f) { if (floatUnion.fUInt > f16infty) { floatUnion.fUInt = f16infty; } - + o = floatUnion.fUInt >> 13; // Take the bits! } - + o |= sign >> 16; return o; } @@ -72,7 +72,7 @@ SkHalf SkFloatToHalf(float f) { float SkHalfToFloat(SkHalf h) { static const FloatUIntUnion magic = { 126 << 23 }; FloatUIntUnion o; - + if (halfExponent(h) == 0) { // Zero / Denormal @@ -90,7 +90,7 @@ float SkHalfToFloat(SkHalf h) { else o.fUInt |= ((127 - 15 + halfExponent(h)) << 23); } - + // Set sign o.fUInt |= (halfSign(h) << 31); return o.fFloat; diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp index 62509c52be..06076c6891 100644 --- a/src/core/SkImageFilter.cpp +++ b/src/core/SkImageFilter.cpp @@ -804,4 +804,3 @@ bool SkImageFilter::DeviceProxy::filterImage(const SkImageFilter* filter, const SkBitmap* result, SkIPoint* offset) { return fDevice->filterImage(filter, src, ctx, result, offset); } - diff --git a/src/core/SkImageFilterCacheKey.h b/src/core/SkImageFilterCacheKey.h index 76280dbf1a..3f5d1c8fa2 100644 --- a/src/core/SkImageFilterCacheKey.h +++ b/src/core/SkImageFilterCacheKey.h @@ -39,4 +39,3 @@ struct SkImageFilter::Cache::Key { }; #endif - diff --git a/src/core/SkImageInfo.cpp b/src/core/SkImageInfo.cpp index 6e251a91dc..16f0a0109c 100644 --- a/src/core/SkImageInfo.cpp +++ b/src/core/SkImageInfo.cpp @@ -121,4 +121,3 @@ bool SkReadPixelsRec::trim(int srcWidth, int srcHeight) { return true; } - diff --git a/src/core/SkLight.h b/src/core/SkLight.h index 4a6e149c76..d9eb78d112 100644 --- a/src/core/SkLight.h +++ b/src/core/SkLight.h @@ -1,4 +1,3 @@ - /* * Copyright 2015 Google Inc. * @@ -40,9 +39,9 @@ public: LightType type() const { return fType; } const SkColor3f& color() const { return fColor; } - const SkVector3& dir() const { + const SkVector3& dir() const { SkASSERT(kAmbient_LightType != fType); - return fDirection; + return fDirection; } private: diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp index d8e88c9a0a..fdd0a04aee 100644 --- a/src/core/SkLightingShader.cpp +++ b/src/core/SkLightingShader.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2015 Google Inc. * @@ -53,7 +52,7 @@ public: SkLightingShaderImpl(const SkBitmap& diffuse, const SkBitmap& normal, const SkLightingShader::Lights* lights, const SkVector& invNormRotation, - const SkMatrix* diffLocalM, const SkMatrix* normLocalM) + const SkMatrix* diffLocalM, const SkMatrix* normLocalM) : INHERITED(diffLocalM) , fDiffuseMap(diffuse) , fNormalMap(normal) @@ -204,14 +203,14 @@ public: "Xform", &xformUniName); fragBuilder->codeAppend("vec4 diffuseColor = "); - fragBuilder->appendTextureLookupAndModulate(args.fInputColor, args.fSamplers[0], - args.fCoords[0].c_str(), + fragBuilder->appendTextureLookupAndModulate(args.fInputColor, args.fSamplers[0], + args.fCoords[0].c_str(), args.fCoords[0].getType()); fragBuilder->codeAppend(";"); fragBuilder->codeAppend("vec4 normalColor = "); fragBuilder->appendTextureLookup(args.fSamplers[1], - args.fCoords[1].c_str(), + args.fCoords[1].c_str(), args.fCoords[1].getType()); fragBuilder->codeAppend(";"); @@ -220,7 +219,7 @@ public: fragBuilder->codeAppendf( "mat3 m = mat3(%s.x, -%s.y, 0.0, %s.y, %s.x, 0.0, 0.0, 0.0, 1.0);", xformUniName, xformUniName, xformUniName, xformUniName); - + // TODO: inverse map the light direction vectors in the vertex shader rather than // transforming all the normals here! fragBuilder->codeAppend("normal = normalize(m*normal);"); @@ -302,7 +301,7 @@ public: private: GrGLSLFragmentProcessor* onCreateGLSLInstance() const override { return new LightingGLFP; } - bool onIsEqual(const GrFragmentProcessor& proc) const override { + bool onIsEqual(const GrFragmentProcessor& proc) const override { const LightingFP& lightingFP = proc.cast<LightingFP>(); return fDiffDeviceTransform == lightingFP.fDiffDeviceTransform && fNormDeviceTransform == lightingFP.fNormDeviceTransform && @@ -331,7 +330,7 @@ static bool make_mat(const SkBitmap& bm, const SkMatrix& localMatrix1, const SkMatrix* localMatrix2, SkMatrix* result) { - + result->setIDiv(bm.width(), bm.height()); SkMatrix lmInverse; @@ -360,7 +359,7 @@ const GrFragmentProcessor* SkLightingShaderImpl::asFragmentProcessor( SkASSERT(fDiffuseMap.width() == fNormalMap.width() && fDiffuseMap.height() == fNormalMap.height()); SkMatrix diffM, normM; - + if (!make_mat(fDiffuseMap, this->getLocalMatrix(), localMatrix, &diffM)) { return nullptr; } @@ -371,17 +370,17 @@ const GrFragmentProcessor* SkLightingShaderImpl::asFragmentProcessor( bool doBicubic; GrTextureParams::FilterMode diffFilterMode = GrSkFilterQualityToGrFilterMode( - SkTMin(filterQuality, kMedium_SkFilterQuality), + SkTMin(filterQuality, kMedium_SkFilterQuality), viewM, this->getLocalMatrix(), - &doBicubic); + &doBicubic); SkASSERT(!doBicubic); GrTextureParams::FilterMode normFilterMode = GrSkFilterQualityToGrFilterMode( - SkTMin(filterQuality, kMedium_SkFilterQuality), + SkTMin(filterQuality, kMedium_SkFilterQuality), viewM, fNormLocalMatrix, - &doBicubic); + &doBicubic); SkASSERT(!doBicubic); // TODO: support other tile modes @@ -447,19 +446,19 @@ static inline SkPMColor convert(SkColor3f color, U8CPU a) { color.fX = 0.0f; } else if (color.fX >= 255.0f) { color.fX = 255.0f; - } + } if (color.fY <= 0.0f) { color.fY = 0.0f; } else if (color.fY >= 255.0f) { color.fY = 255.0f; - } + } if (color.fZ <= 0.0f) { color.fZ = 0.0f; } else if (color.fZ >= 255.0f) { color.fZ = 255.0f; - } + } return SkPreMultiplyARGB(a, (int) color.fX, (int) color.fY, (int) color.fZ); } @@ -511,7 +510,7 @@ void SkLightingShaderImpl::LightingShaderContext::shadeSpan(int x, int y, xformedNorm.fX = lightShader.fInvNormRotation.fX * norm.fX + lightShader.fInvNormRotation.fY * norm.fY; - xformedNorm.fY = lightShader.fInvNormRotation.fX * norm.fX - + xformedNorm.fY = lightShader.fInvNormRotation.fX * norm.fX - lightShader.fInvNormRotation.fY * norm.fY; xformedNorm.fZ = norm.fZ; @@ -601,7 +600,7 @@ SkFlattenable* SkLightingShaderImpl::CreateProc(SkReadBuffer& buf) { if (!buf.readScalarArray(&dir.fX, 3)) { return nullptr; } - builder.add(SkLight(color, dir)); + builder.add(SkLight(color, dir)); } } diff --git a/src/core/SkLightingShader.h b/src/core/SkLightingShader.h index 30ce6559c5..ffbcbe9eb4 100644 --- a/src/core/SkLightingShader.h +++ b/src/core/SkLightingShader.h @@ -69,7 +69,7 @@ public: @param normal the normal map @param light the light applied to the normal map @param ambient the linear (unpremul) ambient light color. Range is 0..1/channel. - @param localMatrix the matrix mapping the textures to the dest rect + @param localMatrix the matrix mapping the textures to the dest rect nullptr will be returned if: either 'diffuse' or 'normal' are empty diff --git a/src/core/SkLineClipper.h b/src/core/SkLineClipper.h index 11e0a73ca2..d2c9b5fe76 100644 --- a/src/core/SkLineClipper.h +++ b/src/core/SkLineClipper.h @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkLinearBitmapPipeline.cpp b/src/core/SkLinearBitmapPipeline.cpp index 9c4c42cf40..37f9eb4046 100644 --- a/src/core/SkLinearBitmapPipeline.cpp +++ b/src/core/SkLinearBitmapPipeline.cpp @@ -589,4 +589,3 @@ void SkLinearBitmapPipeline::shadeSpan4f(int x, int y, SkPM4f* dst, int count) { // first pixel to the center of the last pixel. This implies that length is count-1. fFirstStage->pointSpan(Span{{x + 0.5f, y + 0.5f}, count - 1.0f, count}); } - diff --git a/src/core/SkMaskFilter.cpp b/src/core/SkMaskFilter.cpp index 51c489721d..cacc052414 100644 --- a/src/core/SkMaskFilter.cpp +++ b/src/core/SkMaskFilter.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkMaskGamma.h b/src/core/SkMaskGamma.h index 16ea47b1b0..94219d42ac 100644 --- a/src/core/SkMaskGamma.h +++ b/src/core/SkMaskGamma.h @@ -92,7 +92,7 @@ void SkTMaskGamma_build_correcting_lut(uint8_t table[256], U8CPU srcI, SkScalar * @param B The number of luminance bits to use [1, 8] from the blue channel. */ template <int R_LUM_BITS, int G_LUM_BITS, int B_LUM_BITS> class SkTMaskGamma : public SkRefCnt { - + public: /** Creates a linear SkTMaskGamma. */ @@ -151,7 +151,7 @@ public: const uint8_t* getGammaTables() const { return (const uint8_t*) fGammaTables; } - + private: static const int MAX_LUM_BITS = B_LUM_BITS > (R_LUM_BITS > G_LUM_BITS ? R_LUM_BITS : G_LUM_BITS) diff --git a/src/core/SkMetaData.cpp b/src/core/SkMetaData.cpp index dd6ed05571..6e1f5e2a3d 100644 --- a/src/core/SkMetaData.cpp +++ b/src/core/SkMetaData.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkModeColorFilter.cpp b/src/core/SkModeColorFilter.cpp index 3da51609a3..84c6491f3a 100644 --- a/src/core/SkModeColorFilter.cpp +++ b/src/core/SkModeColorFilter.cpp @@ -52,7 +52,7 @@ uint32_t SkModeColorFilter::getFlags() const { void SkModeColorFilter::filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const { SkPMColor color = fPMColor; SkXfermodeProc proc = fProc; - + for (int i = 0; i < count; i++) { result[i] = proc(color, shader[i]); } @@ -61,7 +61,7 @@ void SkModeColorFilter::filterSpan(const SkPMColor shader[], int count, SkPMColo void SkModeColorFilter::filterSpan4f(const SkPM4f shader[], int count, SkPM4f result[]) const { SkPM4f color = SkPM4f::FromPMColor(fPMColor); SkXfermodeProc4f proc = SkXfermode::GetProc4f(fMode); - + for (int i = 0; i < count; i++) { result[i] = proc(color, shader[i]); } diff --git a/src/core/SkMultiPictureDraw.cpp b/src/core/SkMultiPictureDraw.cpp index 5745664858..09efba9377 100644 --- a/src/core/SkMultiPictureDraw.cpp +++ b/src/core/SkMultiPictureDraw.cpp @@ -204,4 +204,3 @@ void SkMultiPictureDraw::draw(bool flush) { GrLayerHoister::End(context); #endif } - diff --git a/src/core/SkNinePatchIter.cpp b/src/core/SkNinePatchIter.cpp index 5d24d75e7a..1a780a0c0d 100644 --- a/src/core/SkNinePatchIter.cpp +++ b/src/core/SkNinePatchIter.cpp @@ -19,22 +19,22 @@ SkNinePatchIter::SkNinePatchIter(int w, int h, const SkIRect& c, const SkRect& d fSrcX[1] = SkIntToScalar(c.fLeft); fSrcX[2] = SkIntToScalar(c.fRight); fSrcX[3] = SkIntToScalar(w); - + fSrcY[0] = 0; fSrcY[1] = SkIntToScalar(c.fTop); fSrcY[2] = SkIntToScalar(c.fBottom); fSrcY[3] = SkIntToScalar(h); - + fDstX[0] = dst.fLeft; fDstX[1] = dst.fLeft + SkIntToScalar(c.fLeft); fDstX[2] = dst.fRight - SkIntToScalar(w - c.fRight); fDstX[3] = dst.fRight; - + fDstY[0] = dst.fTop; fDstY[1] = dst.fTop + SkIntToScalar(c.fTop); fDstY[2] = dst.fBottom - SkIntToScalar(h - c.fBottom); fDstY[3] = dst.fBottom; - + if (fDstX[1] > fDstX[2]) { fDstX[1] = fDstX[0] + (fDstX[3] - fDstX[0]) * c.fLeft / (w - c.width()); fDstX[2] = fDstX[1]; diff --git a/src/core/SkNinePatchIter.h b/src/core/SkNinePatchIter.h index 2d7e9a8b19..df06c1f630 100644 --- a/src/core/SkNinePatchIter.h +++ b/src/core/SkNinePatchIter.h @@ -26,17 +26,16 @@ public: * While it returns true, use src/dst to draw the image/bitmap */ bool next(SkRect* src, SkRect* dst); - + private: SkScalar fSrcX[4]; SkScalar fSrcY[4]; SkScalar fDstX[4]; SkScalar fDstY[4]; - + int fCurrX; int fCurrY; bool fDone; }; #endif - diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp index 6a54b9a6c3..8d62a6aaf4 100644 --- a/src/core/SkPaint.cpp +++ b/src/core/SkPaint.cpp @@ -1115,7 +1115,7 @@ void SkPaint::getTextPath(const void* textData, size_t length, } int SkPaint::getTextIntercepts(const void* textData, size_t length, - SkScalar x, SkScalar y, const SkScalar bounds[2], + SkScalar x, SkScalar y, const SkScalar bounds[2], SkScalar* array) const { SkASSERT(length == 0 || textData != nullptr); if (!length) { diff --git a/src/core/SkPaintPriv.h b/src/core/SkPaintPriv.h index a03f9b3390..1cf404075b 100644 --- a/src/core/SkPaintPriv.h +++ b/src/core/SkPaintPriv.h @@ -21,7 +21,7 @@ public: kOpaque_ShaderOverrideOpacity, //!< the overriding shader is opaque kNotOpaque_ShaderOverrideOpacity, //!< the overriding shader may not be opaque }; - + /** * Returns true if drawing with this paint (or nullptr) will ovewrite all affected pixels. * diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 320448a30e..87ecd4ee1d 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -3177,7 +3177,7 @@ bool SkPath::contains(SkScalar x, SkScalar y) const { if ((onCurveCount & 1) || evenOddFill) { return SkToBool(onCurveCount & 1) ^ isInverse; } - // If the point touches an even number of curves, and the fill is winding, check for + // If the point touches an even number of curves, and the fill is winding, check for // coincidence. Count coincidence as places where the on curve points have identical tangents. iter.setPath(*this, true); done = false; diff --git a/src/core/SkPathMeasure.cpp b/src/core/SkPathMeasure.cpp index c0d97924cb..5ca5ebd143 100644 --- a/src/core/SkPathMeasure.cpp +++ b/src/core/SkPathMeasure.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2008 The Android Open Source Project * @@ -527,12 +526,12 @@ int SkTKSearch(const T base[], int count, const K& key) { if (count <= 0) { return ~0; } - + SkASSERT(base != nullptr); // base may be nullptr if count is zero - + int lo = 0; int hi = count - 1; - + while (lo < hi) { int mid = (hi + lo) >> 1; if (base[mid].fDistance < key) { @@ -541,7 +540,7 @@ int SkTKSearch(const T base[], int count, const K& key) { hi = mid; } } - + if (base[hi].fDistance < key) { hi += 1; hi = ~hi; diff --git a/src/core/SkPathPriv.h b/src/core/SkPathPriv.h index 048c926ce2..f0bab95030 100644 --- a/src/core/SkPathPriv.h +++ b/src/core/SkPathPriv.h @@ -29,7 +29,7 @@ public: */ static FirstDirection OppositeFirstDirection(FirstDirection dir) { static const FirstDirection gOppositeDir[] = { - kCCW_FirstDirection, kCW_FirstDirection, kUnknown_FirstDirection, + kCCW_FirstDirection, kCW_FirstDirection, kUnknown_FirstDirection, }; return gOppositeDir[dir]; } diff --git a/src/core/SkPerspIter.h b/src/core/SkPerspIter.h index 821f153462..3a00971dbc 100644 --- a/src/core/SkPerspIter.h +++ b/src/core/SkPerspIter.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp index 79b2255f1f..92aa2410ad 100644 --- a/src/core/SkPictureData.cpp +++ b/src/core/SkPictureData.cpp @@ -630,5 +630,3 @@ bool SkPictureData::suitableForLayerOptimization() const { } #endif /////////////////////////////////////////////////////////////////////////////// - - diff --git a/src/core/SkPictureFlat.cpp b/src/core/SkPictureFlat.cpp index 02d8592830..71f39ea0f9 100644 --- a/src/core/SkPictureFlat.cpp +++ b/src/core/SkPictureFlat.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h index 00b7c2bb41..73103c69f0 100644 --- a/src/core/SkPictureFlat.h +++ b/src/core/SkPictureFlat.h @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp index ae3c3f20af..f21ac32b96 100644 --- a/src/core/SkPicturePlayback.cpp +++ b/src/core/SkPicturePlayback.cpp @@ -24,7 +24,7 @@ enum LegacySaveFlags { SkCanvas::SaveLayerFlags SkCanvas::LegacySaveFlagsToSaveLayerFlags(uint32_t flags) { uint32_t layerFlags = 0; - + if (0 == (flags & kClipToLayer_LegacySaveFlags)) { layerFlags |= SkCanvas::kDontClipToLayer_PrivateSaveLayerFlag; } @@ -532,4 +532,3 @@ void SkPicturePlayback::handleOp(SkReader32* reader, SkASSERTF(false, "Unknown draw type: %d", op); } } - diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp index 459402b115..fc502aa6fc 100644 --- a/src/core/SkPictureRecord.cpp +++ b/src/core/SkPictureRecord.cpp @@ -975,4 +975,3 @@ void SkPictureRecord::addTextBlob(const SkTextBlob *blob) { } /////////////////////////////////////////////////////////////////////////////// - diff --git a/src/core/SkPictureShader.h b/src/core/SkPictureShader.h index 8f167b815e..95289680b0 100644 --- a/src/core/SkPictureShader.h +++ b/src/core/SkPictureShader.h @@ -1,4 +1,3 @@ - /* * Copyright 2014 Google Inc. * diff --git a/src/core/SkPixmap.cpp b/src/core/SkPixmap.cpp index e73440ed2a..a5e474b6d4 100644 --- a/src/core/SkPixmap.cpp +++ b/src/core/SkPixmap.cpp @@ -58,7 +58,7 @@ bool SkPixmap::extractSubset(SkPixmap* result, const SkIRect& subset) const { if (!r.intersect(srcRect, subset)) { return false; // r is empty (i.e. no intersection) } - + // If the upper left of the rectangle was outside the bounds of this SkBitmap, we should have // exited above. SkASSERT(static_cast<unsigned>(r.fLeft) < static_cast<unsigned>(this->width())); @@ -84,15 +84,15 @@ bool SkPixmap::readPixels(const SkImageInfo& requestedDstInfo, void* dstPixels, if (0 == requestedDstInfo.width() || 0 == requestedDstInfo.height()) { return false; } - + SkIRect srcR = SkIRect::MakeXYWH(x, y, requestedDstInfo.width(), requestedDstInfo.height()); if (!srcR.intersect(0, 0, this->width(), this->height())) { return false; } - + // the intersect may have shrunk info's logical size const SkImageInfo dstInfo = requestedDstInfo.makeWH(srcR.width(), srcR.height()); - + // if x or y are negative, then we have to adjust pixels if (x > 0) { x = 0; @@ -134,7 +134,7 @@ bool SkPixmap::erase(SkColor color, const SkIRect& inArea) const { int height = area.height(); const int width = area.width(); const int rowBytes = this->rowBytes(); - + switch (this->colorType()) { case kGray_8_SkColorType: { if (255 != a) { @@ -162,14 +162,14 @@ bool SkPixmap::erase(SkColor color, const SkIRect& inArea) const { case kRGB_565_SkColorType: { uint16_t* p = this->writable_addr16(area.fLeft, area.fTop); uint16_t v; - + // make rgb premultiplied if (255 != a) { r = SkMulDiv255Round(r, a); g = SkMulDiv255Round(g, a); b = SkMulDiv255Round(b, a); } - + if (kARGB_4444_SkColorType == this->colorType()) { v = pack_8888_to_4444(a, r, g, b); } else { @@ -186,7 +186,7 @@ bool SkPixmap::erase(SkColor color, const SkIRect& inArea) const { case kBGRA_8888_SkColorType: case kRGBA_8888_SkColorType: { uint32_t* p = this->writable_addr32(area.fLeft, area.fTop); - + if (255 != a && kPremul_SkAlphaType == this->alphaType()) { r = SkMulDiv255Round(r, a); g = SkMulDiv255Round(g, a); @@ -273,4 +273,3 @@ bool SkPixmap::scalePixels(const SkPixmap& dst, SkFilterQuality quality) const { } ////////////////////////////////////////////////////////////////////////////////////////////////// - diff --git a/src/core/SkPoint.cpp b/src/core/SkPoint.cpp index 345ef37448..490e4a2d2d 100644 --- a/src/core/SkPoint.cpp +++ b/src/core/SkPoint.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2008 The Android Open Source Project * diff --git a/src/core/SkPtrRecorder.cpp b/src/core/SkPtrRecorder.cpp index be169d7b0d..dd73a7c29d 100644 --- a/src/core/SkPtrRecorder.cpp +++ b/src/core/SkPtrRecorder.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkPtrRecorder.h b/src/core/SkPtrRecorder.h index 2d755e69e5..402278e9bb 100644 --- a/src/core/SkPtrRecorder.h +++ b/src/core/SkPtrRecorder.h @@ -1,4 +1,3 @@ - /* * Copyright 2008 The Android Open Source Project * @@ -22,7 +21,7 @@ */ class SkPtrSet : public SkRefCnt { public: - + /** * Search for the specified ptr in the set. If it is found, return its @@ -144,7 +143,7 @@ class SkFactorySet : public SkTPtrSet<SkFlattenable::Factory> {}; */ class SkNamedFactorySet : public SkRefCnt { public: - + SkNamedFactorySet(); diff --git a/src/core/SkQuadClipper.h b/src/core/SkQuadClipper.h index c0b8695c91..1dd8576b0a 100644 --- a/src/core/SkQuadClipper.h +++ b/src/core/SkQuadClipper.h @@ -1,4 +1,3 @@ - /* * Copyright 2009 The Android Open Source Project * diff --git a/src/core/SkRTree.h b/src/core/SkRTree.h index 557817189d..499f7a5d7d 100644 --- a/src/core/SkRTree.h +++ b/src/core/SkRTree.h @@ -1,4 +1,3 @@ - /* * Copyright 2012 Google Inc. * diff --git a/src/core/SkRasterClip.cpp b/src/core/SkRasterClip.cpp index 5afe279b95..89467677f3 100644 --- a/src/core/SkRasterClip.cpp +++ b/src/core/SkRasterClip.cpp @@ -211,7 +211,7 @@ bool SkRasterClip::op(const SkPath& path, const SkIRect& bounds, SkRegion::Op op } } else { base.setRect(bounds); - + if (SkRegion::kReplace_Op == op) { return this->setPath(path, base, doAA); } else { @@ -302,7 +302,7 @@ bool SkRasterClip::op(const SkRect& r, const SkIRect& bounds, SkRegion::Op op, b } return this->op(ir, op); } - + if (fIsBW && doAA) { // check that the rect really needs aa, or is it close enought to // integer boundaries that we can just treat it as a BW rect? @@ -369,13 +369,13 @@ const SkRegion& SkRasterClip::forceGetBW() { void SkRasterClip::convertToAA() { AUTO_RASTERCLIP_VALIDATE(*this); - + SkASSERT(!fForceConservativeRects); - + SkASSERT(fIsBW); fAA.setRegion(fBW); fIsBW = false; - + // since we are being explicitly asked to convert-to-aa, we pass false so we don't "optimize" // ourselves back to BW. (void)this->updateCacheAndReturnNonEmpty(false); diff --git a/src/core/SkRasterClip.h b/src/core/SkRasterClip.h index 8f05bb9b3d..5d99f1dfab 100644 --- a/src/core/SkRasterClip.h +++ b/src/core/SkRasterClip.h @@ -48,7 +48,7 @@ public: bool op(const SkRect&, const SkIRect&, SkRegion::Op, bool doAA); bool op(const SkRRect&, const SkIRect&, SkRegion::Op, bool doAA); bool op(const SkPath&, const SkIRect&, SkRegion::Op, bool doAA); - + void translate(int dx, int dy, SkRasterClip* dst) const; void translate(int dx, int dy) { this->translate(dx, dy, this); diff --git a/src/core/SkRasterizer.cpp b/src/core/SkRasterizer.cpp index 6a3ea10678..60176b8446 100644 --- a/src/core/SkRasterizer.cpp +++ b/src/core/SkRasterizer.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkReadBuffer.cpp b/src/core/SkReadBuffer.cpp index 59d5172f81..fba02f7bdb 100644 --- a/src/core/SkReadBuffer.cpp +++ b/src/core/SkReadBuffer.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2012 Google Inc. * diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp index 394cc72026..d0e8c4cf48 100644 --- a/src/core/SkRecordDraw.cpp +++ b/src/core/SkRecordDraw.cpp @@ -811,4 +811,3 @@ void SkRecordComputeLayers(const SkRect& cullRect, const SkRecord& record, SkRec } visitor.cleanUp(); } - diff --git a/src/core/SkRecordOpts.cpp b/src/core/SkRecordOpts.cpp index 0121ea54fc..ea19d6eaa5 100644 --- a/src/core/SkRecordOpts.cpp +++ b/src/core/SkRecordOpts.cpp @@ -292,4 +292,3 @@ void SkRecordOptimize2(SkRecord* record) { record->defrag(); } - diff --git a/src/core/SkRect.cpp b/src/core/SkRect.cpp index f2060f8441..0b2723ab0a 100644 --- a/src/core/SkRect.cpp +++ b/src/core/SkRect.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkRefDict.cpp b/src/core/SkRefDict.cpp index 9364a39cc0..74071888ac 100644 --- a/src/core/SkRefDict.cpp +++ b/src/core/SkRefDict.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkRefDict.h b/src/core/SkRefDict.h index 9583df1f12..fec49ceb7a 100644 --- a/src/core/SkRefDict.h +++ b/src/core/SkRefDict.h @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkRegion.cpp b/src/core/SkRegion.cpp index ba6658182a..38d12d2f5d 100644 --- a/src/core/SkRegion.cpp +++ b/src/core/SkRegion.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkRegionPriv.h b/src/core/SkRegionPriv.h index c9633c7ad6..a4cf77b7f5 100644 --- a/src/core/SkRegionPriv.h +++ b/src/core/SkRegionPriv.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkScalar.cpp b/src/core/SkScalar.cpp index 7cb0a8b148..87a5073e14 100644 --- a/src/core/SkScalar.cpp +++ b/src/core/SkScalar.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2010 The Android Open Source Project * diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index 5e125f3008..cf4098bbdd 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkScan.cpp b/src/core/SkScan.cpp index b21dd6bf9c..7fce3f1726 100644 --- a/src/core/SkScan.cpp +++ b/src/core/SkScan.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkScan.h b/src/core/SkScan.h index 7309a1dd8c..f9443207c0 100644 --- a/src/core/SkScan.h +++ b/src/core/SkScan.h @@ -1,4 +1,3 @@ - /* * Copyright 2011 The Android Open Source Project * diff --git a/src/core/SkScanPriv.h b/src/core/SkScanPriv.h index 75ceee08b4..798cae6d0f 100644 --- a/src/core/SkScanPriv.h +++ b/src/core/SkScanPriv.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp index 06365c1b93..3b0f3e189b 100644 --- a/src/core/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkScan_Antihair.cpp b/src/core/SkScan_Antihair.cpp index 8ee0ba5f98..b3770eb646 100644 --- a/src/core/SkScan_Antihair.cpp +++ b/src/core/SkScan_Antihair.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2011 The Android Open Source Project * diff --git a/src/core/SkScan_Path.cpp b/src/core/SkScan_Path.cpp index 6c1f1c052d..884f785299 100644 --- a/src/core/SkScan_Path.cpp +++ b/src/core/SkScan_Path.cpp @@ -510,7 +510,7 @@ void sk_fill_path(const SkPath& path, const SkIRect* clipRect, SkBlitter* blitte } else { rightEdge = SkScalarRoundToInt(path.getBounds().right()) << shiftEdgesUp; } - + walk_edges(&headEdge, path.getFillType(), blitter, start_y, stop_y, proc, rightEdge); } } diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp index b8eabc50bf..681c224ad8 100644 --- a/src/core/SkSpecialImage.cpp +++ b/src/core/SkSpecialImage.cpp @@ -166,7 +166,7 @@ public: } ~SkSpecialImage_Image() override { } - + bool isOpaque() const override { return fImage->isOpaque(); } size_t getSize() const override { @@ -200,7 +200,7 @@ public: bool getBitmapDeprecated(SkBitmap* result) const override { #if SK_SUPPORT_GPU if (GrTexture* texture = as_IB(fImage.get())->peekTexture()) { - const SkImageInfo info = GrMakeInfoFromTexture(texture, + const SkImageInfo info = GrMakeInfoFromTexture(texture, fImage->width(), fImage->height(), fImage->isOpaque()); if (!result->setInfo(info)) { @@ -357,7 +357,7 @@ public: sk_sp<SkSpecialImage> onMakeSubset(const SkIRect& subset) const override { SkBitmap subsetBM; - + if (!fBitmap.extractSubset(&subsetBM, subset)) { return nullptr; } @@ -415,7 +415,7 @@ sk_sp<SkSpecialImage> SkSpecialImage::MakeFromPixmap(SkImageFilter::Proxy* proxy #include "SkImage_Gpu.h" class SkSpecialImage_Gpu : public SkSpecialImage_Base { -public: +public: SkSpecialImage_Gpu(SkImageFilter::Proxy* proxy, const SkIRect& subset, uint32_t uniqueID, GrTexture* tex, SkAlphaType at) : INHERITED(proxy, subset, uniqueID) @@ -447,7 +447,7 @@ public: GrTexture* onPeekTexture() const override { return fTexture; } bool getBitmapDeprecated(SkBitmap* result) const override { - const SkImageInfo info = GrMakeInfoFromTexture(fTexture, + const SkImageInfo info = GrMakeInfoFromTexture(fTexture, this->width(), this->height(), this->isOpaque()); if (!result->setInfo(info)) { @@ -463,7 +463,7 @@ public: bool testingOnlyOnGetROPixels(SkBitmap* result) const override { - const SkImageInfo info = SkImageInfo::MakeN32(this->width(), + const SkImageInfo info = SkImageInfo::MakeN32(this->width(), this->height(), this->isOpaque() ? kOpaque_SkAlphaType : kPremul_SkAlphaType); @@ -495,7 +495,7 @@ public: return SkSpecialImage::MakeFromGpu(this->internal_getProxy(), subset, this->uniqueID(), - fTexture, + fTexture, fAlphaType); } @@ -536,7 +536,7 @@ private: }; sk_sp<SkSpecialImage> SkSpecialImage::MakeFromGpu(SkImageFilter::Proxy* proxy, - const SkIRect& subset, + const SkIRect& subset, uint32_t uniqueID, GrTexture* tex, SkAlphaType at) { diff --git a/src/core/SkSpecialImage.h b/src/core/SkSpecialImage.h index 778bf53449..4de28ebd16 100644 --- a/src/core/SkSpecialImage.h +++ b/src/core/SkSpecialImage.h @@ -76,7 +76,7 @@ public: static sk_sp<SkSpecialImage> MakeFromGpu(SkImageFilter::Proxy*, const SkIRect& subset, uint32_t uniqueID, - GrTexture*, + GrTexture*, SkAlphaType at = kPremul_SkAlphaType); static sk_sp<SkSpecialImage> MakeFromPixmap(SkImageFilter::Proxy*, const SkIRect& subset, @@ -164,4 +164,3 @@ private: }; #endif - diff --git a/src/core/SkSpecialSurface.cpp b/src/core/SkSpecialSurface.cpp index c1b06dd769..2ac71ffb52 100644 --- a/src/core/SkSpecialSurface.cpp +++ b/src/core/SkSpecialSurface.cpp @@ -70,7 +70,7 @@ public: SkPixelRef* pr, const SkIRect& subset, const SkSurfaceProps* props) - : INHERITED(proxy, subset, props) { + : INHERITED(proxy, subset, props) { const SkImageInfo& info = pr->info(); fBitmap.setInfo(info, info.minRowBytes()); @@ -148,7 +148,7 @@ private: typedef SkSpecialSurface_Base INHERITED; }; -sk_sp<SkSpecialSurface> SkSpecialSurface::MakeFromTexture(SkImageFilter::Proxy* proxy, +sk_sp<SkSpecialSurface> SkSpecialSurface::MakeFromTexture(SkImageFilter::Proxy* proxy, const SkIRect& subset, GrTexture* texture, const SkSurfaceProps* props) { diff --git a/src/core/SkSpecialSurface.h b/src/core/SkSpecialSurface.h index 098baa42dd..d24ee74569 100644 --- a/src/core/SkSpecialSurface.h +++ b/src/core/SkSpecialSurface.h @@ -35,7 +35,7 @@ public: /** * Return a canvas that will draw into this surface. This will always * return the same canvas for a given surface, and is managed/owned by the - * surface. + * surface. * * The canvas will be invalid after 'newImageSnapshot' is called. */ diff --git a/src/core/SkSpriteBlitter4f.cpp b/src/core/SkSpriteBlitter4f.cpp index 474bf4d0f6..2561620379 100644 --- a/src/core/SkSpriteBlitter4f.cpp +++ b/src/core/SkSpriteBlitter4f.cpp @@ -18,13 +18,13 @@ public: fFilter = SkFilterSpanProc_Choose(paint); fBuffer.reset(src.width()); } - + protected: SkXfermode* fXfer; SkLoadSpanProc fLoader; SkFilterSpanProc fFilter; SkAutoTMalloc<SkPM4f> fBuffer; - + private: typedef SkSpriteBlitter INHERITED; }; @@ -53,7 +53,7 @@ public: dst = (uint64_t* SK_RESTRICT)((char*)dst + dstRB); } } - + private: SkXfermode::D64Proc fWriter; @@ -89,12 +89,12 @@ public: } fWriter = SkXfermode::GetD32Proc(fXfer, flags); } - + void blitRect(int x, int y, int width, int height) override { SkASSERT(width > 0 && height > 0); uint32_t* SK_RESTRICT dst = fDst.writable_addr32(x, y); size_t dstRB = fDst.rowBytes(); - + for (int bottom = y + height; y < bottom; ++y) { fLoader(fSource, x - fLeft, y - fTop, fBuffer, width); fFilter(*fPaint, fBuffer, width); @@ -102,10 +102,10 @@ public: dst = (uint32_t* SK_RESTRICT)((char*)dst + dstRB); } } - + protected: SkXfermode::D32Proc fWriter; - + private: typedef Sprite_4f INHERITED; }; @@ -114,11 +114,11 @@ private: SkSpriteBlitter* SkSpriteBlitter::ChooseS32(const SkPixmap& source, const SkPaint& paint, SkTBlitterAllocator* allocator) { SkASSERT(allocator != nullptr); - + if (paint.getMaskFilter() != nullptr) { return nullptr; } - + switch (source.colorType()) { case kN32_SkColorType: case kRGBA_F16_SkColorType: diff --git a/src/core/SkSpriteBlitter_RGB16.cpp b/src/core/SkSpriteBlitter_RGB16.cpp index 4dd4164423..d0d3001cbb 100644 --- a/src/core/SkSpriteBlitter_RGB16.cpp +++ b/src/core/SkSpriteBlitter_RGB16.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkStream.cpp b/src/core/SkStream.cpp index a4c44fb2bc..1d1c9b971f 100644 --- a/src/core/SkStream.cpp +++ b/src/core/SkStream.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp index 8ac5674474..2e2c0e7173 100644 --- a/src/core/SkString.cpp +++ b/src/core/SkString.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkStroke.cpp b/src/core/SkStroke.cpp index 9c26294129..0f1a15f0b6 100644 --- a/src/core/SkStroke.cpp +++ b/src/core/SkStroke.cpp @@ -397,7 +397,7 @@ static bool has_valid_tangent(const SkPath::Iter* iter) { continue; } return true; - case SkPath::kClose_Verb: + case SkPath::kClose_Verb: case SkPath::kDone_Verb: return false; } @@ -627,7 +627,7 @@ SkPathStroker::ReductionType SkPathStroker::CheckConicLinear(const SkConic& coni SkScalar xT = 0, yT = 0; (void) conic.findXExtrema(&xT); (void) conic.findYExtrema(&yT); - SkScalar t = SkTMax(xT, yT); + SkScalar t = SkTMax(xT, yT); if (0 == t) { return kLine_ReductionType; } diff --git a/src/core/SkStrokeRec.cpp b/src/core/SkStrokeRec.cpp index 6c975b445f..6aed573418 100644 --- a/src/core/SkStrokeRec.cpp +++ b/src/core/SkStrokeRec.cpp @@ -96,7 +96,7 @@ void SkStrokeRec::setStrokeStyle(SkScalar width, bool strokeAndFill) { #include "SkStroke.h" -#ifdef SK_DEBUG +#ifdef SK_DEBUG // enables tweaking these values at runtime from SampleApp bool gDebugStrokerErrorSet = false; SkScalar gDebugStrokerError; diff --git a/src/core/SkStrokerPriv.cpp b/src/core/SkStrokerPriv.cpp index 7fc773a114..840f961982 100644 --- a/src/core/SkStrokerPriv.cpp +++ b/src/core/SkStrokerPriv.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkStrokerPriv.h b/src/core/SkStrokerPriv.h index 1c35f0a8ea..d008efa11a 100644 --- a/src/core/SkStrokerPriv.h +++ b/src/core/SkStrokerPriv.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkSwizzle.cpp b/src/core/SkSwizzle.cpp index 9c1971817b..f080b83a87 100644 --- a/src/core/SkSwizzle.cpp +++ b/src/core/SkSwizzle.cpp @@ -12,5 +12,3 @@ void SkSwapRB(uint32_t* dest, const uint32_t* src, int count) { SkOpts::RGBA_to_BGRA(dest, src, count); } - - diff --git a/src/core/SkTDPQueue.h b/src/core/SkTDPQueue.h index 1545f97995..294c9f410b 100644 --- a/src/core/SkTDPQueue.h +++ b/src/core/SkTDPQueue.h @@ -34,7 +34,7 @@ public: /** Gets the next item in the queue without popping it. */ const T& peek() const { return fArray[0]; } T& peek() { return fArray[0]; } - + /** Removes the next item. */ void pop() { this->validate(); @@ -134,7 +134,7 @@ private: SkASSERT(index >= 0); do { int child = LeftOf(index); - + if (child >= fArray.count()) { // We're a leaf. this->setIndex(index); @@ -188,7 +188,7 @@ private: } SkTDArray<T> fArray; - + typedef SkNoncopyable INHERITED; }; diff --git a/src/core/SkTDynamicHash.h b/src/core/SkTDynamicHash.h index 2fa37b54f7..b144d18d48 100644 --- a/src/core/SkTDynamicHash.h +++ b/src/core/SkTDynamicHash.h @@ -127,12 +127,12 @@ public: fDeleted = 0; } - void reset() { - fCount = 0; - fDeleted = 0; - fCapacity = 0; - sk_free(fArray); - fArray = nullptr; + void reset() { + fCount = 0; + fDeleted = 0; + fCapacity = 0; + sk_free(fArray); + fArray = nullptr; } protected: diff --git a/src/core/SkTMultiMap.h b/src/core/SkTMultiMap.h index b0d04d5aa8..4c8683cb8c 100644 --- a/src/core/SkTMultiMap.h +++ b/src/core/SkTMultiMap.h @@ -1,4 +1,3 @@ - /* * Copyright 2013 Google Inc. * diff --git a/src/core/SkTSearch.cpp b/src/core/SkTSearch.cpp index 5b5f139042..9ff9777638 100644 --- a/src/core/SkTSearch.cpp +++ b/src/core/SkTSearch.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkTSort.h b/src/core/SkTSort.h index 027ea52a5e..51b103cb5d 100644 --- a/src/core/SkTSort.h +++ b/src/core/SkTSort.h @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkTaskGroup.cpp b/src/core/SkTaskGroup.cpp index b3c23b649b..b696555d6f 100644 --- a/src/core/SkTaskGroup.cpp +++ b/src/core/SkTaskGroup.cpp @@ -207,4 +207,3 @@ void SkTaskGroup::add(std::function<void(void)> fn) { ThreadPool::Add(fn, &fPend void SkTaskGroup::batch(int N, std::function<void(int)> fn) { ThreadPool::Batch(N, fn, &fPending); } - diff --git a/src/core/SkTextBlob.cpp b/src/core/SkTextBlob.cpp index 79fe858aac..463312aa6d 100644 --- a/src/core/SkTextBlob.cpp +++ b/src/core/SkTextBlob.cpp @@ -646,4 +646,3 @@ const SkTextBlob* SkTextBlobBuilder::build() { return blob; } - diff --git a/src/core/SkTextFormatParams.h b/src/core/SkTextFormatParams.h index f41c4de1d5..ef22c848bf 100644 --- a/src/core/SkTextFormatParams.h +++ b/src/core/SkTextFormatParams.h @@ -1,4 +1,3 @@ - /* * Copyright 2010 The Android Open Source Project * diff --git a/src/core/SkTextMapStateProc.h b/src/core/SkTextMapStateProc.h index 8ef9389b3a..944050917c 100644 --- a/src/core/SkTextMapStateProc.h +++ b/src/core/SkTextMapStateProc.h @@ -75,4 +75,3 @@ inline void SkTextMapStateProc::operator()(const SkScalar pos[], SkPoint* loc) c } #endif - diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp index 8b7620b484..6024c81a17 100644 --- a/src/core/SkTypeface.cpp +++ b/src/core/SkTypeface.cpp @@ -358,4 +358,3 @@ bool SkTypeface::onComputeBounds(SkRect* bounds) const { } return false; } - diff --git a/src/core/SkTypefaceCache.cpp b/src/core/SkTypefaceCache.cpp index 5fe080d05d..faf39788ed 100644 --- a/src/core/SkTypefaceCache.cpp +++ b/src/core/SkTypefaceCache.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkTypefaceCache.h b/src/core/SkTypefaceCache.h index f39b0d7a44..bb2cb85bfc 100644 --- a/src/core/SkTypefaceCache.h +++ b/src/core/SkTypefaceCache.h @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkUnPreMultiply.cpp b/src/core/SkUnPreMultiply.cpp index 6245e96429..a15e7d13a3 100644 --- a/src/core/SkUnPreMultiply.cpp +++ b/src/core/SkUnPreMultiply.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * diff --git a/src/core/SkUtils.cpp b/src/core/SkUtils.cpp index f706cb9f25..635d1b1736 100644 --- a/src/core/SkUtils.cpp +++ b/src/core/SkUtils.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2006 The Android Open Source Project * diff --git a/src/core/SkUtilsArm.cpp b/src/core/SkUtilsArm.cpp index 9dc4e5472a..bf98fed476 100644 --- a/src/core/SkUtilsArm.cpp +++ b/src/core/SkUtilsArm.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2012 The Android Open Source Project * diff --git a/src/core/SkUtilsArm.h b/src/core/SkUtilsArm.h index 51ae7e4a95..317677115c 100644 --- a/src/core/SkUtilsArm.h +++ b/src/core/SkUtilsArm.h @@ -1,4 +1,3 @@ - /* * Copyright 2012 The Android Open Source Project * diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp index f8b3195403..6baea37946 100644 --- a/src/core/SkWriteBuffer.cpp +++ b/src/core/SkWriteBuffer.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2012 Google Inc. * diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp index 262e5265c7..98eb796b73 100644 --- a/src/core/SkXfermode.cpp +++ b/src/core/SkXfermode.cpp @@ -246,7 +246,7 @@ static inline void clipColor(float* r, float* g, float* b, float a) { *g = L + (*g - L) * scale; *b = L + (*b - L) * scale; } - + if ((x > a) && (denom = x - L)) { // Compute denom and make sure it's non zero float scale = (a - L) / denom; *r = L + (*r - L) * scale; @@ -268,7 +268,7 @@ static Sk4f hue_4f(const Sk4f& s, const Sk4f& d) { float sr = s[SkPM4f::R]; float sg = s[SkPM4f::G]; float sb = s[SkPM4f::B]; - + float da = d[SkPM4f::A]; float dr = d[SkPM4f::R]; float dg = d[SkPM4f::G]; @@ -289,18 +289,18 @@ static Sk4f saturation_4f(const Sk4f& s, const Sk4f& d) { float sr = s[SkPM4f::R]; float sg = s[SkPM4f::G]; float sb = s[SkPM4f::B]; - + float da = d[SkPM4f::A]; float dr = d[SkPM4f::R]; float dg = d[SkPM4f::G]; float db = d[SkPM4f::B]; - + float Dr = dr; float Dg = dg; float Db = db; SetSat(&Dr, &Dg, &Db, Sat(sr, sg, sb) * da); SetLum(&Dr, &Dg, &Db, sa * da, Lum(dr, dg, db) * sa); - + return color_alpha(s * inv_alpha(d) + d * inv_alpha(s) + set_argb(0, Dr, Dg, Db), sa + da - sa * da); } @@ -310,7 +310,7 @@ static Sk4f color_4f(const Sk4f& s, const Sk4f& d) { float sr = s[SkPM4f::R]; float sg = s[SkPM4f::G]; float sb = s[SkPM4f::B]; - + float da = d[SkPM4f::A]; float dr = d[SkPM4f::R]; float dg = d[SkPM4f::G]; @@ -320,7 +320,7 @@ static Sk4f color_4f(const Sk4f& s, const Sk4f& d) { float Sg = sg; float Sb = sb; SetLum(&Sr, &Sg, &Sb, sa * da, Lum(dr, dg, db) * sa); - + Sk4f res = color_alpha(s * inv_alpha(d) + d * inv_alpha(s) + set_argb(0, Sr, Sg, Sb), sa + da - sa * da); // Can return tiny negative values ... @@ -332,17 +332,17 @@ static Sk4f luminosity_4f(const Sk4f& s, const Sk4f& d) { float sr = s[SkPM4f::R]; float sg = s[SkPM4f::G]; float sb = s[SkPM4f::B]; - + float da = d[SkPM4f::A]; float dr = d[SkPM4f::R]; float dg = d[SkPM4f::G]; float db = d[SkPM4f::B]; - + float Dr = dr; float Dg = dg; float Db = db; SetLum(&Dr, &Dg, &Db, sa * da, Lum(sr, sg, sb) * da); - + Sk4f res = color_alpha(s * inv_alpha(d) + d * inv_alpha(s) + set_argb(0, Dr, Dg, Db), sa + da - sa * da); // Can return tiny negative values ... diff --git a/src/core/SkXfermodeU64.cpp b/src/core/SkXfermodeU64.cpp index d3ddb2f02b..630a9d0683 100644 --- a/src/core/SkXfermodeU64.cpp +++ b/src/core/SkXfermodeU64.cpp @@ -238,7 +238,7 @@ static SkXfermode::D64Proc find_proc(SkXfermode::Mode mode, uint32_t flags) { SkXfermode::D64Proc SkXfermode::onGetD64Proc(uint32_t flags) const { SkASSERT(0 == (flags & ~7)); flags &= 7; - + Mode mode; return this->asMode(&mode) ? find_proc(mode, flags) : gProcs_General[flags]; } @@ -246,4 +246,3 @@ SkXfermode::D64Proc SkXfermode::onGetD64Proc(uint32_t flags) const { SkXfermode::D64Proc SkXfermode::GetD64Proc(SkXfermode* xfer, uint32_t flags) { return xfer ? xfer->onGetD64Proc(flags) : find_proc(SkXfermode::kSrcOver_Mode, flags); } - diff --git a/src/core/SkYUVPlanesCache.cpp b/src/core/SkYUVPlanesCache.cpp index 336b581246..07a07c698b 100644 --- a/src/core/SkYUVPlanesCache.cpp +++ b/src/core/SkYUVPlanesCache.cpp @@ -77,7 +77,7 @@ SkCachedData* SkYUVPlanesCache::FindAndRef(uint32_t genID, Info* info, if (!CHECK_LOCAL(localCache, find, Find, key, YUVPlanesRec::Visitor, &result)) { return nullptr; } - + *info = result.fInfo; return result.fData; } |