aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPicturePlayback.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-09-30 14:47:10 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-30 14:47:10 -0700
commit46616af01b412ea984a516fda1ed8ec08e689f29 (patch)
treeb9662789028445ee0a3dffec8019965ebc7b7473 /src/core/SkPicturePlayback.h
parentafbf2d6273cd22c683f20a7e5773843876af3085 (diff)
Strip old backend recording down to essentials
Feature-wise, this removes: 1) BBH support; 2) peephole optimizations; 3) record-time text op specializations; 4) the guarantee that SkPaints are flattened. This deletes the optimizations GM, which only exists to test the peepholes of the old backend. SkRecord optimizations are unit tested, and if that ever fails we can think about adding another GM like this, but they're different enough we'd want to start from scratch anyway. We need to keep the code that plays back the specialized text ops around for a while for compatibility with existing .SKPs that have those ops recorded. BUG=skia: CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot R=robertphillips@google.com, reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/617953002
Diffstat (limited to 'src/core/SkPicturePlayback.h')
-rw-r--r--src/core/SkPicturePlayback.h25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/core/SkPicturePlayback.h b/src/core/SkPicturePlayback.h
index cdfa8efe18..9e5db08c63 100644
--- a/src/core/SkPicturePlayback.h
+++ b/src/core/SkPicturePlayback.h
@@ -9,7 +9,6 @@
#define SkPicturePlayback_DEFINED
#include "SkPictureFlat.h" // for DrawType
-#include "SkPictureStateTree.h"
class SkBitmap;
class SkCanvas;
@@ -18,14 +17,11 @@ class SkPaint;
class SkPictureData;
// The basic picture playback class replays the provided picture into a canvas.
-// If the picture was generated with a BBH it is used to accelerate drawing
-// unless disabled via setUseBBH.
class SkPicturePlayback : SkNoncopyable {
public:
SkPicturePlayback(const SkPicture* picture)
: fPictureData(picture->fData.get())
- , fCurOffset(0)
- , fUseBBH(true) {
+ , fCurOffset(0) {
}
virtual ~SkPicturePlayback() { }
@@ -37,31 +33,18 @@ public:
size_t curOpID() const { return fCurOffset; }
void resetOpID() { fCurOffset = 0; }
- // TODO: remove setUseBBH after cleaning up GrGatherCanvas
- void setUseBBH(bool useBBH) { fUseBBH = useBBH; }
-
protected:
const SkPictureData* fPictureData;
// The offset of the current operation when within the draw method
size_t fCurOffset;
- bool fUseBBH;
-
- void handleOp(SkReader32* reader,
- DrawType op,
- uint32_t size,
+ void handleOp(SkReader32* reader,
+ DrawType op,
+ uint32_t size,
SkCanvas* canvas,
const SkMatrix& initialMatrix);
- const SkPicture::OperationList* getActiveOps(const SkCanvas* canvas);
- bool initIterator(SkPictureStateTree::Iterator* iter,
- SkCanvas* canvas,
- const SkPicture::OperationList *activeOpsList);
- static void StepIterator(SkPictureStateTree::Iterator* iter, SkReader32* reader);
- static void SkipIterTo(SkPictureStateTree::Iterator* iter,
- SkReader32* reader, uint32_t skipTo);
-
static DrawType ReadOpAndSize(SkReader32* reader, uint32_t* size);
class AutoResetOpID {