aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DMSKPTask.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-01-15 08:30:25 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-15 08:30:25 -0800
commit709d2c3e5062c5b57f91273bfc11a751f5b2bb88 (patch)
treeb997d8e2f4fcd0c289017586540c876a1cef9c96 /dm/DMSKPTask.cpp
parent8eadff1e8c9cdb8f941c893a4763c03f5f083c62 (diff)
Sketch DM refactor.
BUG=skia:3255 I think this supports everything DM used to, but has completely refactored how it works to fit the design in the bug. Configs like "tiles-gpu" are automatically wired up. I wouldn't suggest looking at this as a diff. There's just a bunch of deleted files, a few new files, and one new file that shares a name with a deleted file (DM.cpp). NOTREECHECKS=true Review URL: https://codereview.chromium.org/788243008
Diffstat (limited to 'dm/DMSKPTask.cpp')
-rw-r--r--dm/DMSKPTask.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/dm/DMSKPTask.cpp b/dm/DMSKPTask.cpp
deleted file mode 100644
index d633594ffc..0000000000
--- 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