Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: dm/DMSKPTask.cpp

Issue 788243008: Sketch DM refactor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: better failure messages, disable a few things temporarily to try to go green Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dm/DMSKPTask.h ('k') | dm/DMSerializeTask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSKPTask.cpp
diff --git a/dm/DMSKPTask.cpp b/dm/DMSKPTask.cpp
deleted file mode 100644
index d633594ffc594e892f2d76dd53676ef5061078a5..0000000000000000000000000000000000000000
--- a/dm/DMSKPTask.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "DMSKPTask.h"
-#include "DMUtil.h"
-#include "DMWriteTask.h"
-
-#include "SkCommandLineFlags.h"
-#include "SkPictureRecorder.h"
-
-DEFINE_int32(skpMaxWidth, 1000, "Max SKPTask viewport width.");
-DEFINE_int32(skpMaxHeight, 1000, "Max SKPTask viewport height.");
-
-namespace DM {
-
-SKPTask::SKPTask(Reporter* r,
- TaskRunner* tr,
- const SkPicture* pic,
- SkString filename)
- : CpuTask(r, tr)
- , fPicture(SkRef(pic))
- , fName(FileToTaskName(filename)) {}
-
-void SKPTask::draw() {
- const int width = SkTMin(SkScalarCeilToInt(fPicture->cullRect().width()), FLAGS_skpMaxWidth),
- height = SkTMin(SkScalarCeilToInt(fPicture->cullRect().height()), FLAGS_skpMaxHeight);
- SkBitmap bitmap;
- AllocatePixels(kN32_SkColorType, width, height, &bitmap);
- DrawPicture(*fPicture, &bitmap);
-
- this->spawnChild(SkNEW_ARGS(WriteTask, (*this, "SKP", bitmap)));
-}
-
-} // namespace DM
« no previous file with comments | « dm/DMSKPTask.h ('k') | dm/DMSerializeTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698