Remove ableist language
Change-Id: Ie9ef50a14906c9350adbe16720291dca944ad7fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418738
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
diff --git a/experimental/ffmpeg/SkVideoDecoder.cpp b/experimental/ffmpeg/SkVideoDecoder.cpp
index 6728c38..e5ade14 100644
--- a/experimental/ffmpeg/SkVideoDecoder.cpp
+++ b/experimental/ffmpeg/SkVideoDecoder.cpp
@@ -255,9 +255,9 @@
}
sk_sp<SkImage> SkVideoDecoder::nextImage(double* timeStamp) {
- double dummyTimeStampStorage = 0;
+ double defaultTimeStampStorage = 0;
if (!timeStamp) {
- timeStamp = &dummyTimeStampStorage;
+ timeStamp = &defaultTimeStampStorage;
}
if (fFormatCtx == nullptr) {
diff --git a/gm/b_119394958.cpp b/gm/b_119394958.cpp
index 3be59b1..f5b192e 100644
--- a/gm/b_119394958.cpp
+++ b/gm/b_119394958.cpp
@@ -15,8 +15,8 @@
// The root cause of this bug was that a stroked arc with round caps was batched with a filled
// circle. The circle op code would choose a GeometryProcessor configuration that expected round
// cap centers as vertex attributes. However, the tessellation code for the filled circle would
- // not put in dummy round cap centers and then didn't advance the pointer into which vertex data
- // was being written by the expected vertex stride.
+ // not put in zero-width round cap centers and then didn't advance the pointer into which
+ // vertex data was being written by the expected vertex stride.
SkPaint paint;
paint.setColor(SK_ColorBLUE);
paint.setAntiAlias(true);
diff --git a/gm/blurrect.cpp b/gm/blurrect.cpp
index ee8aafd..0e0c691 100644
--- a/gm/blurrect.cpp
+++ b/gm/blurrect.cpp
@@ -80,7 +80,7 @@
}
/*
- * Spits out a dummy gradient to test blur with shader on paint
+ * Spits out an arbitrary gradient to test blur with shader on paint
*/
static sk_sp<SkShader> make_radial() {
SkPoint pts[2] = {
diff --git a/gm/blurroundrect.cpp b/gm/blurroundrect.cpp
index 8e10957..48e394c 100644
--- a/gm/blurroundrect.cpp
+++ b/gm/blurroundrect.cpp
@@ -28,7 +28,7 @@
#include "src/core/SkBlurMask.h"
/*
- * Spits out a dummy gradient to test blur with shader on paint
+ * Spits out an arbitrary gradient to test blur with shader on paint
*/
static sk_sp<SkShader> MakeRadial() {
SkPoint pts[2] = {
diff --git a/gm/coloremoji.cpp b/gm/coloremoji.cpp
index e195376..14b51ae 100644
--- a/gm/coloremoji.cpp
+++ b/gm/coloremoji.cpp
@@ -34,7 +34,7 @@
#include <utility>
/*
- * Spits out a dummy gradient to test blur with shader on paint
+ * Spits out an arbitrary gradient to test blur with shader on paint
*/
static sk_sp<SkShader> MakeLinear() {
constexpr SkPoint kPts[] = { { 0, 0 }, { 32, 32 } };
diff --git a/include/core/SkData.h b/include/core/SkData.h
index fae2acf..eb845b5 100644
--- a/include/core/SkData.h
+++ b/include/core/SkData.h
@@ -105,7 +105,7 @@
* SkData. Suitable for with const globals.
*/
static sk_sp<SkData> MakeWithoutCopy(const void* data, size_t length) {
- return MakeWithProc(data, length, DummyReleaseProc, nullptr);
+ return MakeWithProc(data, length, NoopReleaseProc, nullptr);
}
/**
@@ -174,7 +174,7 @@
// shared internal factory
static sk_sp<SkData> PrivateNewWithCopy(const void* srcOrNull, size_t length);
- static void DummyReleaseProc(const void*, void*); // {}
+ static void NoopReleaseProc(const void*, void*); // {}
using INHERITED = SkRefCnt;
};
diff --git a/include/core/SkRect.h b/include/core/SkRect.h
index d42da68..fcdd48e 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -529,8 +529,7 @@
@return true if a and b have area in common
*/
static bool Intersects(const SkIRect& a, const SkIRect& b) {
- SkIRect dummy;
- return dummy.intersect(a, b);
+ return SkIRect{}.intersect(a, b);
}
/** Sets SkIRect to the union of itself and r.
diff --git a/include/gpu/GrBackendSurfaceMutableState.h b/include/gpu/GrBackendSurfaceMutableState.h
index b3d3f79..3a5f1d7 100644
--- a/include/gpu/GrBackendSurfaceMutableState.h
+++ b/include/gpu/GrBackendSurfaceMutableState.h
@@ -78,7 +78,7 @@
#endif
union {
- char fDummy;
+ char fPlaceholder;
#ifdef SK_VULKAN
GrVkSharedImageInfo fVkState;
#endif
diff --git a/include/private/GrSingleOwner.h b/include/private/GrSingleOwner.h
index 0bbaeb7..f612bb5 100644
--- a/include/private/GrSingleOwner.h
+++ b/include/private/GrSingleOwner.h
@@ -59,7 +59,7 @@
};
#else
#define GR_ASSERT_SINGLE_OWNER(obj)
-class GrSingleOwner {}; // Provide a dummy implementation so we can pass pointers to constructors
+class GrSingleOwner {}; // Provide a no-op implementation so we can pass pointers to constructors
#endif
#endif
diff --git a/modules/skottie/src/SkottieTest.cpp b/modules/skottie/src/SkottieTest.cpp
index a558a71..8a8884d 100644
--- a/modules/skottie/src/SkottieTest.cpp
+++ b/modules/skottie/src/SkottieTest.cpp
@@ -209,9 +209,9 @@
};
// Returns a single specified typeface for all requests.
- class DummyFontMgr : public SkFontMgr {
+ class FakeFontMgr : public SkFontMgr {
public:
- DummyFontMgr(sk_sp<SkTypeface> test_font) : fTestFont(test_font) {}
+ FakeFontMgr(sk_sp<SkTypeface> test_font) : fTestFont(test_font) {}
int onCountFamilies() const override { return 1; }
void onGetFamilyName(int index, SkString* familyName) const override {}
@@ -250,7 +250,7 @@
sk_sp<SkTypeface> fTestFont;
};
- sk_sp<DummyFontMgr> test_font_manager = sk_make_sp<DummyFontMgr>(test_typeface);
+ sk_sp<FakeFontMgr> test_font_manager = sk_make_sp<FakeFontMgr>(test_typeface);
SkMemoryStream stream(json, strlen(json));
auto observer = sk_make_sp<TestPropertyObserver>();
diff --git a/modules/skottie/src/text/RangeSelector.cpp b/modules/skottie/src/text/RangeSelector.cpp
index b32ea44..47c8157 100644
--- a/modules/skottie/src/text/RangeSelector.cpp
+++ b/modules/skottie/src/text/RangeSelector.cpp
@@ -32,7 +32,7 @@
return arr[idx - 1];
}
- // For animators without selectors, BM emits dummy selector entries with 0 (inval) props.
+ // For animators without selectors, BM emits placeholder selector entries with 0 (inval) props.
// Supress warnings for these as they are "normal".
if (idx != 0) {
abuilder->log(Logger::Level::kWarning, nullptr,
diff --git a/src/codec/SkIcoCodec.cpp b/src/codec/SkIcoCodec.cpp
index 5ffaf06..9340744 100644
--- a/src/codec/SkIcoCodec.cpp
+++ b/src/codec/SkIcoCodec.cpp
@@ -157,11 +157,11 @@
// Check if the embedded codec is bmp or png and create the codec
std::unique_ptr<SkCodec> codec;
- Result dummyResult;
+ Result ignoredResult;
if (SkPngCodec::IsPng(embeddedData->bytes(), embeddedData->size())) {
- codec = SkPngCodec::MakeFromStream(std::move(embeddedStream), &dummyResult);
+ codec = SkPngCodec::MakeFromStream(std::move(embeddedStream), &ignoredResult);
} else {
- codec = SkBmpCodec::MakeFromIco(std::move(embeddedStream), &dummyResult);
+ codec = SkBmpCodec::MakeFromIco(std::move(embeddedStream), &ignoredResult);
}
if (nullptr != codec) {
diff --git a/src/core/SkColorFilter.cpp b/src/core/SkColorFilter.cpp
index 06d3f25..f55d9a5 100644
--- a/src/core/SkColorFilter.cpp
+++ b/src/core/SkColorFilter.cpp
@@ -98,10 +98,10 @@
SkSTArenaAlloc<kEnoughForCommonFilters> alloc;
SkRasterPipeline pipeline(&alloc);
pipeline.append_constant_color(&alloc, color.vec());
- SkPaint dummyPaint;
+ SkPaint blankPaint;
SkSimpleMatrixProvider matrixProvider(SkMatrix::I());
SkStageRec rec = {
- &pipeline, &alloc, kRGBA_F32_SkColorType, dstCS, dummyPaint, nullptr, matrixProvider
+ &pipeline, &alloc, kRGBA_F32_SkColorType, dstCS, blankPaint, nullptr, matrixProvider
};
if (as_CFB(this)->onAppendStages(rec, color.fA == 1)) {
diff --git a/src/core/SkData.cpp b/src/core/SkData.cpp
index 8e200bc..f957542 100644
--- a/src/core/SkData.cpp
+++ b/src/core/SkData.cpp
@@ -81,7 +81,7 @@
return data;
}
-void SkData::DummyReleaseProc(const void*, void*) {}
+void SkData::NoopReleaseProc(const void*, void*) {}
///////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/SkOverdrawCanvas.cpp b/src/core/SkOverdrawCanvas.cpp
index a54239e..b6426ba 100644
--- a/src/core/SkOverdrawCanvas.cpp
+++ b/src/core/SkOverdrawCanvas.cpp
@@ -185,8 +185,8 @@
if (SkLatticeIter::Valid(image->width(), image->height(), latticePlusBounds)) {
SkLatticeIter iter(latticePlusBounds, dst);
- SkRect dummy, iterDst;
- while (iter.next(&dummy, &iterDst)) {
+ SkRect ignored, iterDst;
+ while (iter.next(&ignored, &iterDst)) {
fList[0]->onDrawRect(iterDst, fPaint);
}
} else {
diff --git a/src/core/SkReadBuffer.cpp b/src/core/SkReadBuffer.cpp
index d0b8b6d..75c268e 100644
--- a/src/core/SkReadBuffer.cpp
+++ b/src/core/SkReadBuffer.cpp
@@ -385,7 +385,7 @@
#include "src/core/SkMipmap.h"
// If we see a corrupt stream, we return null (fail). If we just fail trying to decode
-// the image, we don't fail, but return a dummy image.
+// the image, we don't fail, but return a 1x1 empty image.
sk_sp<SkImage> SkReadBuffer::readImage() {
if (this->isVersionLT(SkPicturePriv::kSerializeMipmaps_Version)) {
return this->readImage_preV78();
diff --git a/src/core/SkVM.cpp b/src/core/SkVM.cpp
index 09478e7..cb2a08d 100644
--- a/src/core/SkVM.cpp
+++ b/src/core/SkVM.cpp
@@ -2966,7 +2966,7 @@
fImpl->loop = 0;
fImpl->instructions.reserve(instructions.size());
- // Add a dummy mapping for the N/A sentinel Val to any arbitrary register
+ // Add a mapping for the N/A sentinel Val to any arbitrary register
// so lookups don't have to know which arguments are used by which Ops.
auto lookup_register = [&](Val id) {
return id == NA ? (Reg)0
diff --git a/src/core/SkVMBlitter.cpp b/src/core/SkVMBlitter.cpp
index 7a94cd3..d15332b 100644
--- a/src/core/SkVMBlitter.cpp
+++ b/src/core/SkVMBlitter.cpp
@@ -655,7 +655,7 @@
}
// We don't really _need_ to rebuild fUniforms here.
// It's just more natural to have effects unconditionally emit them,
- // and more natural to rebuild fUniforms than to emit them into a dummy buffer.
+ // and more natural to rebuild fUniforms than to emit them into a temporary buffer.
// fUniforms should reuse the exact same memory, so this is very cheap.
SkDEBUGCODE(size_t prev = fUniforms.buf.size();)
fUniforms.buf.resize(kBlitterUniformsCount);
diff --git a/src/gpu/GrProcessorUnitTest.h b/src/gpu/GrProcessorUnitTest.h
index a6e1ed2..305a0dc 100644
--- a/src/gpu/GrProcessorUnitTest.h
+++ b/src/gpu/GrProcessorUnitTest.h
@@ -30,12 +30,6 @@
namespace GrProcessorUnitTest {
-// Used to access the dummy textures in TestCreate procs.
-enum {
- kSkiaPMTextureIdx = 0,
- kAlphaTextureIdx = 1,
-};
-
/** This allows parent FPs to implement a test create with known leaf children in order to avoid
* creating an unbounded FP tree which may overflow various shader limits.
* MakeOptionalChildFP is the same as MakeChildFP, but can return null.
diff --git a/src/gpu/GrRenderTargetProxy.h b/src/gpu/GrRenderTargetProxy.h
index debeaea..73b6d0f 100644
--- a/src/gpu/GrRenderTargetProxy.h
+++ b/src/gpu/GrRenderTargetProxy.h
@@ -186,7 +186,7 @@
//
// In the current world we end the RT proxy at 12 bytes. Technically any padding between 0-4
// will work, but we use 4 to be more explicit about getting it to 16 byte alignment.
- char fDummyPadding[4];
+ char fPadding[4];
using INHERITED = GrSurfaceProxy;
};
diff --git a/src/gpu/GrSPIRVUniformHandler.cpp b/src/gpu/GrSPIRVUniformHandler.cpp
index fef052d..50e1c2e 100644
--- a/src/gpu/GrSPIRVUniformHandler.cpp
+++ b/src/gpu/GrSPIRVUniformHandler.cpp
@@ -319,6 +319,6 @@
}
uint32_t GrSPIRVUniformHandler::getRTHeightOffset() const {
- uint32_t dummy = fCurrentUBOOffset;
- return get_ubo_offset(&dummy, kFloat_GrSLType, 0);
+ uint32_t currentOffset = fCurrentUBOOffset;
+ return get_ubo_offset(¤tOffset, kFloat_GrSLType, 0);
}
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index 924ec75..03f98c7 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -92,7 +92,7 @@
// unchanged.
//
// NOTE: This binds the default VAO (ID=zero) unless we are on a core profile, in which case we
- // use a dummy array instead.
+ // use a placeholder array instead.
GrGLAttribArrayState* bindInternalVertexArray(const GrBuffer* indexBuffer, int numAttribs,
GrPrimitiveRestart primitiveRestart) {
auto* attribState = fHWVertexArrayState.bindInternalVertexArray(this, indexBuffer);
@@ -640,7 +640,7 @@
/**
* Binds the vertex array that should be used for internal draws, and returns its attrib
* state. This binds the default VAO (ID=zero) unless we are on a core profile, in which
- * case we use a dummy array instead.
+ * case we use a placeholder array instead.
*
* If an index buffer is provided, it will be bound to the vertex array. Otherwise the
* index buffer binding will be left unchanged.
diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h
index 2000d38..9e68adb 100644
--- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h
+++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.h
@@ -24,7 +24,7 @@
/** Appease the compiler; the derived class initializes GrGLSLShaderBuilder. */
GrGLSLFPFragmentBuilder() : GrGLSLShaderBuilder(nullptr) {
// Suppress unused warning error
- (void) fDummyPadding;
+ (void) fPadding;
}
enum class ScopeFlags {
@@ -61,7 +61,7 @@
// to start aligned, even though clang is already correctly offsetting the individual fields
// that require the larger alignment. In the current world, this extra padding is sufficient to
// correctly initialize GrGLSLXPFragmentBuilder second.
- char fDummyPadding[4] = {};
+ char fPadding[4] = {};
};
GR_MAKE_BITFIELD_CLASS_OPS(GrGLSLFPFragmentBuilder::ScopeFlags);
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
index e5674d1..7884c5f 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
@@ -25,7 +25,7 @@
, fCodeIndex(kCode)
, fFinalized(false)
, fTmpVariableCounter(0) {
- // We push back some dummy pointers which will later become our header
+ // We push back some placeholder pointers which will later become our header
for (int i = 0; i <= kCode; i++) {
fShaderStrings.push_back();
}
diff --git a/src/gpu/gradients/GrClampedGradientEffect.fp b/src/gpu/gradients/GrClampedGradientEffect.fp
index fc5f7c2..38a3ada 100644
--- a/src/gpu/gradients/GrClampedGradientEffect.fp
+++ b/src/gpu/gradients/GrClampedGradientEffect.fp
@@ -7,9 +7,9 @@
// This top-level effect implements clamping on the layout coordinate and requires specifying the
// border colors that are used when outside the clamped boundary. Gradients with the
-// SkShader::kClamp_TileMode should use the colors at their first and last stop (after adding dummy
-// stops for t=0,t=1) as the border color. This will automatically replicate the edge color, even if
-// when there is a hard stop.
+// SkShader::kClamp_TileMode should use the colors at their first and last stop (after adding
+// default stops for t=0,t=1) as the border color. This will automatically replicate the edge color,
+// even if when there is a hard stop.
//
// The SkShader::kDecal_TileMode can be produced by specifying transparent black as the border
// colors, regardless of the gradient's stop colors.
diff --git a/src/gpu/gradients/GrGradientShader.cpp b/src/gpu/gradients/GrGradientShader.cpp
index 648d188..c3f0969 100644
--- a/src/gpu/gradients/GrGradientShader.cpp
+++ b/src/gpu/gradients/GrGradientShader.cpp
@@ -78,7 +78,7 @@
// and removing these stops at the beginning, it makes optimizing the remaining color stops
// simpler.
- // SkGradientShaderBase guarantees that pos[0] == 0 by adding a dummy
+ // SkGradientShaderBase guarantees that pos[0] == 0 by adding a default value.
bool bottomHardStop = SkScalarNearlyEqual(positions[0], positions[1]);
// The same is true for pos[end] == 1
bool topHardStop = SkScalarNearlyEqual(positions[count - 2], positions[count - 1]);
diff --git a/src/gpu/mock/GrMockOpsRenderPass.h b/src/gpu/mock/GrMockOpsRenderPass.h
index 0067caf..e9ab5fb 100644
--- a/src/gpu/mock/GrMockOpsRenderPass.h
+++ b/src/gpu/mock/GrMockOpsRenderPass.h
@@ -42,17 +42,17 @@
}
void onBindBuffers(sk_sp<const GrBuffer> indexBuffer, sk_sp<const GrBuffer> instanceBuffer,
sk_sp<const GrBuffer> vertexBuffer, GrPrimitiveRestart) override {}
- void onDraw(int, int) override { this->dummyDraw(); }
- void onDrawIndexed(int, int, uint16_t, uint16_t, int) override { this->dummyDraw(); }
- void onDrawInstanced(int, int, int, int) override { this->dummyDraw(); }
- void onDrawIndexedInstanced(int, int, int, int, int) override { this->dummyDraw(); }
- void onDrawIndirect(const GrBuffer*, size_t, int) override { this->dummyDraw(); }
- void onDrawIndexedIndirect(const GrBuffer*, size_t, int) override { this->dummyDraw(); }
+ void onDraw(int, int) override { this->noopDraw(); }
+ void onDrawIndexed(int, int, uint16_t, uint16_t, int) override { this->noopDraw(); }
+ void onDrawInstanced(int, int, int, int) override { this->noopDraw(); }
+ void onDrawIndexedInstanced(int, int, int, int, int) override { this->noopDraw(); }
+ void onDrawIndirect(const GrBuffer*, size_t, int) override { this->noopDraw(); }
+ void onDrawIndexedIndirect(const GrBuffer*, size_t, int) override { this->noopDraw(); }
void onClear(const GrScissorState& scissor, std::array<float, 4>) override {
this->markRenderTargetDirty();
}
void onClearStencilClip(const GrScissorState& scissor, bool insideStencilMask) override {}
- void dummyDraw() {
+ void noopDraw() {
this->markRenderTargetDirty();
++fNumDraws;
}
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index a9770e7..7f079fe 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -39,8 +39,8 @@
const int maxDimension = SK_MaxS32 >> 2;
// TODO(mtklein): eliminate anything here that setInfo() has already checked.
- SkBitmap dummy;
- if (!dummy.setInfo(info, rowBytes)) {
+ SkBitmap b;
+ if (!b.setInfo(info, rowBytes)) {
return false;
}
diff --git a/src/pathops/SkPathWriter.cpp b/src/pathops/SkPathWriter.cpp
index b9c731c..842cd2a 100644
--- a/src/pathops/SkPathWriter.cpp
+++ b/src/pathops/SkPathWriter.cpp
@@ -222,8 +222,8 @@
// lengthen any partial contour adjacent to a simple segment
for (int pIndex = 0; pIndex < endCount; pIndex++) {
SkOpPtT* opPtT = const_cast<SkOpPtT*>(runs[pIndex]);
- SkPath dummy;
- SkPathWriter partWriter(dummy);
+ SkPath p;
+ SkPathWriter partWriter(p);
do {
if (!zero_or_one(opPtT->fT)) {
break;
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index 731327d..d2a1a9a 100644
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -1722,7 +1722,7 @@
return info;
}
-//Dummy representation of a Base64 encoded GUID from create_unique_font_name.
+//Placeholder representation of a Base64 encoded GUID from create_unique_font_name.
#define BASE64_GUID_ID "XXXXXXXXXXXXXXXXXXXXXXXX"
//Length of GUID representation from create_id, including nullptr terminator.
#define BASE64_GUID_ID_LEN SK_ARRAY_COUNT(BASE64_GUID_ID)
diff --git a/src/ports/SkFontMgr_win_dw.cpp b/src/ports/SkFontMgr_win_dw.cpp
index 8b04c32..1ff23d1 100644
--- a/src/ports/SkFontMgr_win_dw.cpp
+++ b/src/ports/SkFontMgr_win_dw.cpp
@@ -172,10 +172,10 @@
}
fHasNext = false;
- UINT32 dummy = 0;
+ UINT32 fontFileReferenceKey = 0;
HR(fFactory->CreateCustomFontFileReference(
- &dummy, //cannot be nullptr
- sizeof(dummy), //even if this is 0
+ &fontFileReferenceKey, //cannot be nullptr
+ sizeof(fontFileReferenceKey), //even if this is 0
fFontFileLoader.get(),
&fCurrentFile));
diff --git a/src/shaders/gradients/SkGradientShader.cpp b/src/shaders/gradients/SkGradientShader.cpp
index 993fde6..1c2602c 100644
--- a/src/shaders/gradients/SkGradientShader.cpp
+++ b/src/shaders/gradients/SkGradientShader.cpp
@@ -139,7 +139,7 @@
/* Note: we let the caller skip the first and/or last position.
i.e. pos[0] = 0.3, pos[1] = 0.7
- In these cases, we insert dummy entries to ensure that the final data
+ In these cases, we insert entries to ensure that the final data
will be bracketed by [0, 1].
i.e. our_pos[0] = 0, our_pos[1] = 0.3, our_pos[2] = 0.7, our_pos[3] = 1
@@ -149,13 +149,13 @@
fColorCount = 4
*/
fColorCount = desc.fCount;
- // check if we need to add in dummy start and/or end position/colors
- bool dummyFirst = false;
- bool dummyLast = false;
+ // check if we need to add in start and/or end position/colors
+ bool needsFirst = false;
+ bool needsLast = false;
if (desc.fPos) {
- dummyFirst = desc.fPos[0] != 0;
- dummyLast = desc.fPos[desc.fCount - 1] != SK_Scalar1;
- fColorCount += dummyFirst + dummyLast;
+ needsFirst = desc.fPos[0] != 0;
+ needsLast = desc.fPos[desc.fCount - 1] != SK_Scalar1;
+ fColorCount += needsFirst + needsLast;
}
size_t storageSize = fColorCount * (sizeof(SkColor4f) + (desc.fPos ? sizeof(SkScalar) : 0));
@@ -165,14 +165,14 @@
// Now copy over the colors, adding the dummies as needed
SkColor4f* origColors = fOrigColors4f;
- if (dummyFirst) {
+ if (needsFirst) {
*origColors++ = desc.fColors[0];
}
for (int i = 0; i < desc.fCount; ++i) {
origColors[i] = desc.fColors[i];
fColorsAreOpaque = fColorsAreOpaque && (desc.fColors[i].fA == 1);
}
- if (dummyLast) {
+ if (needsLast) {
origColors += desc.fCount;
*origColors = desc.fColors[desc.fCount - 1];
}
@@ -182,8 +182,8 @@
SkScalar* origPosPtr = fOrigPos;
*origPosPtr++ = prev; // force the first pos to 0
- int startIndex = dummyFirst ? 0 : 1;
- int count = desc.fCount + dummyLast;
+ int startIndex = needsFirst ? 0 : 1;
+ int count = desc.fCount + needsLast;
bool uniformStops = true;
const SkScalar uniformStep = desc.fPos[startIndex] - prev;
@@ -369,7 +369,7 @@
ctx->ts = alloc->makeArray<float>(fColorCount+1);
- // Remove the dummy stops inserted by SkGradientShaderBase::SkGradientShaderBase
+ // Remove the default stops inserted by SkGradientShaderBase::SkGradientShaderBase
// because they are naturally handled by the search method.
int firstStop;
int lastStop;
@@ -558,7 +558,7 @@
// ix -= (t >= stop) ? -1 : 0
ix -= (t >= uniformF(stop));
}
- // TODO: we could skip any of the dummy stops GradientShaderBase's ctor added
+ // TODO: we could skip any of the default stops GradientShaderBase's ctor added
// to ensure the full [0,1] span is covered. This linear search doesn't need
// them for correctness, and it'd be up to two fewer stops to check.
// N.B. we do still need those stops for the fOrigPos == nullptr direct math path.
diff --git a/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp b/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp
index 26bba9b..1775f30 100644
--- a/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp
+++ b/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp
@@ -2016,10 +2016,10 @@
}
}
default: {
- // expr isn't actually an lvalue, create a dummy variable for it. This case happens due
- // to the need to store values in temporary variables during function calls (see
- // comments in getFunctionType); erroneous uses of rvalues as lvalues should have been
- // caught by IRGenerator
+ // expr isn't actually an lvalue, create a placeholder variable for it. This case
+ // happens due to the need to store values in temporary variables during function
+ // calls (see comments in getFunctionType); erroneous uses of rvalues as lvalues
+ // should have been caught by IRGenerator
SpvId result = this->nextId(nullptr);
SpvId pointerType = this->getPointerType(type, SpvStorageClassFunction);
this->writeInstruction(SpvOpVariable, pointerType, result, SpvStorageClassFunction,
diff --git a/src/utils/win/SkWGL.h b/src/utils/win/SkWGL.h
index 543ee4c..45cb8e1 100644
--- a/src/utils/win/SkWGL.h
+++ b/src/utils/win/SkWGL.h
@@ -13,10 +13,10 @@
#include "src/core/SkLeanWindows.h"
/**
- * Working with WGL extensions can be a pain. Among the reasons is that You must
+ * Working with WGL extensions can be a pain. Among the reasons is that you must
* have a GL context to get the proc addresses, but you want to use the procs to
- * create a context in the first place. So you have to create a dummy GL ctx to
- * get the proc addresses.
+ * create a context in the first place. So you have to create a placeholder GL
+ * ctx to get the proc addresses.
*
* This file helps by providing SkCreateWGLInterface(). It returns a struct of
* function pointers that it initializes. It also has a helper function to query
diff --git a/src/utils/win/SkWGL_win.cpp b/src/utils/win/SkWGL_win.cpp
index c42277d..5f12780 100644
--- a/src/utils/win/SkWGL_win.cpp
+++ b/src/utils/win/SkWGL_win.cpp
@@ -174,11 +174,11 @@
#define STR_LIT(X) #X
#endif
-#define DUMMY_CLASS STR_LIT("DummyClass")
+#define TEMP_CLASS STR_LIT("TempClass")
-HWND create_dummy_window() {
+HWND create_temp_window() {
HMODULE module = GetModuleHandle(nullptr);
- HWND dummy;
+ HWND wnd;
RECT windowRect;
windowRect.left = 0;
windowRect.right = 8;
@@ -196,7 +196,7 @@
wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
wc.hbrBackground = nullptr;
wc.lpszMenuName = nullptr;
- wc.lpszClassName = DUMMY_CLASS;
+ wc.lpszClassName = TEMP_CLASS;
if(!RegisterClass(&wc)) {
return 0;
@@ -207,28 +207,28 @@
style = WS_SYSMENU;
AdjustWindowRectEx(&windowRect, style, false, exStyle);
- if(!(dummy = CreateWindowEx(exStyle,
- DUMMY_CLASS,
- STR_LIT("DummyWindow"),
- WS_CLIPSIBLINGS | WS_CLIPCHILDREN | style,
- 0, 0,
- windowRect.right-windowRect.left,
- windowRect.bottom-windowRect.top,
- nullptr, nullptr,
- module,
- nullptr))) {
- UnregisterClass(DUMMY_CLASS, module);
+ if(!(wnd = CreateWindowEx(exStyle,
+ TEMP_CLASS,
+ STR_LIT("PlaceholderWindow"),
+ WS_CLIPSIBLINGS | WS_CLIPCHILDREN | style,
+ 0, 0,
+ windowRect.right-windowRect.left,
+ windowRect.bottom-windowRect.top,
+ nullptr, nullptr,
+ module,
+ nullptr))) {
+ UnregisterClass(TEMP_CLASS, module);
return nullptr;
}
- ShowWindow(dummy, SW_HIDE);
+ ShowWindow(wnd, SW_HIDE);
- return dummy;
+ return wnd;
}
-void destroy_dummy_window(HWND dummy) {
- DestroyWindow(dummy);
+void destroy_temp_window(HWND wnd) {
+ DestroyWindow(wnd);
HMODULE module = GetModuleHandle(nullptr);
- UnregisterClass(DUMMY_CLASS, module);
+ UnregisterClass(TEMP_CLASS, module);
}
}
@@ -256,25 +256,25 @@
HDC prevDC = wglGetCurrentDC();
HGLRC prevGLRC = wglGetCurrentContext();
- PIXELFORMATDESCRIPTOR dummyPFD;
+ PIXELFORMATDESCRIPTOR tempPFD;
- ZeroMemory(&dummyPFD, sizeof(dummyPFD));
- dummyPFD.nSize = sizeof(dummyPFD);
- dummyPFD.nVersion = 1;
- dummyPFD.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
- dummyPFD.iPixelType = PFD_TYPE_RGBA;
- dummyPFD.cColorBits = 32;
- dummyPFD.cDepthBits = 0;
- dummyPFD.cStencilBits = 8;
- dummyPFD.iLayerType = PFD_MAIN_PLANE;
- HWND dummyWND = create_dummy_window();
- if (dummyWND) {
- HDC dummyDC = GetDC(dummyWND);
- int dummyFormat = ChoosePixelFormat(dummyDC, &dummyPFD);
- SetPixelFormat(dummyDC, dummyFormat, &dummyPFD);
- HGLRC dummyGLRC = wglCreateContext(dummyDC);
- SkASSERT(dummyGLRC);
- wglMakeCurrent(dummyDC, dummyGLRC);
+ ZeroMemory(&tempPFD, sizeof(tempPFD));
+ tempPFD.nSize = sizeof(tempPFD);
+ tempPFD.nVersion = 1;
+ tempPFD.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
+ tempPFD.iPixelType = PFD_TYPE_RGBA;
+ tempPFD.cColorBits = 32;
+ tempPFD.cDepthBits = 0;
+ tempPFD.cStencilBits = 8;
+ tempPFD.iLayerType = PFD_MAIN_PLANE;
+ HWND tempWND = create_temp_window();
+ if (tempWND) {
+ HDC tempDC = GetDC(tempWND);
+ int tempFormat = ChoosePixelFormat(tempDC, &tempPFD);
+ SetPixelFormat(tempDC, tempFormat, &tempPFD);
+ HGLRC tempGLRC = wglCreateContext(tempDC);
+ SkASSERT(tempGLRC);
+ wglMakeCurrent(tempDC, tempGLRC);
#if defined(__clang__)
#pragma clang diagnostic push
@@ -296,9 +296,9 @@
#pragma clang diagnostic pop
#endif
- wglMakeCurrent(dummyDC, nullptr);
- wglDeleteContext(dummyGLRC);
- destroy_dummy_window(dummyWND);
+ wglMakeCurrent(tempDC, nullptr);
+ wglDeleteContext(tempGLRC);
+ destroy_temp_window(tempWND);
}
wglMakeCurrent(prevDC, prevGLRC);
diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp
index b2ba573..46ad89b 100644
--- a/src/xps/SkXPSDevice.cpp
+++ b/src/xps/SkXPSDevice.cpp
@@ -59,7 +59,7 @@
//make it clear when converting a scalar that this is what is wanted.
#define SkScalarToFLOAT(n) SkScalarToFloat(n)
-//Dummy representation of a GUID from createId.
+//Placeholder representation of a GUID from createId.
#define L_GUID_ID L"XXXXXXXXsXXXXsXXXXsXXXXsXXXXXXXXXXXX"
//Length of GUID representation from createId, including nullptr terminator.
#define GUID_ID_LEN SK_ARRAY_COUNT(L_GUID_ID)
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp
index f47011c..96ca821 100644
--- a/tests/CodecTest.cpp
+++ b/tests/CodecTest.cpp
@@ -701,7 +701,7 @@
}
DEF_TEST(Codec_pngChunkReader, r) {
- // Create a dummy bitmap. Use unpremul RGBA for libpng.
+ // Create a bitmap for hashing. Use unpremul RGBA for libpng.
SkBitmap bm;
const int w = 1;
const int h = 1;
diff --git a/tests/DeferredDisplayListTest.cpp b/tests/DeferredDisplayListTest.cpp
index 3eb239f..8f1e5b0 100644
--- a/tests/DeferredDisplayListTest.cpp
+++ b/tests/DeferredDisplayListTest.cpp
@@ -301,7 +301,7 @@
SkImageInfo imageInfo = SkImageInfo::Make({fWidth, fHeight},
{fColorType, kPremul_SkAlphaType, fColorSpace});
GrVkDrawableInfo vkInfo;
- // putting in a bunch of dummy values here
+ // putting in a bunch of placeholder values here
vkInfo.fSecondaryCommandBuffer = (VkCommandBuffer)1;
vkInfo.fColorAttachmentIndex = 0;
vkInfo.fCompatibleRenderPass = (VkRenderPass)1;
@@ -1167,7 +1167,7 @@
#ifdef SK_GL
-static sk_sp<SkPromiseImageTexture> dummy_fulfill_proc(void*) {
+static sk_sp<SkPromiseImageTexture> noop_fulfill_proc(void*) {
SkASSERT(0);
return nullptr;
}
@@ -1199,7 +1199,7 @@
kRGBA_8888_SkColorType,
kPremul_SkAlphaType,
/*color space*/nullptr,
- dummy_fulfill_proc,
+ noop_fulfill_proc,
/*release proc*/ nullptr,
/*context*/nullptr);
if (GR_GL_TEXTURE_2D != target && mipMapped == GrMipmapped::kYes) {
diff --git a/tests/DrawOpAtlasTest.cpp b/tests/DrawOpAtlasTest.cpp
index 5351030..fd4acd6 100644
--- a/tests/DrawOpAtlasTest.cpp
+++ b/tests/DrawOpAtlasTest.cpp
@@ -72,7 +72,7 @@
fMaxPages = maxPages;
}
-class DummyEvict : public GrDrawOpAtlas::EvictionCallback {
+class AssertOnEvict : public GrDrawOpAtlas::EvictionCallback {
public:
void evict(GrDrawOpAtlas::PlotLocator) override {
SkASSERT(0); // The unit test shouldn't exercise this code path
@@ -144,7 +144,7 @@
GrBackendFormat format = caps->getDefaultBackendFormat(GrColorType::kAlpha_8,
GrRenderable::kNo);
- DummyEvict evictor;
+ AssertOnEvict evictor;
GrDrawOpAtlas::GenerationCounter counter;
std::unique_ptr<GrDrawOpAtlas> atlas = GrDrawOpAtlas::Make(
diff --git a/tests/EncodeTest.cpp b/tests/EncodeTest.cpp
index c4a8b42..0d5ea8a 100644
--- a/tests/EncodeTest.cpp
+++ b/tests/EncodeTest.cpp
@@ -167,8 +167,8 @@
SkJpegEncoder::AlphaOption::kBlendOnBlack }) {
SkJpegEncoder::Options opts;
opts.fAlphaOption = alphaOption;
- SkNullWStream dummy;
- if (!SkJpegEncoder::Encode(&dummy, bm.pixmap(), opts)) {
+ SkNullWStream ignored;
+ if (!SkJpegEncoder::Encode(&ignored, bm.pixmap(), opts)) {
REPORTER_ASSERT(r, ct == kARGB_4444_SkColorType
&& alphaOption == SkJpegEncoder::AlphaOption::kBlendOnBlack);
}
diff --git a/tests/GrMeshTest.cpp b/tests/GrMeshTest.cpp
index 27d95fd..818bd2e 100644
--- a/tests/GrMeshTest.cpp
+++ b/tests/GrMeshTest.cpp
@@ -328,22 +328,22 @@
GrDrawIndexedIndirectWriter indexedIndirectWriter;
if (indexed) {
// Make helper->fDrawIndirectBufferOffset nonzero.
- sk_sp<const GrBuffer> dummyBuff;
- size_t dummyOffset;
+ sk_sp<const GrBuffer> ignoredBuff;
+ size_t ignoredOffset;
// Make a superfluous call to makeDrawIndirectSpace in order to test
// "offsetInBytes!=0" for the actual call to makeDrawIndexedIndirectSpace.
- helper->target()->makeDrawIndirectSpace(29, &dummyBuff, &dummyOffset);
+ helper->target()->makeDrawIndirectSpace(29, &ignoredBuff, &ignoredOffset);
indexedIndirectWriter = helper->target()->makeDrawIndexedIndirectSpace(
kBoxCountY, &helper->fDrawIndirectBuffer,
&helper->fDrawIndirectBufferOffset);
} else {
// Make helper->fDrawIndirectBufferOffset nonzero.
- sk_sp<const GrBuffer> dummyBuff;
- size_t dummyOffset;
+ sk_sp<const GrBuffer> ignoredBuff;
+ size_t ignoredOffset;
// Make a superfluous call to makeDrawIndexedIndirectSpace in order to test
// "offsetInBytes!=0" for the actual call to makeDrawIndirectSpace.
- helper->target()->makeDrawIndexedIndirectSpace(7, &dummyBuff,
- &dummyOffset);
+ helper->target()->makeDrawIndexedIndirectSpace(7, &ignoredBuff,
+ &ignoredOffset);
indirectWriter = helper->target()->makeDrawIndirectSpace(
kBoxCountY, &helper->fDrawIndirectBuffer,
&helper->fDrawIndirectBufferOffset);
diff --git a/tests/GrStyledShapeTest.cpp b/tests/GrStyledShapeTest.cpp
index 998703c..895d482 100644
--- a/tests/GrStyledShapeTest.cpp
+++ b/tests/GrStyledShapeTest.cpp
@@ -1741,7 +1741,7 @@
Key exampleInvHairlineCaseKey;
make_key(&exampleInvHairlineCaseKey, exampleInvHairlineCase);
- // These are dummy initializations to suppress warnings.
+ // These initializations suppress warnings.
SkRRect queryRR = SkRRect::MakeEmpty();
SkPathDirection queryDir = SkPathDirection::kCW;
unsigned queryStart = ~0U;
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 6445f44..0321fbc 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -39,8 +39,6 @@
#include <cmath>
#include <memory>
-#define DUMMY_TEXT "DCT compessed stream."
-
template <typename T>
static SkString emit_to_string(T& obj) {
SkDynamicMemoryWStream buffer;
@@ -254,10 +252,10 @@
namespace {
-class DummyImageFilter : public SkImageFilter_Base {
+class TestImageFilter : public SkImageFilter_Base {
public:
- static sk_sp<DummyImageFilter> Make(bool visited = false) {
- return sk_sp<DummyImageFilter>(new DummyImageFilter(visited));
+ static sk_sp<TestImageFilter> Make(bool visited = false) {
+ return sk_sp<TestImageFilter>(new TestImageFilter(visited));
}
bool visited() const { return fVisited; }
@@ -270,18 +268,18 @@
}
private:
- SK_FLATTENABLE_HOOKS(DummyImageFilter)
- DummyImageFilter(bool visited) : INHERITED(nullptr, 0, nullptr), fVisited(visited) {}
+ SK_FLATTENABLE_HOOKS(TestImageFilter)
+ TestImageFilter(bool visited) : INHERITED(nullptr, 0, nullptr), fVisited(visited) {}
mutable bool fVisited;
using INHERITED = SkImageFilter_Base;
};
-sk_sp<SkFlattenable> DummyImageFilter::CreateProc(SkReadBuffer& buffer) {
+sk_sp<SkFlattenable> TestImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 0);
bool visited = buffer.readBool();
- return DummyImageFilter::Make(visited);
+ return TestImageFilter::Make(visited);
}
} // namespace
@@ -294,7 +292,7 @@
auto doc = SkPDF::MakeDocument(&stream);
SkCanvas* canvas = doc->beginPage(100.0f, 100.0f);
- sk_sp<DummyImageFilter> filter(DummyImageFilter::Make());
+ sk_sp<TestImageFilter> filter(TestImageFilter::Make());
// Filter just created; should be unvisited.
REPORTER_ASSERT(reporter, !filter->visited());
diff --git a/tests/PathOpsOpTest.cpp b/tests/PathOpsOpTest.cpp
index 7c0aa28..9167fb4 100644
--- a/tests/PathOpsOpTest.cpp
+++ b/tests/PathOpsOpTest.cpp
@@ -9615,7 +9615,6 @@
two.moveTo(0, 0);
two.lineTo(0, 50);
two.lineTo(4.29497e+09f, 50);
- SkPath dummy;
testPathOpFuzz(reporter, one, two, kIntersect_SkPathOp, filename);
}
@@ -10081,7 +10080,6 @@
path.cubicTo(SkBits2Float(0x4a4a4a4a), SkBits2Float(0x4a4a4a4a), SkBits2Float(0x2ba1a14a), SkBits2Float(0x4e4a08ff), SkBits2Float(0x4a4a4a4a), SkBits2Float(0xa1a181ff)); // 3.31432e+06f, 3.31432e+06f, 1.14845e-12f, 8.47397e+08f, 3.31432e+06f, -1.09442e-18f
SkPath path2(path);
- SkPath dummy;
testPathOpFuzz(reporter, path1, path2, (SkPathOp)4, filename);
}
diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp
index 1d75431..5b8d203 100644
--- a/tests/PrimitiveProcessorTest.cpp
+++ b/tests/PrimitiveProcessorTest.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-// This is a GPU-backend specific test. It relies on static intializers to work
+// This is a GPU-backend specific test. It relies on static initializers to work
#include <memory>
@@ -33,7 +33,7 @@
public:
DEFINE_OP_CLASS_ID
- const char* name() const override { return "Dummy Op"; }
+ const char* name() const override { return "Test Op"; }
static GrOp::Owner Make(GrRecordingContext* rContext, int numAttribs) {
return GrOp::Make<Op>(rContext, numAttribs);
@@ -71,7 +71,7 @@
});
}
- const char* name() const override { return "Dummy GP"; }
+ const char* name() const override { return "Test GP"; }
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const override {
class GLSLGP : public GrGLSLGeometryProcessor {
diff --git a/tests/ProgramsTest.cpp b/tests/ProgramsTest.cpp
index 8eedfb2..9c86bef 100644
--- a/tests/ProgramsTest.cpp
+++ b/tests/ProgramsTest.cpp
@@ -34,7 +34,7 @@
#endif
/*
- * A dummy processor which just tries to insert a massive key and verify that it can retrieve the
+ * A simple processor which just tries to insert a massive key and verify that it can retrieve the
* whole thing correctly
*/
static const uint32_t kMaxKeySize = 1024;
@@ -249,13 +249,13 @@
GrProcessorTestData::ViewInfo views[2];
- // setup dummy textures
+ // setup arbitrary textures
GrMipmapped mipMapped = GrMipmapped(caps->mipmapSupport());
{
- static constexpr SkISize kDummyDims = {34, 18};
+ static constexpr SkISize kDims = {34, 18};
const GrBackendFormat format = caps->getDefaultBackendFormat(GrColorType::kRGBA_8888,
GrRenderable::kYes);
- auto proxy = proxyProvider->createProxy(format, kDummyDims, GrRenderable::kYes, 1,
+ auto proxy = proxyProvider->createProxy(format, kDims, GrRenderable::kYes, 1,
mipMapped, SkBackingFit::kExact, SkBudgeted::kNo,
GrProtected::kNo, GrInternalSurfaceFlags::kNone);
GrSwizzle swizzle = caps->getReadSwizzle(format, GrColorType::kRGBA_8888);
@@ -263,10 +263,10 @@
GrColorType::kRGBA_8888, kPremul_SkAlphaType};
}
{
- static constexpr SkISize kDummyDims = {16, 22};
+ static constexpr SkISize kDims = {16, 22};
const GrBackendFormat format = caps->getDefaultBackendFormat(GrColorType::kAlpha_8,
GrRenderable::kNo);
- auto proxy = proxyProvider->createProxy(format, kDummyDims, GrRenderable::kNo, 1, mipMapped,
+ auto proxy = proxyProvider->createProxy(format, kDims, GrRenderable::kNo, 1, mipMapped,
SkBackingFit::kExact, SkBudgeted::kNo,
GrProtected::kNo, GrInternalSurfaceFlags::kNone);
GrSwizzle swizzle = caps->getReadSwizzle(format, GrColorType::kAlpha_8);
@@ -275,7 +275,7 @@
}
if (!std::get<0>(views[0]) || !std::get<0>(views[1])) {
- SkDebugf("Could not allocate dummy textures");
+ SkDebugf("Could not allocate textures for test");
return false;
}
diff --git a/tests/RRectInPathTest.cpp b/tests/RRectInPathTest.cpp
index 7eb5459..a89d884 100644
--- a/tests/RRectInPathTest.cpp
+++ b/tests/RRectInPathTest.cpp
@@ -100,14 +100,14 @@
}
static void test_undetected_paths(skiatest::Reporter* reporter) {
- // We use a dummy path to get the exact conic weight used by SkPath for a circular arc. This
+ // We first get the exact conic weight used by SkPath for a circular arc. This
// allows our local, hand-crafted, artisanal round rect paths below to exactly match the
// factory made corporate paths produced by SkPath.
- SkPath dummyPath;
- dummyPath.addCircle(0, 0, 10);
- REPORTER_ASSERT(reporter, SkPath::kMove_Verb == SkPathPriv::VerbData(dummyPath)[0]);
- REPORTER_ASSERT(reporter, SkPath::kConic_Verb == SkPathPriv::VerbData(dummyPath)[1]);
- const SkScalar weight = SkPathPriv::ConicWeightData(dummyPath)[0];
+ SkPath exactPath;
+ exactPath.addCircle(0, 0, 10);
+ REPORTER_ASSERT(reporter, SkPath::kMove_Verb == SkPathPriv::VerbData(exactPath)[0]);
+ REPORTER_ASSERT(reporter, SkPath::kConic_Verb == SkPathPriv::VerbData(exactPath)[1]);
+ const SkScalar weight = SkPathPriv::ConicWeightData(exactPath)[0];
SkPath path;
path.moveTo(0, 62.5f);
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index 3115031..b104ea2 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -1165,8 +1165,8 @@
}
REPORTER_ASSERT(reporter, img != nullptr);
- char dummyPixel = 0; // just need a valid address (not a valid size)
- SkPixmap pmap = { info, &dummyPixel, rowBytes };
+ char tempPixel = 0; // just need a valid address (not a valid size)
+ SkPixmap pmap = { info, &tempPixel, rowBytes };
img = SkImage::MakeFromRaster(pmap, nullptr, nullptr);
REPORTER_ASSERT(reporter, img != nullptr);
}
diff --git a/tests/TestUtils.cpp b/tests/TestUtils.cpp
index 86c908a..7a269e9 100644
--- a/tests/TestUtils.cpp
+++ b/tests/TestUtils.cpp
@@ -160,8 +160,8 @@
const float tolRGBA[4],
std::function<ComparePixmapsErrorReporter>& error) {
if (a.dimensions() != b.dimensions()) {
- static constexpr float kDummyDiffs[4] = {};
- error(-1, -1, kDummyDiffs);
+ static constexpr float kEmptyDiffs[4] = {};
+ error(-1, -1, kEmptyDiffs);
return false;
}