X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2Fskia%2Fsrc%2Fgpu%2FGrSWMaskHelper.cpp;h=c80a13ccd02aafa76e1184e2a075b0dd27cf6b8d;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=b7b2d1a7c6326f6a1b2f3cebf2b6f5e703104063;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/skia/src/gpu/GrSWMaskHelper.cpp b/src/third_party/skia/src/gpu/GrSWMaskHelper.cpp index b7b2d1a..c80a13c 100644 --- a/src/third_party/skia/src/gpu/GrSWMaskHelper.cpp +++ b/src/third_party/skia/src/gpu/GrSWMaskHelper.cpp @@ -142,7 +142,7 @@ void GrSWMaskHelper::draw(const SkPath& path, const SkStrokeRec& stroke, SkRegio SkTBlitterAllocator allocator; SkBlitter* blitter = NULL; if (kBlitter_CompressionMode == fCompressionMode) { - SkASSERT(NULL != fCompressedBuffer.get()); + SkASSERT(fCompressedBuffer.get()); blitter = SkTextureCompressor::CreateBlitterForFormat( fBM.width(), fBM.height(), fCompressedBuffer.get(), &allocator, fCompressedFormat); } @@ -160,7 +160,7 @@ void GrSWMaskHelper::draw(const SkPath& path, const SkStrokeRec& stroke, SkRegio bool GrSWMaskHelper::init(const SkIRect& resultBounds, const SkMatrix* matrix, bool allowCompression) { - if (NULL != matrix) { + if (matrix) { fMatrix = *matrix; } else { fMatrix.setIdentity(); @@ -205,7 +205,7 @@ bool GrSWMaskHelper::init(const SkIRect& resultBounds, // allocate the pixels for a bitmap const SkImageInfo bmImageInfo = SkImageInfo::MakeA8(cmpWidth, cmpHeight); if (kBlitter_CompressionMode != fCompressionMode) { - if (!fBM.allocPixels(bmImageInfo)) { + if (!fBM.tryAllocPixels(bmImageInfo)) { return false; } @@ -249,7 +249,7 @@ bool GrSWMaskHelper::getTexture(GrAutoScratchTexture* texture) { } texture->set(fContext, desc); - return NULL != texture->texture(); + return SkToBool(texture->texture()); } void GrSWMaskHelper::sendTextureData(GrTexture *texture, const GrTextureDesc& desc, @@ -273,7 +273,7 @@ void GrSWMaskHelper::compressTextureData(GrTexture *texture, const GrTextureDesc SkASSERT(fmt_to_config(fCompressedFormat) == desc.fConfig); SkAutoDataUnref cmpData(SkTextureCompressor::CompressBitmapToFormat(fBM, fCompressedFormat)); - SkASSERT(NULL != cmpData); + SkASSERT(cmpData); this->sendTextureData(texture, desc, cmpData->data(), 0); } @@ -300,7 +300,7 @@ void GrSWMaskHelper::toTexture(GrTexture *texture) { break; case kBlitter_CompressionMode: - SkASSERT(NULL != fCompressedBuffer.get()); + SkASSERT(fCompressedBuffer.get()); this->sendTextureData(texture, desc, fCompressedBuffer.get(), 0); break; } @@ -361,7 +361,7 @@ void GrSWMaskHelper::DrawToTargetWithPathMask(GrTexture* texture, maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop)); maskMatrix.preConcat(drawState->getViewMatrix()); - drawState->addCoverageEffect( + drawState->addCoverageProcessor( GrSimpleTextureEffect::Create(texture, maskMatrix, GrTextureParams::kNone_FilterMode,