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

Unified Diff: src/core/SkPictureRecord.h

Issue 137093004: Collapse matrix & clip stack in PictureRecord (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fixed over application of SK_ prefix Created 6 years, 10 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 | « src/core/SkMatrixClipStateMgr.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecord.h
===================================================================
--- src/core/SkPictureRecord.h (revision 13386)
+++ src/core/SkPictureRecord.h (working copy)
@@ -10,6 +10,9 @@
#include "SkCanvas.h"
#include "SkFlattenable.h"
+#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
+#include "SkMatrixClipStateMgr.h"
+#endif
#include "SkPathHeap.h"
#include "SkPicture.h"
#include "SkPictureFlat.h"
@@ -111,11 +114,13 @@
int recordRestoreOffsetPlaceholder(SkRegion::Op);
void fillRestoreOffsetPlaceholdersForCurrentStackLevel(uint32_t restoreOffset);
+#ifndef SK_COLLAPSE_MATRIX_CLIP_STATE
SkTDArray<int32_t> fRestoreOffsetStack;
int fFirstSavedLayerIndex;
enum {
kNoSavedLayerIndex = -1
};
+#endif
/*
* Write the 'drawType' operation and chunk size to the skp. 'size'
@@ -250,7 +255,7 @@
int recordClipRegion(const SkRegion& region, SkRegion::Op op);
void recordSave(SaveFlags flags);
void recordSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags flags);
- void recordRestore();
+ void recordRestore(bool fillInSkips = true);
// These are set to NULL in our constructor, but may be changed by
// subclasses, in which case they will be SkSafeUnref'd in our destructor.
@@ -261,6 +266,9 @@
SkBitmapHeap* fBitmapHeap;
private:
+ friend class MatrixClipState; // for access to *Impl methods
+ friend class SkMatrixClipStateMgr; // for access to *Impl methods
+
SkChunkFlatController fFlattenableHeap;
SkPaintDictionary fPaints;
@@ -277,6 +285,10 @@
friend class SkPicturePlayback;
friend class SkPictureTester; // for unit testing
+#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
+ SkMatrixClipStateMgr fMCMgr;
+#endif
+
typedef SkCanvas INHERITED;
};
« no previous file with comments | « src/core/SkMatrixClipStateMgr.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698