Revert "If the path is a rect, call drawRect to raster the geometry in SkCanvas::drawPath to get better performance."

This reverts commit r11904

Review URL: https://codereview.chromium.org/35543002

git-svn-id: http://skia.googlecode.com/svn/trunk@11909 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2013-10-22 16:54:15 +00:00
parent c294a97842
commit 7ce564cccb
23 changed files with 54 additions and 94 deletions

View File

@ -34,11 +34,3 @@ pdf-poppler
# Added by sugoi for https://codereview.chromium.org/28273005/
imagemagnifier
# Added by bsalomon as part of https://codereview.chromium.org/23484007/
# to temporarily ignore slight changes between the way rectangle paths
# and rectangles render.
pathopsinverse
convexpaths
path-reverse
inverse_paths
strokerect

View File

@ -55,8 +55,10 @@ public:
virtual void drawPaint(const SkPaint& paint) {}
virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
const SkPaint& paint) {}
virtual void drawRect(const SkRect& rect, const SkPaint& paint) {}
virtual void drawOval(const SkRect& oval, const SkPaint&) {}
virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint) {}
virtual void drawPath(const SkPath& path, const SkPaint& paint) {}
virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
const SkPaint* paint = NULL) {}
virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
@ -93,8 +95,6 @@ public:
virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) {return NULL;}
protected:
virtual void onDrawRect(const SkRect& rect, const SkPaint& paint) {}
virtual void onDrawPath(const SkPath& path, const SkPaint& paint) {}
virtual SkCanvas* canvasForDrawIter() {return NULL;}
virtual SkBaseDevice* setDevice(SkBaseDevice* device) {return NULL;}

View File

