Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@14172 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
84b18c7e3e
commit
5199701acb
@ -525,14 +525,14 @@ int tool_main(int argc, char** argv) {
|
|||||||
|
|
||||||
if (NULL != canvas) {
|
if (NULL != canvas) {
|
||||||
canvas->clear(SK_ColorWHITE);
|
canvas->clear(SK_ColorWHITE);
|
||||||
if (FLAGS_clip) {
|
if (FLAGS_clip) {
|
||||||
perform_clip(canvas, dim.fX, dim.fY);
|
perform_clip(canvas, dim.fX, dim.fY);
|
||||||
}
|
}
|
||||||
if (FLAGS_scale) {
|
if (FLAGS_scale) {
|
||||||
perform_scale(canvas, dim.fX, dim.fY);
|
perform_scale(canvas, dim.fX, dim.fY);
|
||||||
}
|
}
|
||||||
if (FLAGS_rotate) {
|
if (FLAGS_rotate) {
|
||||||
perform_rotate(canvas, dim.fX, dim.fY);
|
perform_rotate(canvas, dim.fX, dim.fY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ void TileGridTask::draw() {
|
|||||||
SkIPoint::Make(0,0), // Offset.
|
SkIPoint::Make(0,0), // Offset.
|
||||||
};
|
};
|
||||||
SkAutoTUnref<SkPictureFactory> factory(SkNEW_ARGS(SkTileGridPictureFactory, (info)));
|
SkAutoTUnref<SkPictureFactory> factory(SkNEW_ARGS(SkTileGridPictureFactory, (info)));
|
||||||
SkAutoTUnref<SkPicture> recorded(RecordPicture(fGM.get(),
|
SkAutoTUnref<SkPicture> recorded(RecordPicture(fGM.get(),
|
||||||
SkPicture::kUsePathBoundsForClip_RecordingFlag,
|
SkPicture::kUsePathBoundsForClip_RecordingFlag,
|
||||||
factory));
|
factory));
|
||||||
|
|
||||||
SkBitmap full;
|
SkBitmap full;
|
||||||
|
@ -16,8 +16,8 @@ namespace DM {
|
|||||||
SkString UnderJoin(const char* a, const char* b);
|
SkString UnderJoin(const char* a, const char* b);
|
||||||
|
|
||||||
// Draw gm to picture. Passes recordFlags to SkPictureRecorder::beginRecording().
|
// Draw gm to picture. Passes recordFlags to SkPictureRecorder::beginRecording().
|
||||||
SkPicture* RecordPicture(skiagm::GM* gm,
|
SkPicture* RecordPicture(skiagm::GM* gm,
|
||||||
uint32_t recordFlags = 0,
|
uint32_t recordFlags = 0,
|
||||||
SkPictureFactory* factory = NULL);
|
SkPictureFactory* factory = NULL);
|
||||||
|
|
||||||
// Prepare bitmap to have gm or bench draw into it with this config.
|
// Prepare bitmap to have gm or bench draw into it with this config.
|
||||||
|
@ -445,9 +445,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Signal that the caller is done recording. This invalidates the canvas
|
/** Signal that the caller is done recording. This invalidates the canvas
|
||||||
returned by beginRecording/getRecordingCanvas, and returns the
|
returned by beginRecording/getRecordingCanvas, and returns the
|
||||||
created SkPicture. Note that the returned picture has its creation
|
created SkPicture. Note that the returned picture has its creation
|
||||||
ref which the caller must take ownership of.
|
ref which the caller must take ownership of.
|
||||||
*/
|
*/
|
||||||
SkPicture* endRecording() {
|
SkPicture* endRecording() {
|
||||||
if (NULL != fPicture.get()) {
|
if (NULL != fPicture.get()) {
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
SkTileGridPictureFactory(const SkTileGridPicture::TileGridInfo& info) : fInfo(info) { }
|
SkTileGridPictureFactory(const SkTileGridPicture::TileGridInfo& info) : fInfo(info) { }
|
||||||
|
|
||||||
virtual SkPicture* create(int width, int height) SK_OVERRIDE {
|
virtual SkPicture* create(int width, int height) SK_OVERRIDE {
|
||||||
return SkNEW_ARGS(SkTileGridPicture, (width, height, fInfo));
|
return SkNEW_ARGS(SkTileGridPicture, (width, height, fInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -83,7 +83,7 @@ public:
|
|||||||
|
|
||||||
fPicture = recorder.endRecording();
|
fPicture = recorder.endRecording();
|
||||||
|
|
||||||
// fPicture now has (4) references to fSubPicture. We can release our ref,
|
// fPicture now has (4) references to fSubPicture. We can release our ref,
|
||||||
// and just unref fPicture in our destructor, and it will in turn take care of
|
// and just unref fPicture in our destructor, and it will in turn take care of
|
||||||
// the other references to fSubPicture
|
// the other references to fSubPicture
|
||||||
fSubPicture->unref();
|
fSubPicture->unref();
|
||||||
|
@ -991,7 +991,7 @@ public:
|
|||||||
class SkRTreePictureFactory : public SkPictureFactory {
|
class SkRTreePictureFactory : public SkPictureFactory {
|
||||||
private:
|
private:
|
||||||
virtual SkPicture* create(int width, int height) SK_OVERRIDE {
|
virtual SkPicture* create(int width, int height) SK_OVERRIDE {
|
||||||
return SkNEW(RTreePicture);
|
return SkNEW(RTreePicture);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -59,21 +59,21 @@ static SkPictureFactory* quadtree_factory(int* recordingFlags) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static PictureFactory parse_FLAGS_bbh() {
|
static PictureFactory parse_FLAGS_bbh() {
|
||||||
if (FLAGS_bbh.isEmpty()) {
|
if (FLAGS_bbh.isEmpty()) {
|
||||||
return &vanilla_factory;
|
return &vanilla_factory;
|
||||||
}
|
}
|
||||||
if (FLAGS_bbh.count() != 1) {
|
if (FLAGS_bbh.count() != 1) {
|
||||||
SkDebugf("Multiple bbh arguments supplied.\n");
|
SkDebugf("Multiple bbh arguments supplied.\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (FLAGS_bbh.contains("rtree")) {
|
if (FLAGS_bbh.contains("rtree")) {
|
||||||
return rtree_factory;
|
return rtree_factory;
|
||||||
}
|
}
|
||||||
if (FLAGS_bbh.contains("tilegrid")) {
|
if (FLAGS_bbh.contains("tilegrid")) {
|
||||||
return tilegrid_factory;
|
return tilegrid_factory;
|
||||||
}
|
}
|
||||||
if (FLAGS_bbh.contains("quadtree")) {
|
if (FLAGS_bbh.contains("quadtree")) {
|
||||||
return quadtree_factory;
|
return quadtree_factory;
|
||||||
}
|
}
|
||||||
SkDebugf("Invalid bbh type %s, must be one of rtree, tilegrid, quadtree.\n", FLAGS_bbh[0]);
|
SkDebugf("Invalid bbh type %s, must be one of rtree, tilegrid, quadtree.\n", FLAGS_bbh[0]);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user