Skip to content

Commit

Permalink
Remove ableist language
Browse files Browse the repository at this point in the history
Change-Id: Ie9ef50a14906c9350adbe16720291dca944ad7fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418738
Commit-Queue: Kevin Lubick <[email protected]>
Reviewed-by: John Stiles <[email protected]>
Reviewed-by: Jorge Betancourt <[email protected]>
  • Loading branch information
kjlubick authored and Skia Commit-Bot committed Jun 16, 2021
1 parent 5837aad commit be03ef1
Show file tree
Hide file tree
Showing 49 changed files with 161 additions and 172 deletions.
4 changes: 2 additions & 2 deletions experimental/ffmpeg/SkVideoDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ sk_sp<SkImage> SkVideoDecoder::convertFrame(const AVFrame* frame) {
}

sk_sp<SkImage> SkVideoDecoder::nextImage(double* timeStamp) {
double dummyTimeStampStorage = 0;
double defaultTimeStampStorage = 0;
if (!timeStamp) {
timeStamp = &dummyTimeStampStorage;
timeStamp = &defaultTimeStampStorage;
}

if (fFormatCtx == nullptr) {
Expand Down
4 changes: 2 additions & 2 deletions gm/b_119394958.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ DEF_SIMPLE_GM(b_119394958, canvas, 100, 100) {
// 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);
Expand Down
2 changes: 1 addition & 1 deletion gm/blurrect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static void draw_donut_skewed(SkCanvas* canvas, const SkRect& r, const SkPaint&
}

/*
* 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] = {
Expand Down
2 changes: 1 addition & 1 deletion gm/blurroundrect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down
2 changes: 1 addition & 1 deletion gm/coloremoji.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 } };
Expand Down
4 changes: 2 additions & 2 deletions include/core/SkData.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class SK_API SkData final : public SkNVRefCnt<SkData> {
* 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);
}

/**
Expand Down Expand Up @@ -174,7 +174,7 @@ class SK_API SkData final : public SkNVRefCnt<SkData> {
// 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;
};
Expand Down
3 changes: 1 addition & 2 deletions include/core/SkRect.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,7 @@ struct SK_API SkIRect {
@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.
Expand Down
2 changes: 1 addition & 1 deletion include/gpu/GrBackendSurfaceMutableState.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class SK_API GrBackendSurfaceMutableState {
#endif

union {
char fDummy;
char fPlaceholder;
#ifdef SK_VULKAN
GrVkSharedImageInfo fVkState;
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/private/GrSingleOwner.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class GrSingleOwner {
};
#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
6 changes: 3 additions & 3 deletions modules/skottie/src/SkottieTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ DEF_TEST(Skottie_Properties, reporter) {
};

// 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 {}
Expand Down Expand Up @@ -250,7 +250,7 @@ DEF_TEST(Skottie_Properties, reporter) {
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>();

Expand Down
2 changes: 1 addition & 1 deletion modules/skottie/src/text/RangeSelector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ T ParseEnum(const TArray& arr, const skjson::Value& jenum,
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,
Expand Down
6 changes: 3 additions & 3 deletions src/codec/SkIcoCodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ std::unique_ptr<SkCodec> SkIcoCodec::MakeFromStream(std::unique_ptr<SkStream> st

// 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) {
Expand Down
4 changes: 2 additions & 2 deletions src/core/SkColorFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ SkPMColor4f SkColorFilterBase::onFilterColor4f(const SkPMColor4f& color,
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)) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/SkData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ sk_sp<SkData> SkData::PrivateNewWithCopy(const void* srcOrNull, size_t length) {
return data;
}

void SkData::DummyReleaseProc(const void*, void*) {}
void SkData::NoopReleaseProc(const void*, void*) {}

///////////////////////////////////////////////////////////////////////////////

Expand Down
4 changes: 2 additions & 2 deletions src/core/SkOverdrawCanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ void SkOverdrawCanvas::onDrawImageLattice2(const SkImage* image, const Lattice&
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 {
Expand Down
2 changes: 1 addition & 1 deletion src/core/SkReadBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ sk_sp<SkImage> SkReadBuffer::readImage_preV78() {
#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();
Expand Down
2 changes: 1 addition & 1 deletion src/core/SkVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2966,7 +2966,7 @@ namespace skvm {
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
Expand Down
2 changes: 1 addition & 1 deletion src/core/SkVMBlitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ namespace {
}
// 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);
Expand Down
6 changes: 0 additions & 6 deletions src/gpu/GrProcessorUnitTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ class GrGeometryProcessor;

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.
Expand Down
2 changes: 1 addition & 1 deletion src/gpu/GrRenderTargetProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class GrRenderTargetProxy : virtual public GrSurfaceProxy {
//
// 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;
};
Expand Down
4 changes: 2 additions & 2 deletions src/gpu/GrSPIRVUniformHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,6 @@ void GrSPIRVUniformHandler::appendUniformDecls(GrShaderFlags visibility, SkStrin
}

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(&currentOffset, kFloat_GrSLType, 0);
}
4 changes: 2 additions & 2 deletions src/gpu/gl/GrGLGpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class GrGLGpu final : public GrGpu {
// 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);
Expand Down Expand Up @@ -640,7 +640,7 @@ class GrGLGpu final : public GrGpu {
/**
* 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.
Expand Down
4 changes: 2 additions & 2 deletions src/gpu/glsl/GrGLSLFragmentShaderBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class GrGLSLFPFragmentBuilder : virtual public GrGLSLShaderBuilder {
/** Appease the compiler; the derived class initializes GrGLSLShaderBuilder. */
GrGLSLFPFragmentBuilder() : GrGLSLShaderBuilder(nullptr) {
// Suppress unused warning error
(void) fDummyPadding;
(void) fPadding;
}

enum class ScopeFlags {
Expand Down Expand Up @@ -61,7 +61,7 @@ class GrGLSLFPFragmentBuilder : virtual public GrGLSLShaderBuilder {
// 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);
Expand Down
2 changes: 1 addition & 1 deletion src/gpu/glsl/GrGLSLShaderBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ GrGLSLShaderBuilder::GrGLSLShaderBuilder(GrGLSLProgramBuilder* program)
, 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();
}
Expand Down
6 changes: 3 additions & 3 deletions src/gpu/gradients/GrClampedGradientEffect.fp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/gpu/gradients/GrGradientShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static std::unique_ptr<GrFragmentProcessor> make_colorizer(const SkPMColor4f* co
// 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]);
Expand Down
14 changes: 7 additions & 7 deletions src/gpu/mock/GrMockOpsRenderPass.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ class GrMockOpsRenderPass : public GrOpsRenderPass {
}
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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/image/SkImage_Raster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class SkImage_Raster : public SkImage_Base {
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;
}

Expand Down
4 changes: 2 additions & 2 deletions src/pathops/SkPathWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ void SkPathWriter::assemble() {
// 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;
Expand Down
2 changes: 1 addition & 1 deletion src/ports/SkFontHost_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@ std::unique_ptr<SkAdvancedTypefaceMetrics> LogFontTypeface::onGetAdvancedMetrics
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)
Expand Down
6 changes: 3 additions & 3 deletions src/ports/SkFontMgr_win_dw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ SK_STDMETHODIMP StreamFontFileEnumerator::MoveNext(BOOL* hasCurrentFile) {
}
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));

Expand Down
Loading

0 comments on commit be03ef1

Please sign in to comment.