@ -135,7 +135,7 @@ static int showPathContour(SkPath::Iter& iter) {
}
class PathCanvas : public SkCanvas {
virtual void onDrawPath(const SkPath& path, const SkPaint& paint) {
virtual void drawPath(const SkPath& path, const SkPaint& paint) {
if (nameonly) {
SkDebugf(" %s%d,\n", filename.c_str(), ++count);
return;

View File

@ -575,20 +575,16 @@ public:
will be filled or stroked based on the Style in the paint.
@param rect The rect to be drawn
@param paint The paint used to draw the rect
Overriding this function is deprecated. It will be made non-virtual
soon. Instead override onDrawRect.
*/
virtual void drawRect(const SkRect& rect, const SkPaint& paint) {
this->onDrawRect(rect, paint);
}
virtual void drawRect(const SkRect& rect, const SkPaint& paint);
/** Draw the specified rectangle using the specified paint. The rectangle
will be filled or framed based on the Style in the paint.
@param rect The rect to be drawn
@param paint The paint used to draw the rect
*/
void drawIRect(const SkIRect& rect, const SkPaint& paint) {
void drawIRect(const SkIRect& rect, const SkPaint& paint)
{
SkRect r;
r.set(rect); // promotes the ints to scalars
this->drawRect(r, paint);
@ -660,18 +656,8 @@ public:
filled or framed based on the Style in the paint.
@param path The path to be drawn
@param paint The paint used to draw the path
Overriding this function is deprecated. It will be made non-virtual
soon. Instead override onDrawRect.
*/
virtual void drawPath(const SkPath& path, const SkPaint& paint) {
SkRect rect;
if (path.isRect(&rect) && !path.isInverseFillType()) {
this->onDrawRect(rect, paint);
} else {
this->onDrawPath(path, paint);
}
}
virtual void drawPath(const SkPath& path, const SkPaint& paint);
/** Draw the specified bitmap, with its top/left corner at (x,y), using the
specified paint, transformed by the current matrix. Note: if the paint
@ -1048,10 +1034,6 @@ protected:
// can perform copy-on-write or invalidate any cached images
void predrawNotify();
virtual void onDrawRect(const SkRect& rect, const SkPaint& paint);
virtual void onDrawPath(const SkPath& path, const SkPaint& paint);
/** DEPRECATED -- use constructor(device)
Marked as 'protected' to avoid new clients using this before we can

View File

@ -162,7 +162,10 @@ public:
virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
const SkPaint& paint) SK_OVERRIDE;
virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void drawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE;
virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void drawPath(const SkPath& path, const SkPaint& paint)
SK_OVERRIDE;
virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left,
SkScalar top, const SkPaint* paint)
SK_OVERRIDE;
@ -231,8 +234,6 @@ public:
};
protected:
virtual void onDrawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE;
virtual void onDrawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
virtual SkCanvas* canvasForDrawIter();
DeferredDevice* getDeferredDevice() const;

View File

@ -93,7 +93,9 @@ public:
virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
const SkPaint& paint) SK_OVERRIDE;
virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void drawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
const SkPaint* paint) SK_OVERRIDE;
virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
@ -124,10 +126,6 @@ public:
virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE;
virtual void endCommentGroup() SK_OVERRIDE;
protected:
virtual void onDrawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void onDrawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
private:
Dumper* fDumper;
int fNestLevel; // for nesting recursive elements like pictures

View File

@ -42,7 +42,9 @@ public:
virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
const SkPaint& paint) SK_OVERRIDE;
virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void drawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
const SkPaint* paint) SK_OVERRIDE;
virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
@ -70,10 +72,6 @@ public:
const SkPaint& paint) SK_OVERRIDE;
virtual void drawData(const void* data, size_t length) SK_OVERRIDE;
protected:
virtual void onDrawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void onDrawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
private:
lua_State* fL;
SkString fFunc;

View File

@ -43,7 +43,9 @@ public:
virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
const SkPaint&) SK_OVERRIDE;
virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE;
virtual void drawRect(const SkRect&, const SkPaint&) SK_OVERRIDE;
virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE;
virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
const SkPaint*) SK_OVERRIDE;
virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
@ -78,8 +80,6 @@ public:
virtual void endCommentGroup() SK_OVERRIDE;
protected:
virtual void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE;
virtual void onDrawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
SkTDArray<SkCanvas*> fList;
class Iter;

View File

@ -48,7 +48,9 @@ public:
virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
const SkPaint& paint) SK_OVERRIDE;
virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void drawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
const SkPaint* paint = NULL) SK_OVERRIDE;
virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
@ -83,10 +85,6 @@ public:
virtual SkBounder* setBounder(SkBounder* bounder) SK_OVERRIDE;
virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) SK_OVERRIDE;
protected:
virtual void onDrawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
virtual void onDrawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
private:
SkCanvas* fProxy;

View File

@ -20,23 +20,23 @@ void SkBBoxRecord::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
}
}
void SkBBoxRecord::onDrawRect(const SkRect& rect, const SkPaint& paint) {
void SkBBoxRecord::drawRect(const SkRect& rect, const SkPaint& paint) {
if (this->transformBounds(rect, &paint)) {
INHERITED::onDrawRect(rect, paint);
INHERITED::drawRect(rect, paint);
}
}
void SkBBoxRecord::onDrawPath(const SkPath& path, const SkPaint& paint) {
void SkBBoxRecord::drawPath(const SkPath& path, const SkPaint& paint) {
if (path.isInverseFillType()) {
// If path is inverse filled, use the current clip bounds as the
// path's device-space bounding box.
SkIRect clipBounds;
if (this->getClipDeviceBounds(&clipBounds)) {
this->handleBBox(SkRect::MakeFromIRect(clipBounds));
INHERITED::onDrawPath(path, paint);
INHERITED::drawPath(path, paint);
}
} else if (this->transformBounds(path.getBounds(), &paint)) {
INHERITED::onDrawPath(path, paint);
INHERITED::drawPath(path, paint);
}
}

View File

@ -31,6 +31,8 @@ public:
virtual void drawOval(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE;
virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint) SK_OVERRIDE;
virtual void drawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE;
virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
const SkPaint& paint) SK_OVERRIDE;
virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
@ -63,10 +65,6 @@ public:
const SkPaint& paint) SK_OVERRIDE;
virtual void drawPicture(SkPicture& picture) SK_OVERRIDE;
protected:
virtual void onDrawRect(const SkRect& rect, const SkPaint& paint) SK_OVERRIDE;
virtual void onDrawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
private:
/**
* Takes a bounding box in current canvas view space, accounts for stroking and effects, and

View File

@ -1631,7 +1631,7 @@ void SkCanvas::drawPoints(PointMode mode, size_t count, const SkPoint pts[],
LOOPER_END
}
void SkCanvas::onDrawRect(const SkRect& r, const SkPaint& paint) {
void SkCanvas::drawRect(const SkRect& r, const SkPaint& paint) {
CHECK_SHADER_NOSETCONTEXT(paint);
if (paint.canComputeFastBounds()) {
@ -1699,7 +1699,7 @@ void SkCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
}
void SkCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
void SkCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
CHECK_SHADER_NOSETCONTEXT(paint);
if (!path.isFinite()) {

View File

@ -868,7 +868,7 @@ void SkPictureRecord::drawOval(const SkRect& oval, const SkPaint& paint) {
this->validate(initialOffset, size);
}
void SkPictureRecord::onDrawRect(const SkRect& rect, const SkPaint& paint) {
void SkPictureRecord::drawRect(const SkRect& rect, const SkPaint& paint) {
// op + paint index + rect
uint32_t size = 2 * kUInt32Size + sizeof(rect);
size_t initialOffset = this->addDraw(DRAW_RECT, &size);
@ -895,7 +895,7 @@ void SkPictureRecord::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
}
}
void SkPictureRecord::onDrawPath(const SkPath& path, const SkPaint& paint) {
void SkPictureRecord::drawPath(const SkPath& path, const SkPaint& paint) {
// op + paint index + path index
uint32_t size = 3 * kUInt32Size;
size_t initialOffset = this->addDraw(DRAW_PATH, &size);

View File

@ -53,7 +53,9 @@ public:
virtual void drawPoints(PointMode, size_t count, const SkPoint pts[],
const SkPaint&) SK_OVERRIDE;
virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE;
virtual void drawRect(const SkRect&, const SkPaint&) SK_OVERRIDE;
virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE;
virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top,
const SkPaint*) SK_OVERRIDE;
virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src,
@ -104,10 +106,6 @@ public:
void beginRecording();
void endRecording();
protected:
virtual void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE;
virtual void onDrawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
private:
void handleOptimization(int opt);
void recordRestoreOffsetPlaceholder(SkRegion::Op);

View File

@ -224,7 +224,9 @@ public:
virtual void drawPoints(PointMode, size_t count, const SkPoint pts[],
const SkPaint&) SK_OVERRIDE;
virtual void drawOval(const SkRect&, const SkPaint&) SK_OVERRIDE;
virtual void drawRect(const SkRect& rect, const SkPaint&) SK_OVERRIDE;
virtual void drawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE;
virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top,
const SkPaint*) SK_OVERRIDE;
virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src,
@ -262,11 +264,6 @@ public:
* according to slot.
*/
bool shuttleBitmap(const SkBitmap&, int32_t slot);
protected:
virtual void onDrawRect(const SkRect& rect, const SkPaint&) SK_OVERRIDE;
virtual void onDrawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
private:
enum {
kNoSaveLayer = -1,
@ -718,7 +715,7 @@ void SkGPipeCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
}
}
void SkGPipeCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
void SkGPipeCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
NOTIFY_SETUP(this);
this->writePaint(paint);
if (this->needOpBytes(sizeof(SkRect))) {
@ -736,7 +733,7 @@ void SkGPipeCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
}
}
void SkGPipeCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
void SkGPipeCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
NOTIFY_SETUP(this);
this->writePaint(paint);
if (this->needOpBytes(path.writeToMemory(NULL))) {

View File

@ -846,7 +846,7 @@ void SkDeferredCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
this->recordedDrawCommand();
}
void SkDeferredCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
void SkDeferredCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
if (fDeferredDrawing && this->isFullFrame(&rect, &paint) &&
isPaintOpaque(&paint)) {
this->getDeferredDevice()->skipPendingCommands();
@ -869,7 +869,7 @@ void SkDeferredCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
}
}
void SkDeferredCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
void SkDeferredCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
AutoImmediateDrawIfNeeded autoDraw(*this, &paint);
this->drawingCanvas()->drawPath(path, paint);
this->recordedDrawCommand();

View File

@ -323,7 +323,7 @@ void SkDumpCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
this->dump(kDrawOval_Verb, &paint, "drawOval(%s)", str.c_str());
}
void SkDumpCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
void SkDumpCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
SkString str;
toString(rect, &str);
this->dump(kDrawRect_Verb, &paint, "drawRect(%s)", str.c_str());
@ -335,7 +335,7 @@ void SkDumpCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
this->dump(kDrawRRect_Verb, &paint, "drawRRect(%s)", str.c_str());
}
void SkDumpCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
void SkDumpCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
SkString str;
toString(path, &str);
this->dump(kDrawPath_Verb, &paint, "drawPath(%s)", str.c_str());

View File

@ -187,7 +187,7 @@ void SkLuaCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
lua.pushPaint(paint, "paint");
}
void SkLuaCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
void SkLuaCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
AUTO_LUA("drawRect");
lua.pushRect(rect, "rect");
lua.pushPaint(paint, "paint");
@ -199,7 +199,7 @@ void SkLuaCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
lua.pushPaint(paint, "paint");
}
void SkLuaCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
void SkLuaCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
AUTO_LUA("drawPath");
lua.pushPath(path, "path");
lua.pushPaint(paint, "paint");

