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

Unified Diff: src/core/SkPictureData.h

Issue 715413002: More cleanup: streamline paths and bitmaps. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 1 month 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/SkPathHeap.cpp ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureData.h
diff --git a/src/core/SkPictureData.h b/src/core/SkPictureData.h
index 02529938abcf1fa2727132038d7449ec2a171d27..9a5a4ca0c13a625eabac94f51bb002b31b78cfbd 100644
--- a/src/core/SkPictureData.h
+++ b/src/core/SkPictureData.h
@@ -9,7 +9,6 @@
#define SkPictureData_DEFINED
#include "SkBitmap.h"
-#include "SkPathHeap.h"
#include "SkPicture.h"
#include "SkPictureContentInfo.h"
#include "SkPictureFlat.h"
@@ -85,18 +84,12 @@ protected:
public:
const SkBitmap& getBitmap(SkReader32* reader) const {
const int index = reader->readInt();
- if (SkBitmapHeap::INVALID_SLOT == index) {
-#ifdef SK_DEBUG
- SkDebugf("An invalid bitmap was recorded!\n");
-#endif
- return fBadBitmap;
- }
return (*fBitmaps)[index];
}
const SkPath& getPath(SkReader32* reader) const {
int index = reader->readInt() - 1;
- return (*fPathHeap.get())[index];
+ return (*fPaths)[index];
}
const SkPicture* getPicture(SkReader32* reader) const {
@@ -149,15 +142,12 @@ private:
// bitmap allows playback to draw nothing and move on.
SkBitmap fBadBitmap;
- SkAutoTUnref<SkBitmapHeap> fBitmapHeap;
-
SkTRefArray<SkBitmap>* fBitmaps;
- SkTRefArray<SkPaint>* fPaints;
+ SkTRefArray<SkPaint>* fPaints;
+ SkTRefArray<SkPath>* fPaths;
SkData* fOpData; // opcodes and parameters
- SkAutoTUnref<const SkPathHeap> fPathHeap; // reference counted
-
const SkPicture** fPictureRefs;
int fPictureCount;
const SkTextBlob** fTextBlobRefs;
« no previous file with comments | « src/core/SkPathHeap.cpp ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698