Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@8976 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
f77b35d86a
commit
2fd42c471c
@ -173,11 +173,11 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
virtual const char* onGetName() {
|
||||
virtual const char* onGetName() {
|
||||
if (fRotate) {
|
||||
return "aarects_rotated";
|
||||
return "aarects_rotated";
|
||||
}
|
||||
return "aarects";
|
||||
return "aarects";
|
||||
}
|
||||
|
||||
virtual void onDraw(SkCanvas* canvas) {
|
||||
|
@ -98,7 +98,7 @@ struct SkMask {
|
||||
uint32_t* row = (uint32_t*)(fImage + (y - fBounds.fTop) * fRowBytes);
|
||||
return row + (x - fBounds.fLeft);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the address of the specified 32bit mask. In the debug build,
|
||||
* this asserts that the mask's format is 32bits, and that (x,y)
|
||||
@ -111,7 +111,7 @@ struct SkMask {
|
||||
uint32_t* row = (uint32_t*)(fImage + (y - fBounds.fTop) * fRowBytes);
|
||||
return row + (x - fBounds.fLeft);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the address of the specified pixel, computing the pixel-size
|
||||
* at runtime based on the mask format. This will be slightly slower than
|
||||
|
@ -625,7 +625,7 @@ void SkScalerContext::getImage(const SkGlyph& origGlyph) {
|
||||
extract_alpha(srcM,
|
||||
(const SkPMColor*)glyph->fImage, glyph->rowBytes());
|
||||
}
|
||||
|
||||
|
||||
fRec.getMatrixFrom2x2(&matrix);
|
||||
|
||||
if (fMaskFilter->filterMask(&dstM, srcM, matrix, NULL)) {
|
||||
|
@ -408,19 +408,19 @@ void GrAARectRenderer::geometryFillAARect(GrGpu* gpu,
|
||||
combinedMatrix.mapPointsWithStride(fan0Pos, vsize, 4);
|
||||
|
||||
// TL
|
||||
*((SkPoint*)((intptr_t)fan1Pos + 0 * vsize)) =
|
||||
*((SkPoint*)((intptr_t)fan1Pos + 0 * vsize)) =
|
||||
*((SkPoint*)((intptr_t)fan0Pos + 0 * vsize)) + vec[0] + vec[1];
|
||||
*((SkPoint*)((intptr_t)fan0Pos + 0 * vsize)) -= vec[0] + vec[1];
|
||||
// BL
|
||||
*((SkPoint*)((intptr_t)fan1Pos + 1 * vsize)) =
|
||||
*((SkPoint*)((intptr_t)fan1Pos + 1 * vsize)) =
|
||||
*((SkPoint*)((intptr_t)fan0Pos + 1 * vsize)) + vec[0] - vec[1];
|
||||
*((SkPoint*)((intptr_t)fan0Pos + 1 * vsize)) -= vec[0] - vec[1];
|
||||
// BR
|
||||
*((SkPoint*)((intptr_t)fan1Pos + 2 * vsize)) =
|
||||
*((SkPoint*)((intptr_t)fan1Pos + 2 * vsize)) =
|
||||
*((SkPoint*)((intptr_t)fan0Pos + 2 * vsize)) - vec[0] - vec[1];
|
||||
*((SkPoint*)((intptr_t)fan0Pos + 2 * vsize)) += vec[0] + vec[1];
|
||||
// TR
|
||||
*((SkPoint*)((intptr_t)fan1Pos + 3 * vsize)) =
|
||||
*((SkPoint*)((intptr_t)fan1Pos + 3 * vsize)) =
|
||||
*((SkPoint*)((intptr_t)fan0Pos + 3 * vsize)) - vec[0] + vec[1];
|
||||
*((SkPoint*)((intptr_t)fan0Pos + 3 * vsize)) += vec[0] - vec[1];
|
||||
}
|
||||
@ -431,7 +431,7 @@ void GrAARectRenderer::geometryFillAARect(GrGpu* gpu,
|
||||
}
|
||||
|
||||
GrColor innerColor;
|
||||
if (useVertexCoverage) {
|
||||
if (useVertexCoverage) {
|
||||
innerColor = 0xffffffff;
|
||||
} else {
|
||||
innerColor = target->getDrawState().getColor();
|
||||
|
@ -765,7 +765,7 @@ static bool apply_aa_to_rect(GrDrawTarget* target,
|
||||
|
||||
combinedMatrix->mapRect(devRect, rect);
|
||||
|
||||
if (strokeWidth < 0
|
||||
if (strokeWidth < 0
|
||||
#if defined(SHADER_AA_FILL_RECT) || !defined(IGNORE_ROT_AA_RECT_OPT)
|
||||
&& drawState.getViewMatrix().preservesAxisAlignment()
|
||||
#endif
|
||||
|
@ -742,7 +742,7 @@ GrIndexBuffer* GrOvalRenderer::rRectIndexBuffer(GrGpu* gpu) {
|
||||
return fRRectIndexBuffer;
|
||||
}
|
||||
|
||||
bool GrOvalRenderer::drawSimpleRRect(GrDrawTarget* target, GrContext* context, bool useAA,
|
||||
bool GrOvalRenderer::drawSimpleRRect(GrDrawTarget* target, GrContext* context, bool useAA,
|
||||
const SkRRect& rrect, const SkStrokeRec& stroke)
|
||||
{
|
||||
// only anti-aliased rrects for now
|
||||
|
@ -91,4 +91,3 @@ void GrGLExtensions::print(const char* sep) const {
|
||||
GrPrintf("%s%s", fStrings[i].c_str(), (i < cnt - 1) ? sep : "");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1210,7 +1210,7 @@ static SkPMColor cgpixels_to_pmcolor(CGRGBPixel rgb, const SkGlyph& glyph,
|
||||
U8CPU g = (rgb >> 8) & 0xFF;
|
||||
U8CPU b = (rgb >> 0) & 0xFF;
|
||||
unsigned a = SkComputeLuminance(r, g, b);
|
||||
|
||||
|
||||
// compute gradient from x,y
|
||||
r = x * 255 / glyph.fWidth;
|
||||
g = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user