View File

@ -190,7 +190,7 @@ void SkNWayCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
}
}
void SkNWayCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
void SkNWayCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
Iter iter(fList);
while (iter.next()) {
iter->drawRect(rect, paint);
@ -204,7 +204,7 @@ void SkNWayCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
}
}
void SkNWayCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
void SkNWayCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
Iter iter(fList);
while (iter.next()) {
iter->drawPath(path, paint);

View File

@ -87,7 +87,7 @@ void SkProxyCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
fProxy->drawOval(rect, paint);
}
void SkProxyCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
void SkProxyCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
fProxy->drawRect(rect, paint);
}
@ -95,7 +95,7 @@ void SkProxyCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
fProxy->drawRRect(rrect, paint);
}
void SkProxyCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
void SkProxyCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
fProxy->drawPath(path, paint);
}

View File

@ -363,7 +363,7 @@ void SkDebugCanvas::drawPaint(const SkPaint& paint) {
addDrawCommand(new SkDrawPaintCommand(paint));
}
void SkDebugCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
void SkDebugCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
addDrawCommand(new SkDrawPathCommand(path, paint));
}
@ -387,7 +387,7 @@ void SkDebugCanvas::drawPosTextH(const void* text, size_t byteLength,
new SkDrawPosTextHCommand(text, byteLength, xpos, constY, paint));
}
void SkDebugCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) {
void SkDebugCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
// NOTE(chudy): Messing up when renamed to DrawRect... Why?
addDrawCommand(new SkDrawRectCommand(rect, paint));
}

