aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gyp/core.gypi1
-rw-r--r--gyp/tests.gypi1
-rw-r--r--include/record/SkRecording.h75
-rw-r--r--src/core/SkRecording.cpp44
-rw-r--r--tests/RecordingTest.cpp29
-rw-r--r--tests/RecordingXfermodeTest.cpp1
6 files changed, 0 insertions, 151 deletions
diff --git a/gyp/core.gypi b/gyp/core.gypi
index 7c419ed4b4..5e811163fe 100644
--- a/gyp/core.gypi
+++ b/gyp/core.gypi
@@ -151,7 +151,6 @@
'<(skia_src_path)/core/SkRecordDraw.cpp',
'<(skia_src_path)/core/SkRecordOpts.cpp',
'<(skia_src_path)/core/SkRecorder.cpp',
- '<(skia_src_path)/core/SkRecording.cpp',
'<(skia_src_path)/core/SkRect.cpp',
'<(skia_src_path)/core/SkRefDict.cpp',
'<(skia_src_path)/core/SkRegion.cpp',
diff --git a/gyp/tests.gypi b/gyp/tests.gypi
index 6a2032646b..6ae2027d55 100644
--- a/gyp/tests.gypi
+++ b/gyp/tests.gypi
@@ -171,7 +171,6 @@
'../tests/RecordPatternTest.cpp',
'../tests/RecordTest.cpp',
'../tests/RecorderTest.cpp',
- '../tests/RecordingTest.cpp',
'../tests/RecordingXfermodeTest.cpp',
'../tests/RefCntTest.cpp',
'../tests/RefDictTest.cpp',
diff --git a/include/record/SkRecording.h b/include/record/SkRecording.h
deleted file mode 100644
index a4e8809c3a..0000000000
--- a/include/record/SkRecording.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkRecording_DEFINED
-#define SkRecording_DEFINED
-
-#include "SkCanvas.h" // SkCanvas
-#include "SkRefCnt.h" // SkAutoTUnref
-#include "SkTemplates.h" // SkAutoTDelete
-#include "SkTypes.h" // SkNoncopyable
-
-// These are intentionally left opaque.
-class SkRecord;
-class SkRecorder;
-
-namespace EXPERIMENTAL {
-
-/** Easy mode interface to SkRecord-based SkCanvas recording.
- *
- * scoped_ptr<SkRecording> recording(new SkRecording(1920, 1080));
- * skia::RefPtr<SkCanvas> canvas(skia::SharePtr(recording->canvas()));
- *
- * canvas->drawThis();
- * canvas->clipThat();
- * ...
- *
- * canvas.clear(); // You must deref the canvas before you may call releasePlayback().
- * scoped_ptr<const SkPlayback> playback(recording->releasePlayback());
- * playback->draw(&someCanvas);
- * playback->draw(&someOtherCanvas);
- *
- * SkPlayback is thread safe; SkRecording is not.
- */
-
-class SK_API SkPlayback : SkNoncopyable {
-public:
- // Remember, if you've got an SkPlayback*, you probably own it. Don't forget to delete it!
- ~SkPlayback();
-
- // Draw recorded commands into a canvas.
- void draw(SkCanvas*) const;
-
-private:
- explicit SkPlayback(const SkRecord*);
-
- SkAutoTDelete<const SkRecord> fRecord;
-
- friend class SkRecording;
-};
-
-class SK_API SkRecording : SkNoncopyable {
-public:
- SkRecording(int width, int height);
- ~SkRecording();
-
- // Draws issued to this canvas will be replayed by SkPlayback::draw().
- // Any refs held on canvas() must be dropped before you may call releasePlayback().
- SkCanvas* canvas();
-
- // Release exclusive ownership of an SkPlayback to the caller.
- // Any refs held on canvas() must be dropped before you may call releasePlayback().
- SkPlayback* releasePlayback();
-
-private:
- SkAutoTDelete<SkRecord> fRecord;
- SkAutoTUnref<SkRecorder> fRecorder;
-};
-
-} // namespace EXPERIMENTAL
-
-#endif//SkRecording_DEFINED
diff --git a/src/core/SkRecording.cpp b/src/core/SkRecording.cpp
deleted file mode 100644
index 368ebb2fb3..0000000000
--- a/src/core/SkRecording.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "../../include/record/SkRecording.h"
-
-#include "SkRecord.h"
-#include "SkRecordOpts.h"
-#include "SkRecordDraw.h"
-#include "SkRecorder.h"
-
-namespace EXPERIMENTAL {
-
-SkPlayback::SkPlayback(const SkRecord* record) : fRecord(record) {}
-
-SkPlayback::~SkPlayback() {}
-
-void SkPlayback::draw(SkCanvas* canvas) const {
- SkASSERT(fRecord.get() != NULL);
- SkRecordDraw(*fRecord, canvas, NULL/*bbh*/, NULL/*callback*/);
-}
-
-SkRecording::SkRecording(int width, int height)
- : fRecord(SkNEW(SkRecord))
- , fRecorder(SkNEW_ARGS(SkRecorder, (fRecord.get(), width, height)))
- {}
-
-SkPlayback* SkRecording::releasePlayback() {
- SkASSERT(fRecorder->unique());
- fRecorder->forgetRecord();
- SkRecordOptimize(fRecord.get());
- return SkNEW_ARGS(SkPlayback, (fRecord.detach()));
-}
-
-SkRecording::~SkRecording() {}
-
-SkCanvas* SkRecording::canvas() {
- return fRecord.get() ? fRecorder.get() : NULL;
-}
-
-} // namespace EXPERIMENTAL
diff --git a/tests/RecordingTest.cpp b/tests/RecordingTest.cpp
deleted file mode 100644
index 0066556002..0000000000
--- a/tests/RecordingTest.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "Test.h"
-
-#include "../include/record/SkRecording.h"
-
-// Minimally exercise the public SkRecording API.
-
-DEF_TEST(SkRecording, r) {
- EXPERIMENTAL::SkRecording recording(1920, 1080);
-
- // Some very exciting commands here.
- recording.canvas()->clipRect(SkRect::MakeWH(320, 240));
-
- SkAutoTDelete<const EXPERIMENTAL::SkPlayback> playback(recording.releasePlayback());
-
- SkCanvas target;
- playback->draw(&target);
-
- // Here's another recording we never call releasePlayback().
- // However pointless, this should be safe.
- EXPERIMENTAL::SkRecording pointless(1920, 1080);
- pointless.canvas()->clipRect(SkRect::MakeWH(320, 240));
-}
diff --git a/tests/RecordingXfermodeTest.cpp b/tests/RecordingXfermodeTest.cpp
index aa6bf687a1..a4b270bf09 100644
--- a/tests/RecordingXfermodeTest.cpp
+++ b/tests/RecordingXfermodeTest.cpp
@@ -11,7 +11,6 @@
#include "../include/core/SkPicture.h"
#include "../include/core/SkStream.h"
#include "../include/core/SkString.h"
-#include "../include/record/SkRecording.h"
#include "../include/core/SkPictureRecorder.h"
#include <cstring>