Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9738 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
aaeb87d32c
commit
020b25becb
@ -14,18 +14,18 @@ public:
|
||||
|
||||
void save();
|
||||
void restore();
|
||||
|
||||
|
||||
double lineWidth;
|
||||
void setLineWidth(double);
|
||||
|
||||
|
||||
void beginPath();
|
||||
void moveTo(double x, double y);
|
||||
void lineTo(double x, double y);
|
||||
void closePath();
|
||||
|
||||
|
||||
void fill();
|
||||
void stroke();
|
||||
|
||||
|
||||
void fillText(const char text[], double x, double y);
|
||||
|
||||
private:
|
||||
@ -95,7 +95,7 @@ static void test_stroke(SkCanvas* canvas) {
|
||||
path.reset(); path.moveTo(0, 0); path.lineTo(100, 100); path.moveTo(200, 200);
|
||||
dump(path);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
// TEST 1 - The rectangle as it's expected to look
|
||||
var canvas = document.createElement('canvas');
|
||||
@ -113,15 +113,15 @@ static void test_stroke(SkCanvas* canvas) {
|
||||
ctx.lineTo(150, 15);
|
||||
ctx.lineTo(10, 15);
|
||||
ctx.closePath();
|
||||
|
||||
|
||||
// no extra moveTo here
|
||||
// ctx.moveTo(175, 125);
|
||||
|
||||
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
|
||||
|
||||
ctx.fillText("As Expected", 10, 10);
|
||||
|
||||
|
||||
#if 0
|
||||
// TEST 2 - Includes an extra moveTo call before stroke; the rectangle appears larger
|
||||
canvas = document.createElement('canvas');
|
||||
@ -139,14 +139,14 @@ static void test_stroke(SkCanvas* canvas) {
|
||||
ctx.lineTo(150, 15);
|
||||
ctx.lineTo(10, 15);
|
||||
ctx.closePath();
|
||||
|
||||
|
||||
ctx.moveTo(175, 125);
|
||||
|
||||
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
|
||||
|
||||
ctx.fillText("Larger Rectangle", 10, 10);
|
||||
|
||||
|
||||
#if 0
|
||||
// TEST 3 - Identical to test 2 except the line width is 1
|
||||
canvas = document.createElement('canvas');
|
||||
@ -164,12 +164,12 @@ static void test_stroke(SkCanvas* canvas) {
|
||||
ctx.lineTo(150, 15);
|
||||
ctx.lineTo(10, 15);
|
||||
ctx.closePath();
|
||||
|
||||
|
||||
ctx.moveTo(175, 125);
|
||||
|
||||
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
|
||||
|
||||
ctx.fillText("As Expected - line width 1", 10, 10);
|
||||
}
|
||||
|
||||
@ -269,4 +269,3 @@ private:
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DEF_GM( return new Poly2PolyGM; )
|
||||
|
||||
|
@ -244,7 +244,7 @@ public:
|
||||
/** counter-clockwise direction for adding closed contours */
|
||||
kCCW_Direction,
|
||||
};
|
||||
|
||||
|
||||
/** Returns true if the path specifies a rectangle. If so, and if rect is
|
||||
not null, set rect to the bounds of the path. If the path does not
|
||||
specify a rectangle, return false and ignore rect.
|
||||
@ -256,7 +256,7 @@ public:
|
||||
bool isRect(SkRect* rect) const {
|
||||
return this->isRect(rect, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the path specifies a rectangle.
|
||||
*
|
||||
@ -270,14 +270,14 @@ public:
|
||||
* @return true if the path specifies a rectangle
|
||||
*/
|
||||
bool isRect(SkRect* rect, bool* isClosed, Direction* direction) const;
|
||||
|
||||
|
||||
/** Returns true if the path specifies a pair of nested rectangles. If so, and if
|
||||
rect is not null, set rect[0] to the outer rectangle and rect[1] to the inner
|
||||
rectangle. If so, and dirs is not null, set dirs[0] to the direction of
|
||||
the outer rectangle and dirs[1] to the direction of the inner rectangle. If
|
||||
the path does not specify a pair of nested rectangles, return
|
||||
false and ignore rect and dirs.
|
||||
|
||||
|
||||
@param rect If not null, returns the path as a pair of nested rectangles
|
||||
@param dirs If not null, returns the direction of the rects
|
||||
@return true if the path describes a pair of nested rectangles
|
||||
|
@ -805,7 +805,7 @@ void SkBitmap::eraseARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b) const {
|
||||
case kRGB_565_Config: {
|
||||
uint16_t* p = (uint16_t*)fPixels;
|
||||
uint16_t v;
|
||||
|
||||
|
||||
if (kARGB_4444_Config == fConfig) {
|
||||
v = pack_8888_to_4444(a, r, g, b);
|
||||
} else {
|
||||
|
@ -32,7 +32,7 @@ SkDevice::SkDevice(const SkBitmap& bitmap)
|
||||
{
|
||||
fOrigin.setZero();
|
||||
fMetaData = NULL;
|
||||
|
||||
|
||||
SkASSERT(SkBitmap::kARGB_4444_Config != bitmap.config());
|
||||
}
|
||||
|
||||
|
@ -592,7 +592,7 @@ bool SkPath::isRect(SkRect* rect, bool* isClosed, Direction* direction) const {
|
||||
if (!this->isRectContour(false, &currVerb, &pts, isClosed, direction)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (rect) {
|
||||
rect->set(first, SkToS32(pts - first));
|
||||
}
|
||||
|
@ -2420,7 +2420,7 @@ static void TestPath(skiatest::Reporter* reporter) {
|
||||
REPORTER_ASSERT(reporter, p.isRect(&r));
|
||||
REPORTER_ASSERT(reporter, r == bounds);
|
||||
}
|
||||
|
||||
|
||||
test_isLine(reporter);
|
||||
test_isRect(reporter);
|
||||
test_isNestedRects(reporter);
|
||||
|
Loading…
Reference in New Issue
Block a user