Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9900 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
3cc820c050
commit
1842adf013
@ -81,7 +81,7 @@ public:
|
|||||||
* as 'maskRect' but be translated to the upper-left corner of the mask
|
* as 'maskRect' but be translated to the upper-left corner of the mask
|
||||||
* (i.e., (maskRect.fLeft, maskRect.fTop) appears at (0, 0) in the mask).
|
* (i.e., (maskRect.fLeft, maskRect.fTop) appears at (0, 0) in the mask).
|
||||||
*/
|
*/
|
||||||
virtual bool canFilterMaskGPU(const SkRect& devBounds,
|
virtual bool canFilterMaskGPU(const SkRect& devBounds,
|
||||||
const SkIRect& clipBounds,
|
const SkIRect& clipBounds,
|
||||||
const SkMatrix& ctm,
|
const SkMatrix& ctm,
|
||||||
SkRect* maskRect) const;
|
SkRect* maskRect) const;
|
||||||
@ -95,8 +95,8 @@ public:
|
|||||||
* on success. 'maskRect' should be the rect returned from canFilterMaskGPU.
|
* on success. 'maskRect' should be the rect returned from canFilterMaskGPU.
|
||||||
*/
|
*/
|
||||||
bool filterMaskGPU(GrContext* context,
|
bool filterMaskGPU(GrContext* context,
|
||||||
const SkBitmap& src,
|
const SkBitmap& src,
|
||||||
const SkRect& maskRect,
|
const SkRect& maskRect,
|
||||||
SkBitmap* result) const;
|
SkBitmap* result) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -104,8 +104,8 @@ public:
|
|||||||
* the filtering capabilities. Setting 'canOverwriteSrc' can allow some
|
* the filtering capabilities. Setting 'canOverwriteSrc' can allow some
|
||||||
* filters to skip the allocation of an additional texture.
|
* filters to skip the allocation of an additional texture.
|
||||||
*/
|
*/
|
||||||
virtual bool filterMaskGPU(GrTexture* src,
|
virtual bool filterMaskGPU(GrTexture* src,
|
||||||
const SkRect& maskRect,
|
const SkRect& maskRect,
|
||||||
GrTexture** result,
|
GrTexture** result,
|
||||||
bool canOverwriteSrc) const;
|
bool canOverwriteSrc) const;
|
||||||
#endif
|
#endif
|
||||||
|
@ -277,7 +277,7 @@ bool SkMaskFilter::asNewEffect(GrEffectRef** effect, GrTexture*) const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SkMaskFilter::canFilterMaskGPU(const SkRect& devBounds,
|
bool SkMaskFilter::canFilterMaskGPU(const SkRect& devBounds,
|
||||||
const SkIRect& clipBounds,
|
const SkIRect& clipBounds,
|
||||||
const SkMatrix& ctm,
|
const SkMatrix& ctm,
|
||||||
SkRect* maskRect) const {
|
SkRect* maskRect) const {
|
||||||
@ -285,8 +285,8 @@ bool SkMaskFilter::canFilterMaskGPU(const SkRect& devBounds,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SkMaskFilter::filterMaskGPU(GrContext* context,
|
bool SkMaskFilter::filterMaskGPU(GrContext* context,
|
||||||
const SkBitmap& srcBM,
|
const SkBitmap& srcBM,
|
||||||
const SkRect& maskRect,
|
const SkRect& maskRect,
|
||||||
SkBitmap* resultBM) const {
|
SkBitmap* resultBM) const {
|
||||||
SkAutoTUnref<GrTexture> src;
|
SkAutoTUnref<GrTexture> src;
|
||||||
bool canOverwriteSrc = false;
|
bool canOverwriteSrc = false;
|
||||||
@ -299,7 +299,7 @@ bool SkMaskFilter::filterMaskGPU(GrContext* context,
|
|||||||
desc.fHeight = srcBM.height();
|
desc.fHeight = srcBM.height();
|
||||||
|
|
||||||
// TODO: right now this is exact to guard against out of bounds reads
|
// TODO: right now this is exact to guard against out of bounds reads
|
||||||
// by the filter code. More thought needs to be devoted to the
|
// by the filter code. More thought needs to be devoted to the
|
||||||
// "filterMaskGPU" contract and then enforced (i.e., clamp the code
|
// "filterMaskGPU" contract and then enforced (i.e., clamp the code
|
||||||
// in "filterMaskGPU" so it never samples beyond maskRect)
|
// in "filterMaskGPU" so it never samples beyond maskRect)
|
||||||
GrAutoScratchTexture ast(context, desc, GrContext::kExact_ScratchTexMatch);
|
GrAutoScratchTexture ast(context, desc, GrContext::kExact_ScratchTexMatch);
|
||||||
@ -331,8 +331,8 @@ bool SkMaskFilter::filterMaskGPU(GrContext* context,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SkMaskFilter::filterMaskGPU(GrTexture* src,
|
bool SkMaskFilter::filterMaskGPU(GrTexture* src,
|
||||||
const SkRect& maskRect,
|
const SkRect& maskRect,
|
||||||
GrTexture** result,
|
GrTexture** result,
|
||||||
bool canOverwriteSrc) const {
|
bool canOverwriteSrc) const {
|
||||||
return false;
|
return false;
|
||||||
|
@ -32,12 +32,12 @@ public:
|
|||||||
SkIPoint* margin) const SK_OVERRIDE;
|
SkIPoint* margin) const SK_OVERRIDE;
|
||||||
|
|
||||||
#if SK_SUPPORT_GPU
|
#if SK_SUPPORT_GPU
|
||||||
virtual bool canFilterMaskGPU(const SkRect& devBounds,
|
virtual bool canFilterMaskGPU(const SkRect& devBounds,
|
||||||
const SkIRect& clipBounds,
|
const SkIRect& clipBounds,
|
||||||
const SkMatrix& ctm,
|
const SkMatrix& ctm,
|
||||||
SkRect* maskRect) const SK_OVERRIDE;
|
SkRect* maskRect) const SK_OVERRIDE;
|
||||||
virtual bool filterMaskGPU(GrTexture* src,
|
virtual bool filterMaskGPU(GrTexture* src,
|
||||||
const SkRect& maskRect,
|
const SkRect& maskRect,
|
||||||
GrTexture** result,
|
GrTexture** result,
|
||||||
bool canOverwriteSrc) const;
|
bool canOverwriteSrc) const;
|
||||||
#endif
|
#endif
|
||||||
@ -389,11 +389,11 @@ bool SkBlurMaskFilterImpl::canFilterMaskGPU(const SkRect& srcBounds,
|
|||||||
clipRect.outset(SkFloatToScalar(sigma3), SkFloatToScalar(sigma3));
|
clipRect.outset(SkFloatToScalar(sigma3), SkFloatToScalar(sigma3));
|
||||||
srcRect.intersect(clipRect);
|
srcRect.intersect(clipRect);
|
||||||
*maskRect = srcRect;
|
*maskRect = srcRect;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src,
|
bool SkBlurMaskFilterImpl::filterMaskGPU(GrTexture* src,
|
||||||
const SkRect& maskRect,
|
const SkRect& maskRect,
|
||||||
GrTexture** result,
|
GrTexture** result,
|
||||||
bool canOverwriteSrc) const {
|
bool canOverwriteSrc) const {
|
||||||
SkRect clipRect = SkRect::MakeWH(maskRect.width(), maskRect.height());
|
SkRect clipRect = SkRect::MakeWH(maskRect.width(), maskRect.height());
|
||||||
|
@ -984,7 +984,7 @@ void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath,
|
|||||||
|
|
||||||
GrAutoScratchTexture mask;
|
GrAutoScratchTexture mask;
|
||||||
|
|
||||||
if (create_mask_GPU(fContext, maskRect, *devPathPtr, stroke,
|
if (create_mask_GPU(fContext, maskRect, *devPathPtr, stroke,
|
||||||
grPaint.isAntiAlias(), &mask)) {
|
grPaint.isAntiAlias(), &mask)) {
|
||||||
GrTexture* filtered;
|
GrTexture* filtered;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user