Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Unified Diff: src/device/xps/SkXPSDevice.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | src/effects/SkArithmeticMode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/device/xps/SkXPSDevice.cpp
diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp
index 194d23a7e7f0a899e11ed84aec7068ac4f08f811..1a1215343acfdd278769030a7867b0da05988248 100644
--- a/src/device/xps/SkXPSDevice.cpp
+++ b/src/device/xps/SkXPSDevice.cpp
@@ -809,7 +809,7 @@ HRESULT SkXPSDevice::createXpsImageBrush(
SkTScopedComPtr<IXpsOMMatrixTransform> xpsMatrixToUse;
HR(this->createXpsTransform(localMatrix, &xpsMatrixToUse));
- if (NULL != xpsMatrixToUse.get()) {
+ if (xpsMatrixToUse.get()) {
HRM((*xpsBrush)->SetTransformLocal(xpsMatrixToUse.get()),
"Could not set transform for image brush.");
} else {
@@ -838,7 +838,7 @@ HRESULT SkXPSDevice::createXpsLinearGradient(SkShader::GradientInfo info,
IXpsOMBrush** xpsBrush) {
XPS_POINT startPoint;
XPS_POINT endPoint;
- if (NULL != xpsMatrix) {
+ if (xpsMatrix) {
startPoint = xps_point(info.fPoint[0]);
endPoint = xps_point(info.fPoint[1]);
} else {
@@ -866,7 +866,7 @@ HRESULT SkXPSDevice::createXpsLinearGradient(SkShader::GradientInfo info,
&endPoint,
&gradientBrush),
"Could not create linear gradient brush.");
- if (NULL != xpsMatrix) {
+ if (xpsMatrix) {
HRM(gradientBrush->SetTransformLocal(xpsMatrix),
"Could not set transform on linear gradient brush.");
}
@@ -912,7 +912,7 @@ HRESULT SkXPSDevice::createXpsRadialGradient(SkShader::GradientInfo info,
XPS_POINT centerPoint;
XPS_POINT gradientOrigin;
XPS_SIZE radiiSizes;
- if (NULL != xpsMatrix) {
+ if (xpsMatrix) {
centerPoint = xps_point(info.fPoint[0]);
gradientOrigin = xps_point(info.fPoint[0]);
radiiSizes.width = SkScalarToFLOAT(info.fRadius[0]);
@@ -943,7 +943,7 @@ HRESULT SkXPSDevice::createXpsRadialGradient(SkShader::GradientInfo info,
&radiiSizes,
&gradientBrush),
"Could not create radial gradient brush.");
- if (NULL != xpsMatrix) {
+ if (xpsMatrix) {
HRM(gradientBrush->SetTransformLocal(xpsMatrix),
"Could not set transform on radial gradient brush.");
}
@@ -1019,7 +1019,7 @@ HRESULT SkXPSDevice::createXpsBrush(const SkPaint& skPaint,
}
SkMatrix localMatrix = shader->getLocalMatrix();
- if (NULL != parentTransform) {
+ if (parentTransform) {
localMatrix.preConcat(*parentTransform);
}
SkTScopedComPtr<IXpsOMMatrixTransform> xpsMatrixToUse;
@@ -1065,7 +1065,7 @@ HRESULT SkXPSDevice::createXpsBrush(const SkPaint& skPaint,
case SkShader::kDefault_BitmapType: {
//TODO: outMatrix??
SkMatrix localMatrix = shader->getLocalMatrix();
- if (NULL != parentTransform) {
+ if (parentTransform) {
localMatrix.preConcat(*parentTransform);
}
@@ -1327,7 +1327,7 @@ HRESULT SkXPSDevice::addXpsPathGeometry(
while ((verb = iter.next(points)) != SkPath::kDone_Verb) {
switch (verb) {
case SkPath::kMove_Verb: {
- if (NULL != xpsFigure.get()) {
+ if (xpsFigure.get()) {
HR(close_figure(segmentTypes, segmentStrokes, segmentData,
stroke, fill,
xpsFigure.get() , xpsFigures));
@@ -1378,7 +1378,7 @@ HRESULT SkXPSDevice::addXpsPathGeometry(
break;
}
}
- if (NULL != xpsFigure.get()) {
+ if (xpsFigure.get()) {
HR(close_figure(segmentTypes, segmentStrokes, segmentData,
stroke, fill,
xpsFigure.get(), xpsFigures));
@@ -1834,7 +1834,7 @@ void SkXPSDevice::drawBitmap(const SkDraw& d, const SkBitmap& bitmap,
}
SkTScopedComPtr<IXpsOMGeometryFigure> rectFigure;
- if (NULL != xpsTransform.get()) {
+ if (xpsTransform.get()) {
const SkShader::TileMode xy[2] = {
SkShader::kClamp_TileMode,
SkShader::kClamp_TileMode,
@@ -1979,12 +1979,12 @@ HRESULT SkXPSDevice::AddGlyphs(const SkDraw& d,
SkTScopedComPtr<IXpsOMGlyphsEditor> glyphsEditor;
HRM(glyphs->GetGlyphsEditor(&glyphsEditor), "Could not get glyph editor.");
- if (NULL != text) {
+ if (text) {
HRM(glyphsEditor->SetUnicodeString(text),
"Could not set unicode string.");
}
- if (NULL != xpsGlyphs) {
+ if (xpsGlyphs) {
HRM(glyphsEditor->SetGlyphIndices(xpsGlyphsLen, xpsGlyphs),
"Could not set glyphs.");
}
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | src/effects/SkArithmeticMode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698