View File

@ -189,6 +189,8 @@ public:
virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
virtual void drawPicture(SkPicture& picture) SK_OVERRIDE;
virtual void drawPoints(PointMode, size_t count, const SkPoint pts[],
@ -201,6 +203,8 @@ public:
const SkScalar xpos[], SkScalar constY,
const SkPaint&) SK_OVERRIDE;
virtual void drawRect(const SkRect& rect, const SkPaint&) SK_OVERRIDE;
virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint) SK_OVERRIDE;
virtual void drawSprite(const SkBitmap&, int left, int top,
@ -238,11 +242,6 @@ public:
static const int kVizImageHeight = 256;
static const int kVizImageWidth = 256;
protected:
virtual void onDrawRect(const SkRect& rect, const SkPaint&) SK_OVERRIDE;
virtual void onDrawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
private:
SkTDArray<SkDrawCommand*> fCommandVector;
int fHeight;

View File

@ -25,14 +25,13 @@ public:
MockCanvas(SkBaseDevice* device) : SkCanvas(device)
{}
SkTDArray<SkRect> fRects;
protected:
virtual void onDrawRect(const SkRect& rect, const SkPaint&)
virtual void drawRect(const SkRect& rect, const SkPaint&)
{
// This capture occurs before quick reject.
fRects.push(rect);
}
SkTDArray<SkRect> fRects;
};
class TileGridTest {