зеркало из https://github.com/mozilla/moz-skia.git
Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6829 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
4ef4f4a596
Коммит
a7aedfec9e
|
@ -23,7 +23,7 @@ public:
|
||||||
SkRect fRects[N];
|
SkRect fRects[N];
|
||||||
SkColor fColors[N];
|
SkColor fColors[N];
|
||||||
|
|
||||||
RectBench(void* param, int shift, int stroke = 0)
|
RectBench(void* param, int shift, int stroke = 0)
|
||||||
: INHERITED(param)
|
: INHERITED(param)
|
||||||
, fShift(shift)
|
, fShift(shift)
|
||||||
, fStroke(stroke) {
|
, fStroke(stroke) {
|
||||||
|
@ -185,7 +185,7 @@ protected:
|
||||||
// Draw small aa rects in a grid across the screen
|
// Draw small aa rects in a grid across the screen
|
||||||
for (SkScalar y = SK_ScalarHalf; y < H; y += SkIntToScalar(2)) {
|
for (SkScalar y = SK_ScalarHalf; y < H; y += SkIntToScalar(2)) {
|
||||||
for (SkScalar x = SK_ScalarHalf; x < W; x += SkIntToScalar(2)) {
|
for (SkScalar x = SK_ScalarHalf; x < W; x += SkIntToScalar(2)) {
|
||||||
r.set(x, y,
|
r.set(x, y,
|
||||||
x+SkFloatToScalar(1.5f), y+SkFloatToScalar(1.5f));
|
x+SkFloatToScalar(1.5f), y+SkFloatToScalar(1.5f));
|
||||||
canvas->drawRect(r, paint);
|
canvas->drawRect(r, paint);
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,5 +198,5 @@ private:
|
||||||
DEF_GM( return new SimpleClipGM(SimpleClipGM::kRect_GeomType); )
|
DEF_GM( return new SimpleClipGM(SimpleClipGM::kRect_GeomType); )
|
||||||
DEF_GM( return new SimpleClipGM(SimpleClipGM::kPath_GeomType); )
|
DEF_GM( return new SimpleClipGM(SimpleClipGM::kPath_GeomType); )
|
||||||
DEF_GM( return new SimpleClipGM(SimpleClipGM::kAAClip_GeomType); )
|
DEF_GM( return new SimpleClipGM(SimpleClipGM::kAAClip_GeomType); )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,12 +198,12 @@ bool SkDashPathEffect::filterPath(SkPath* dst, const SkPath& src,
|
||||||
addedSegment = true;
|
addedSegment = true;
|
||||||
|
|
||||||
if (specialLine) {
|
if (specialLine) {
|
||||||
lineRec.addSegment(SkDoubleToScalar(distance),
|
lineRec.addSegment(SkDoubleToScalar(distance),
|
||||||
SkDoubleToScalar(distance + dlen),
|
SkDoubleToScalar(distance + dlen),
|
||||||
dst);
|
dst);
|
||||||
} else {
|
} else {
|
||||||
meas.getSegment(SkDoubleToScalar(distance),
|
meas.getSegment(SkDoubleToScalar(distance),
|
||||||
SkDoubleToScalar(distance + dlen),
|
SkDoubleToScalar(distance + dlen),
|
||||||
dst, true);
|
dst, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -522,14 +522,14 @@ GrTexture* GrClipMaskManager::createAlphaClipMask(int32_t clipStackGenID,
|
||||||
if (NULL == temp.texture()) {
|
if (NULL == temp.texture()) {
|
||||||
fAACache.reset();
|
fAACache.reset();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
dst = temp.texture();
|
dst = temp.texture();
|
||||||
// clear the temp target and set blend to replace
|
// clear the temp target and set blend to replace
|
||||||
fGpu->clear(&maskSpaceElementIBounds,
|
fGpu->clear(&maskSpaceElementIBounds,
|
||||||
invert ? 0xffffffff : 0x00000000,
|
invert ? 0xffffffff : 0x00000000,
|
||||||
dst->asRenderTarget());
|
dst->asRenderTarget());
|
||||||
setup_boolean_blendcoeffs(drawState, SkRegion::kReplace_Op);
|
setup_boolean_blendcoeffs(drawState, SkRegion::kReplace_Op);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// draw directly into the result with the stencil set to make the pixels affected
|
// draw directly into the result with the stencil set to make the pixels affected
|
||||||
// by the clip shape be non-zero.
|
// by the clip shape be non-zero.
|
||||||
|
@ -542,7 +542,7 @@ GrTexture* GrClipMaskManager::createAlphaClipMask(int32_t clipStackGenID,
|
||||||
0xffff,
|
0xffff,
|
||||||
0xffff);
|
0xffff);
|
||||||
drawState->setStencil(kStencilInElement);
|
drawState->setStencil(kStencilInElement);
|
||||||
setup_boolean_blendcoeffs(drawState, op);
|
setup_boolean_blendcoeffs(drawState, op);
|
||||||
}
|
}
|
||||||
|
|
||||||
drawState->setAlpha(invert ? 0x00 : 0xff);
|
drawState->setAlpha(invert ? 0x00 : 0xff);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче