: fShift(shift)
, fStroke(stroke) {}
- SkString fName;
const char* computeName(const char root[]) {
fName.printf("%s_%d", root, fShift);
if (fStroke > 0) {
bool isVisual() override { return true; }
protected:
+ SkString fName;
+
virtual void drawThisRect(SkCanvas* c, const SkRect& r, const SkPaint& p) {
c->drawRect(r, p);
}
}
private:
- SkString fName;
SkBlendMode fMode;
typedef RectBench INHERITED;
}
private:
- SkString fName;
-
typedef RectBench INHERITED;
};
class PointsBench : public RectBench {
public:
SkCanvas::PointMode fMode;
- const char* fName;
PointsBench(SkCanvas::PointMode mode, const char* name)
: RectBench(2)
}
}
}
- const char* onGetName() override { return fName; }
+ const char* onGetName() override { return fName.c_str(); }
};
/*******************************************************************************
KMaskShader
};
SkCanvas::PointMode fMode;
- const char* fName;
BlitMaskBench(SkCanvas::PointMode mode,
BlitMaskBench::kMaskType type, const char* name) :
}
}
}
- const char* onGetName() override { return fName; }
+ const char* onGetName() override { return fName.c_str(); }
private:
typedef RectBench INHERITED;
kMaskType _type;
* For our purposes, "Mixed Sampled" means the stencil buffer is multisampled but the color
* buffer is not.
*/
- bool isMixedSampled() const { return fFlags & GrRenderTarget::Flags::kMixedSampled; }
+ bool isMixedSampled() const { return fRenderTargetFlags & GrRenderTarget::Flags::kMixedSampled; }
/**
* "Unified Sampled" means the stencil and color buffers are both multisampled.
// we know the newly created render target will be internal, we are able to precompute what the
// flags will ultimately end up being. In the wrapped case we just copy the wrapped
// rendertarget's info here.
- GrRenderTarget::Flags fFlags;
+ GrRenderTarget::Flags fRenderTargetFlags;
typedef GrSurfaceProxy INHERITED;
};
GrRenderTargetProxy::GrRenderTargetProxy(const GrCaps& caps, const GrSurfaceDesc& desc,
SkBackingFit fit, SkBudgeted budgeted, uint32_t flags)
: INHERITED(desc, fit, budgeted, flags)
- , fFlags(GrRenderTarget::Flags::kNone) {
+ , fRenderTargetFlags(GrRenderTarget::Flags::kNone) {
// Since we know the newly created render target will be internal, we are able to precompute
// what the flags will ultimately end up being.
if (caps.usesMixedSamples() && fDesc.fSampleCnt > 0) {
- fFlags |= GrRenderTarget::Flags::kMixedSampled;
+ fRenderTargetFlags |= GrRenderTarget::Flags::kMixedSampled;
}
if (caps.maxWindowRectangles() > 0) {
- fFlags |= GrRenderTarget::Flags::kWindowRectsSupport;
+ fRenderTargetFlags |= GrRenderTarget::Flags::kWindowRectsSupport;
}
}
// Wrapped version
GrRenderTargetProxy::GrRenderTargetProxy(sk_sp<GrSurface> surf)
: INHERITED(std::move(surf), SkBackingFit::kExact)
- , fFlags(fTarget->asRenderTarget()->renderTargetPriv().flags()) {
+ , fRenderTargetFlags(fTarget->asRenderTarget()->renderTargetPriv().flags()) {
}
int GrRenderTargetProxy::maxWindowRectangles(const GrCaps& caps) const {
- return (fFlags & GrRenderTarget::Flags::kWindowRectsSupport) ? caps.maxWindowRectangles() : 0;
+ return (fRenderTargetFlags & GrRenderTarget::Flags::kWindowRectsSupport)
+ ? caps.maxWindowRectangles()
+ : 0;
}
GrRenderTarget* GrRenderTargetProxy::instantiate(GrTextureProvider* texProvider) {
}
// Check that our a priori computation matched the ultimate reality
- SkASSERT(fFlags == surf->asRenderTarget()->renderTargetPriv().flags());
+ SkASSERT(fRenderTargetFlags == surf->asRenderTarget()->renderTargetPriv().flags());
return surf->asRenderTarget();
}
///////////////////////////////////////////////////////////////////////////////
GrRenderTarget::Flags GrRenderTargetProxy::testingOnly_getFlags() const {
- return fFlags;
+ return fRenderTargetFlags;
}
///////////////////////////////////////////////////////////////////////////////